/* ============================================================
   HOLIDAYS -- the website's holiday look (lib/holiday-layer.js), plus the founder's Moments calendar sheet (views/moments-admin.js).
   The ribbon shows for everyone; palette + particles only on the default look (html[data-theme="home"][data-holiday]).
   ============================================================ */

/* ---------- ribbon ---------- */
.bm-hol-ribbon {
  --h1: #D4A63C; --h2: #9C7424; --hfg: #141414;
  position: relative; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 44px 9px 16px; font: 600 13.5px/1.35 Inter, system-ui, sans-serif; color: var(--hfg); text-align: center;
  background: linear-gradient(90deg, var(--h2), var(--h1) 30%, var(--h1) 70%, var(--h2)); box-shadow: 0 2px 14px rgba(0,0,0,.18);
  animation: bm-hol-drop .6s cubic-bezier(.2, 1.4, .4, 1) both;
}
.bm-hol-ribbon b { font-weight: 800; letter-spacing: .02em; }
.bm-hol-ribbon .bm-hol-msg { opacity: .85; font-weight: 500; }
.bm-hol-ribbon .bm-hol-emo { font-size: 18px; display: inline-block; animation: bm-hol-bob 2.4s ease-in-out infinite; }
.bm-hol-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0,0,0,.12); color: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.bm-hol-x:hover { background: rgba(0,0,0,.22); }
.bm-hol-x:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@keyframes bm-hol-drop { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bm-hol-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-8deg); } }

.bm-hol-ribbon.skin-heritage  { --h1: #1E7B34; --h2: #C8102E; --hfg: #FFFFFF; background: linear-gradient(90deg, #C8102E, #111 33%, #111 66%, #1E7B34); }
.bm-hol-ribbon.skin-heritage b { color: #F6DC94; }
.bm-hol-ribbon.skin-valentine { --h1: #FF9DB5; --h2: #E8436B; --hfg: #3A0716; }
.bm-hol-ribbon.skin-spring    { --h1: #FDE4F2; --h2: #B5E3C8; --hfg: #2B2B2B; }
.bm-hol-ribbon.skin-fireworks { --hfg: #FFFFFF; background: linear-gradient(90deg, #C8102E, #1F4FB5); }
.bm-hol-ribbon.skin-halloween { --hfg: #FFF4E6; background: linear-gradient(90deg, #3B1A66, #F28C28 50%, #3B1A66); }
.bm-hol-ribbon.skin-harvest   { --h1: #E0A15A; --h2: #A4471B; --hfg: #2A1205; }
.bm-hol-ribbon.skin-winter    { --hfg: #FFFFFF; background: linear-gradient(90deg, #8E0E1F, #1E5B2E); }
.bm-hol-ribbon.skin-kwanzaa   { --hfg: #FFFFFF; background: linear-gradient(90deg, #C8102E, #111 50%, #1E7B34); }
.bm-hol-ribbon.skin-newyear   { --hfg: #F6DC94; background: linear-gradient(90deg, #0B0B0B, #3A2C0A 50%, #0B0B0B); }

/* ---------- particles (default look only, ~12 s) ---------- */
#bm-holiday-fx { position: fixed; inset: 0; z-index: 59; pointer-events: none; overflow: hidden; transition: opacity 1.4s ease; }
#bm-holiday-fx.out { opacity: 0; }
.bm-hol-p { position: absolute; top: -40px; line-height: 1; will-change: transform; animation: bm-hol-fall var(--d) linear var(--dl) both; }
.bm-hol-chip { width: 9px; height: 14px; border-radius: 2px; font-size: 0 !important; }
@keyframes bm-hol-fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate(var(--dx), 110vh) rotate(var(--rot)); opacity: .9; }
}
@media (prefers-reduced-motion: reduce) { #bm-holiday-fx { display: none; } .bm-hol-ribbon, .bm-hol-ribbon .bm-hol-emo { animation: none; } }

/* ---------- palette on the default look ---------- */
html[data-theme="home"][data-holiday] { --bm-hol-glow: rgba(212, 166, 60, .22); }
html[data-theme="home"][data-holiday="heritage"]  { --bm-hol-glow: rgba(30, 123, 52, .22); }
html[data-theme="home"][data-holiday="valentine"] { --bm-hol-glow: rgba(232, 67, 107, .2); }
html[data-theme="home"][data-holiday="spring"]    { --bm-hol-glow: rgba(248, 180, 217, .25); }
html[data-theme="home"][data-holiday="fireworks"] { --bm-hol-glow: rgba(31, 79, 181, .2); }
html[data-theme="home"][data-holiday="halloween"] { --bm-hol-glow: rgba(242, 140, 40, .24); }
html[data-theme="home"][data-holiday="harvest"]   { --bm-hol-glow: rgba(200, 102, 43, .22); }
html[data-theme="home"][data-holiday="winter"]    { --bm-hol-glow: rgba(200, 16, 46, .18); }
html[data-theme="home"][data-holiday="kwanzaa"]   { --bm-hol-glow: rgba(200, 16, 46, .2); }
html[data-theme="home"][data-holiday] .hl-hero,
html[data-theme="home"][data-holiday] #home-center { background-image: radial-gradient(ellipse 80% 50% at 50% -10%, var(--bm-hol-glow), transparent 70%); }

/* ---------- founder Moments calendar sheet (reuses the Site Skin sheet's .bsa-* look) ---------- */
.bm-moments-admin .bsa-card { max-width: 640px; }
.bmo-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; max-height: 52vh; overflow-y: auto; }
.bmo-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(127,127,127,.25); }
.bmo-row.off { opacity: .55; }
.bmo-emo { font-size: 22px; width: 30px; text-align: center; }
.bmo-main { flex: 1; min-width: 0; }
.bmo-main b { font-size: 14px; }
.bmo-main small { display: block; font-size: 11.5px; opacity: .7; margin-top: 2px; }
.bmo-live { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 2px 6px; border-radius: 999px; background: #D4A63C; color: #141414; margin-left: 6px; }
.bmo-mini { border: 1px solid rgba(127,127,127,.35); background: transparent; color: inherit; border-radius: 8px; padding: 6px 10px; font: 600 12px Inter, sans-serif; cursor: pointer; }
.bmo-sw { position: relative; width: 38px; height: 22px; flex: none; }
.bmo-sw input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: absolute; inset: 0; z-index: 1; }
.bmo-sw span { position: absolute; inset: 0; border-radius: 999px; background: rgba(127,127,127,.4); transition: background .2s; }
.bmo-sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.bmo-sw input:checked + span { background: #D4A63C; }
.bmo-sw input:checked + span::after { transform: translateX(16px); }
.bmo-sw input:focus-visible + span { outline: 2px solid #D4A63C; outline-offset: 2px; }
.bmo-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 14px; margin: 12px 0; font-size: 13px; }
.bmo-checks label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.bmo-note { font-size: 13px; padding: 8px 12px; border-radius: 10px; background: rgba(212,166,60,.15); margin: 8px 0; }
.bmo-form textarea { width: 100%; resize: vertical; font: inherit; }
.bm-moments-admin .bsa-f select, .bm-moments-admin .bsa-f textarea { padding: 10px 12px; border-radius: 10px; border: 1px solid #D9D9E0; font: 500 14px inherit; color: #111114; background: #fff; }
.bm-moments-admin .bsa-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
