/* BellFrog holiday mode (v2.11): see holiday.js. Looks only. */
.holiday-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; }
.holiday-toggle svg { width: 22px; height: 20px; flex: none; }
.holiday-toggle[aria-pressed="true"] { background: var(--selected); border-color: var(--forest); }
#holiday-toggle { order: 6; }
@media screen and (max-width: 1000px) {
  .portal-header [data-holiday-label] { display: none; }
  .portal-header .holiday-toggle { min-width: 44px; }
}

.holiday-hat { position: absolute; z-index: 2; max-width: none; height: auto; pointer-events: none; user-select: none;
  transform: rotate(-8deg); transform-origin: 46% 90%; filter: drop-shadow(0 1px 1px rgb(0 0 0 / .18)); }
.replaceable-art .holiday-hat, .replaceable-art.art-loaded .holiday-hat { display: block; height: auto; object-fit: fill; }

/* A string of lights hanging under the top bar */
html[data-holiday="on"] .portal-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 16px; pointer-events: none; z-index: 1;
  background:
    radial-gradient(circle at 12px 10px, #e23b3b 0 4.5px, transparent 5.5px) 0 0 / 96px 16px repeat-x,
    radial-gradient(circle at 36px 11px, #f2b632 0 4.5px, transparent 5.5px) 0 0 / 96px 16px repeat-x,
    radial-gradient(circle at 60px 10px, #2fa86b 0 4.5px, transparent 5.5px) 0 0 / 96px 16px repeat-x,
    radial-gradient(circle at 84px 11px, #3a86e0 0 4.5px, transparent 5.5px) 0 0 / 96px 16px repeat-x,
    linear-gradient(var(--forest), var(--forest)) 0 3px / 100% 1.5px no-repeat;
  animation: holiday-twinkle 2.4s ease-in-out infinite alternate;
}
@keyframes holiday-twinkle { from { filter: brightness(1) saturate(1); } to { filter: brightness(1.25) saturate(1.2); } }

/* Snow in the sidebar (tablets and computers, where the sidebar is always there) */
.holiday-snow { display: none; }
@media screen and (min-width: 600px) {
  html[data-holiday="on"] .holiday-snow { display: block; position: fixed; left: 0; top: 0; z-index: 31; width: var(--rail, 208px); height: 100dvh; overflow: hidden; pointer-events: none; }
  html.navigation-open .holiday-snow { display: none; }
}
.holiday-snow i { position: absolute; top: -10px; border-radius: 50%; background: #fff; animation: holiday-snow linear infinite; }
@keyframes holiday-snow { from { transform: translate(0, -10px); } 50% { transform: translate(10px, 50dvh); } to { transform: translate(-4px, 102dvh); } }
@media (prefers-reduced-motion: reduce) {
  .holiday-snow { display: none !important; }
}
@media print { .holiday-toggle, .holiday-hat, .holiday-snow { display: none !important; } html[data-holiday="on"] .portal-header::after { display: none; } }
.sidebar-utilities .holiday-toggle[aria-pressed="true"] { background: #ffffff22; border-color: #ffffff90; }

/* ---- The holiday colors: red, white, gold and green, and a bit silly (v2.11) ---- */
html[data-holiday="on"] {
  --forest: #b0182c; --forest-dark: #7d1020; --ink: #2a1a14; --muted: #6e5a4a;
  --line: #e9cf9e; --cream: #fff6e3; --cream-soft: #fffaf0; --cream-deep: #fbeccb;
  --frog-green: #1f7a45; --gold: #c8961c; --gold-soft: #f6e2a8;
  --surface: #fffdf8; --surface-soft: #fff6e3; --canvas: #fdf5e6;
  --action: #c41e3a; --action-ink: #fff; --selected: #fdefc4;
  --sidebar: #0f5132; --sidebar-ink: #fffaf0; --sidebar-active: #f5c94a;
  --success: #1f7a45; --shadow: 0 8px 24px rgb(120 40 20 / 8%); --warning-surface: #fff3d6;
}
html[data-holiday="on"][data-theme="dark"] {
  --forest: #f3cf6b; --forest-dark: #fff4d6; --ink: #fff6ea; --muted: #d9c6aa;
  --line: #6b5330; --cream: #33231a; --cream-soft: #2a1c15; --cream-deep: #3f2b1e;
  --frog-green: #7fd49b; --gold: #f3cf6b; --gold-soft: #5c4724;
  --surface: #1f3326; --surface-soft: #284032; --canvas: #13251b;
  --action: #d42f40; --action-ink: #fff; --selected: #4a3a1c;
  --sidebar: #4a0f1a; --sidebar-ink: #fff4e8; --sidebar-active: #f3cf6b;
  --success: #7fd49b; --shadow: 0 8px 24px rgb(0 0 0 / 25%); --warning-surface: #46361c;
}
@media screen {
  /* Snow on the page: tiny gold and white flecks */
  html[data-holiday="on"] body {
    background-color: var(--canvas);
    background-image: radial-gradient(circle at 20% 30%, rgb(200 150 28 / 18%) 0 1.6px, transparent 2.4px),
                      radial-gradient(circle at 70% 75%, rgb(176 24 44 / 12%) 0 1.4px, transparent 2.2px),
                      radial-gradient(circle at 45% 55%, rgb(31 122 69 / 12%) 0 1.2px, transparent 2px);
    background-size: 46px 46px, 62px 62px, 38px 38px;
  }
  html[data-holiday="on"] .portal { background: transparent; }

  /* Candy-cane buttons */
  html[data-holiday="on"] .primary-button {
    background-image: repeating-linear-gradient(-45deg, rgb(255 255 255 / 16%) 0 9px, transparent 9px 18px);
    border-color: var(--action);
  }
  html[data-holiday="on"] .primary-button:hover { filter: brightness(1.08); }

  /* Candy-cane stripe along the top of the big boxes */
  html[data-holiday="on"] :is(.admin-panel, .next-task-panel, .card) {
    background: repeating-linear-gradient(-45deg, #c41e3a 0 10px, #fff 10px 20px) top / 100% 6px no-repeat, var(--surface);
    border-color: var(--line);
  }

  /* The dashboard cards are presents: a gold ribbon down the left edge and a bow on top */
  html[data-holiday="on"] .dashboard-button {
    background: linear-gradient(90deg, transparent 12px, #e0a92a 12px, #f5cf55 17px, #e0a92a 22px, transparent 22px) 0 0 / 100% 100% no-repeat, var(--surface);
    border: 2px solid var(--line);
  }
  html[data-holiday="on"] .dashboard-button::before {
    content: ""; position: absolute; top: 1px; left: 0; width: 34px; height: 26px; pointer-events: none; z-index: 1;
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2060%2044%22%3E%3Cg%20stroke%3D%22%238a6410%22%20stroke-width%3D%222%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M27%2020%20L14%2040%20L20%2039%20L23%2044%20L30%2024%20Z%22%20fill%3D%22%23e0a92a%22/%3E%3Cpath%20d%3D%22M33%2020%20L46%2040%20L40%2039%20L37%2044%20L30%2024%20Z%22%20fill%3D%22%23e0a92a%22/%3E%3Cpath%20d%3D%22M29%2019%20C18%204%202%204%204%2016%20C6%2026%2020%2024%2029%2021%20Z%22%20fill%3D%22%23f5cf55%22/%3E%3Cpath%20d%3D%22M31%2019%20C42%204%2058%204%2056%2016%20C54%2026%2040%2024%2031%2021%20Z%22%20fill%3D%22%23f5cf55%22/%3E%3Cellipse%20cx%3D%2230%22%20cy%3D%2220%22%20rx%3D%226%22%20ry%3D%226%22%20fill%3D%22%23e0a92a%22/%3E%3C/g%3E%3Cpath%20d%3D%22M10%2012%20C14%209%2019%2010%2022%2014%22%20fill%3D%22none%22%20stroke%3D%22%23fff3c4%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22/%3E%3Cpath%20d%3D%22M50%2012%20C46%209%2041%2010%2038%2014%22%20fill%3D%22none%22%20stroke%3D%22%23fff3c4%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22/%3E%3C/svg%3E") center / contain no-repeat;
    transform: rotate(-10deg);
  }
  html[data-holiday="on"] .dashboard-button > :is(strong, small) { padding-left: 14px; }
  html[data-holiday="on"] #open-bell-schedule { background: var(--surface); }
  html[data-holiday="on"] #open-bell-schedule > :is(strong, small) { padding-left: 0; }
  html[data-holiday="on"] #open-bell-schedule::before { display: none; }

  /* Headings: festive red (gold in the dark), and a sprig of holly on the big page title */
  html[data-holiday="on"] .portal h1 { color: var(--forest); }
  html[data-holiday="on"] .portal h1::after { content: "  🎄"; font-size: .8em; }
  html[data-holiday="on"] .eyebrow { color: var(--frog-green); }

  /* Sidebar: the active page is a gold ornament */
  html[data-holiday="on"] .quick-nav-button.active { color: #7d1020; background: var(--sidebar-active); border-color: #fff3c4; box-shadow: 0 0 0 2px rgb(255 243 196 / 35%), 0 0 14px rgb(245 201 74 / 55%); }
  html[data-holiday="on"] .quick-nav-count { background: #c41e3a; color: #fff; }

  /* The Ribbits pill is a gold coin */
  html[data-holiday="on"] .ribbit-balance-button { background: linear-gradient(180deg, #fff3c4, #f5c94a); border-color: #c8961c; color: #5a3a06; }
  html[data-holiday="on"][data-theme="dark"] .ribbit-balance-button { background: linear-gradient(180deg, #f5d77a, #c8961c); color: #2a1a06; }
}
