/* Share dropdown surfaces and options across Appearance, filters and the avatar. */
:root {
  color-scheme: light;
  --booker-banner: #282d40;
  --booker-tagline: #c0c9d5;
  --dropdown-surface: #fff;
  --dropdown-hover: #edf5ff;
  --dropdown-active: #e4efff;
  --dropdown-ink: #174c93;
  --dropdown-trigger: #eaf3ff;
  --dropdown-trigger-ink: #235da8;
  --dropdown-trigger-hover: #dbeaff;
  --dropdown-trigger-line: #c9dcf8;
  --dropdown-shadow: 0 10px 26px #17203324;
}

.dropdown-surface {
  background: var(--dropdown-surface);
  color: var(--ink);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--line), var(--dropdown-shadow);
}
.dropdown-menu > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--dropdown-trigger-line);
  border-radius: 7px;
  background: var(--dropdown-trigger);
  color: var(--dropdown-trigger-ink);
  transition: background-color .16s ease, color .16s ease;
}
.dropdown-menu > summary::-webkit-details-marker { display: none; }
.dropdown-menu > summary:hover, .dropdown-menu[open] > summary {
  background: var(--dropdown-trigger-hover);
  color: var(--dropdown-ink);
}
.dropdown-options {
  max-height: min(24rem, 46dvh);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 5px;
}
details.dropdown-menu .dropdown-options .dropdown-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
details.dropdown-menu .dropdown-options .dropdown-option:hover,
details.dropdown-menu .dropdown-options .dropdown-option:focus-within {
  background: var(--dropdown-hover);
  color: var(--dropdown-ink);
}
details.dropdown-menu .dropdown-options [aria-pressed="true"] {
  background: var(--dropdown-active);
  color: var(--dropdown-ink);
  font-weight: 600;
}
details.dropdown-menu .dropdown-options [aria-pressed="true"]::after {
  content: "";
  width: 5px;
  height: 9px;
  margin-inline-start: auto;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  flex-shrink: 0;
}
details.dropdown-menu > summary:focus-visible,
details.dropdown-menu .dropdown-options .dropdown-option:focus-visible {
  outline: 2px solid var(--dropdown-ink);
  outline-offset: -2px;
  box-shadow: none;
}
.dropdown-group {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.dropdown-heading {
  padding: 4px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.theme-setting { margin-top: 8px; }
.theme-setting > summary { font-weight: 600; }
.theme-setting .dropdown-options { margin-top: 4px; }
.theme-value {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
  text-align: end;
  font-weight: 400;
}
.theme-value::after {
  content: "";
  width: 5px;
  height: 5px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-1px) rotate(45deg);
  flex-shrink: 0;
}
.theme-setting[open] .theme-value::after { transform: translateY(2px) rotate(225deg); }
.panel.delete-account-panel { border-color: #f1b8b2; background: var(--bad-soft); }

/* Warm changes neutral surfaces; booking colors still carry the same meaning. */
:root[data-theme="warm"] {
  --bg: #f4f3f0;
  --panel: #fffefa;
  --soft: #f7f6f3;
  --line: #dcd8d1;
  --ink: #302e2a;
  --muted: #655f56;
  --warm-header: #383632;
  --booker-banner: var(--warm-header);
  --booker-tagline: #d0ccc4;
  --warm-raised: #eae7e2;
  --warm-hover: #e6e2dc;
  --dropdown-surface: var(--panel);
  --dropdown-hover: var(--soft);
  --dropdown-active: var(--warm-raised);
  --dropdown-ink: var(--ink);
  --dropdown-trigger: var(--warm-raised);
  --dropdown-trigger-ink: var(--ink);
  --dropdown-trigger-hover: var(--warm-hover);
  --dropdown-trigger-line: var(--line);
}

:root[data-theme="warm"] body { background: var(--bg); }
:root[data-theme="warm"] header { background: var(--warm-header); }
:root[data-theme="warm"] :is(.brand-tagline, .header-session .muted, .header-subtitle) {
  color: #d0ccc4;
}
:root[data-theme="warm"] :is(
  .panel:not(.message, .error, .saved, .delete-account-panel, .security-note),
  .day-block, .compact-panel, .session-info-panel, .view-switcher, .fitness-slots,
  .class-card, .fitness-group-card
) {
  background: var(--panel);
  border-color: var(--line);
}
:root[data-theme="warm"] :is(.class-card, .fitness-group-card) { box-shadow: 0 2px 5px #302e2a1a; }
:root[data-theme="warm"] :is(.week-board, .week-column, .settings-card, .diagnostics-card, .health-metric, .schedule-head, .user-row) {
  background: var(--soft);
  border-color: var(--line);
}
:root[data-theme="warm"] :is(.day-header, .week-column-header) {
  background: var(--warm-raised);
  color: var(--ink);
}
:root[data-theme="warm"] :is(
  .card-meta, .time-main, .week-number, .class-card.closed-card, .class-card.unavailable-card,
  .class-card.closed-card :is(.card-time, .card-time-main),
  .class-card.unavailable-card :is(.card-time, .card-time-main)
) { color: var(--muted); }
:root[data-theme="warm"] .week-label { color: var(--ink); }
:root[data-theme="warm"] :is(.class-row, .class-card, .fitness-slot-row, .fitness-group-card).scheduled { background: #fdf5e5; }
:root[data-theme="warm"] :is(.class-row, .class-card, .fitness-slot-row, .fitness-group-card).booked-row { background: #eef7ef; }
:root[data-theme="warm"] :is(.pill.closed, .pill.unavailable, .pill.off) {
  background: var(--warm-raised);
  color: var(--muted);
}

:root[data-theme="warm"] :is(select, textarea, input:not([type="checkbox"], [type="radio"])) {
  background-color: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}
:root[data-theme="warm"] :is(
  .week-strip, .week-strip .button:not(.selected-day-button),
  .view-switcher .active, .week-actions .current-week-button
) {
  background: var(--warm-raised);
  border-color: var(--line);
  color: var(--ink);
}
:root[data-theme="warm"] :is(
  .week-strip .button:not(.selected-day-button), .week-actions .current-week-button
):hover,
:root[data-theme="warm"] .week-strip .day-button[data-today="1"]:not(.selected-day-button) {
  background: var(--warm-hover);
}
:root[data-theme="warm"] :is(details.compact-panel > summary:hover, select:hover) {
  background: var(--soft);
  color: var(--ink);
}
:root[data-theme="warm"] .week-strip .selected-day-button { background: #255fb7; }
:root[data-theme="warm"] .week-strip .selected-day-button:hover { background: #1d4f9b; }

/* Neutral surfaces share a palette. Booking states retain separate semantic colors. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16181b;
  --panel: #22262a;
  --soft: #292e34;
  --line: #414953;
  --ink: #eef1f5;
  --text: var(--ink);
  --muted: #adb7c4;
  --dark-input: #1a1e22;
  --dark-header: #1c2027;
  --booker-banner: var(--dark-header);
  --dark-raised: #303740;
  --dark-hover: #333d48;
  --dark-action: #245fc1;
  --dark-action-hover: #2d69cb;
  --dark-link: #a4c9ff;
  --dark-blue-soft: #233750;
  --dark-blue-line: #435b78;
  --blue: var(--dark-link);
  --green: #8bd8ab;
  --red: #ffaaaa;
  --yellow: #f1d185;
  --dark-booked: #1d3128;
  --dark-scheduled: #322b1f;
  --dark-success: #274238;
  --dark-warning: #473a23;
  --dark-danger: #492b30;
  --accent: var(--dark-link);
  --accent-soft: var(--dark-blue-soft);
  --ok: var(--green);
  --bad: var(--red);
  --bad-soft: #302227;
  --grey: var(--muted);
  --grey-soft: var(--dark-raised);
  --dropdown-surface: var(--panel);
  --dropdown-hover: var(--dark-hover);
  --dropdown-active: var(--dark-blue-soft);
  --dropdown-ink: var(--dark-link);
  --dropdown-trigger: var(--dark-blue-soft);
  --dropdown-trigger-ink: var(--dark-link);
  --dropdown-trigger-hover: var(--dark-hover);
  --dropdown-trigger-line: var(--dark-blue-line);
  --dropdown-shadow: 0 10px 26px #0008;
}

:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] header { background: var(--dark-header); }
:root[data-theme="dark"] :is(.panel, .day-block, .compact-panel, .session-info-panel, .view-switcher, .fitness-slots) {
  background: var(--panel);
}
:root[data-theme="dark"] :is(.settings-card, .diagnostics-card, .health-metric, .schedule-head, .user-row) {
  background: var(--soft);
}
:root[data-theme="dark"] details.compact-panel > summary:hover {
  background: var(--dark-hover);
  color: var(--ink);
}
:root[data-theme="dark"] :is(.day-header, .week-column-header) {
  background: var(--dark-raised);
  color: var(--ink);
}
:root[data-theme="dark"] :is(.week-board, .week-column) { background: var(--dark-input); }
:root[data-theme="dark"] :is(.week-column, .fitness-slot-row) { border-color: var(--line); }
:root[data-theme="dark"] :is(.class-card, .fitness-group-card) {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 2px 5px #0005;
}
:root[data-theme="dark"] :is(.class-card.closed-card, .class-card.unavailable-card) { color: var(--muted); }
:root[data-theme="dark"] :is(.class-row, .class-card, .fitness-slot-row, .fitness-group-card).scheduled { background: var(--dark-scheduled); }
:root[data-theme="dark"] :is(.class-row, .class-card, .fitness-slot-row, .fitness-group-card).booked-row { background: var(--dark-booked); }
:root[data-theme="dark"] :is(.card-time, .card-time-main, .fitness-slot-time) { color: #98d8c5; }
:root[data-theme="dark"] :is(.class-card.unavailable-card .card-time, .class-card.unavailable-card .card-time-main, .time-main, .card-meta, .week-number) {
  color: var(--muted);
}
:root[data-theme="dark"] :is(.week-label, .notification-title) { color: var(--ink); }
:root[data-theme="dark"] :is(.fitness-expand, .race-attempt-log > summary) { color: var(--dark-link); }
:root[data-theme="dark"] :is(.booking-tile-error, .full-spots) { color: var(--red); }

:root[data-theme="dark"] :is(select, textarea, input:not([type="checkbox"]):not([type="radio"])) {
  background-color: var(--dark-input);
  border-color: var(--line);
  color: var(--ink);
}
:root[data-theme="dark"] :is(button, .button, .popover-link) {
  background: var(--soft);
  border-color: var(--line);
  color: var(--ink);
}
:root[data-theme="dark"] :is(button, .button, .popover-link, select):hover {
  background: var(--dark-hover);
  border-color: var(--dark-blue-line);
  color: var(--ink);
}
:root[data-theme="dark"] :is(.auth-page, .account-page) .password-toggle {
  background: transparent;
  border: 0;
  color: var(--muted);
}
:root[data-theme="dark"] :is(.auth-page, .account-page) .password-toggle:hover {
  background: var(--dark-hover);
  color: var(--ink);
}
:root[data-theme="dark"] :is(
  button.primary,
  .auth-page button:not(.password-toggle),
  .account-page button:not(.password-toggle, .secondary, .danger)
) {
  background: var(--dark-action);
  border-color: var(--dark-action);
  color: #fff;
}
:root[data-theme="dark"] :is(
  button.primary,
  .auth-page button:not(.password-toggle),
  .account-page button:not(.password-toggle, .secondary, .danger)
):hover {
  background: var(--dark-action-hover);
  border-color: var(--dark-action-hover);
}
:root[data-theme="dark"] button.danger { border-color: #85505b; color: var(--red); }
:root[data-theme="dark"] button.danger:hover { background: var(--dark-danger); color: var(--red); }
:root[data-theme="dark"] :is(button, select, input, .button, summary):focus-visible {
  outline: 2px solid var(--dark-link);
  outline-offset: 2px;
}
:root[data-theme="dark"] :is(button, input[type="submit"]):disabled { opacity: .6; cursor: not-allowed; }

:root[data-theme="dark"] :is(
  .auto-book-button, .current-week-button, .week-strip, .week-strip .button,
  .view-switcher .active, .popover-link, .button.secondary
) {
  background: var(--dark-blue-soft);
  color: var(--dark-link);
  border-color: var(--dark-blue-line);
}
:root[data-theme="dark"] :is(
  .auto-book-button, .current-week-button, .week-strip .button,
  .popover-link, .button.secondary
):hover {
  background: var(--dark-hover);
  color: var(--dark-link);
  border-color: var(--dark-blue-line);
}
:root[data-theme="dark"] .week-strip .day-button[data-today="1"]:not(.selected-day-button) {
  background: var(--dark-hover);
  box-shadow: inset 0 0 0 1px var(--dark-link);
}
:root[data-theme="dark"] .week-strip .selected-day-button {
  background: var(--dark-action);
  color: #fff;
}
:root[data-theme="dark"] .week-strip .selected-day-button:hover { background: var(--dark-action-hover); }
:root[data-theme="dark"] .week-loading-indicator {
  border-color: var(--dark-blue-line);
  border-top-color: var(--dark-link);
}
:root[data-theme="dark"] :is(.avatar, .admin-badge) {
  background: var(--dark-blue-soft);
  color: var(--dark-link);
  border-color: var(--dark-blue-line);
  box-shadow: inset 0 0 0 1px var(--dark-blue-line);
}
:root[data-theme="dark"] :is(.user-menu > summary:hover .avatar, .user-menu[open] .avatar, .app-header a.avatar:hover) {
  background: var(--dark-action);
  color: #fff;
}

:root[data-theme="dark"] .pill { background: var(--dark-raised); color: var(--ink); }
:root[data-theme="dark"] :is(.pill.bookable, .pill.notification-summary, .worker-check-time.booked-check-time, .panel.message, .security-note) {
  background: var(--dark-blue-soft);
  border-color: var(--dark-blue-line);
  color: var(--dark-link);
}
:root[data-theme="dark"] :is(.pill.booked, .pill.ok, .panel.saved) {
  background: var(--dark-success);
  border-color: #406a57;
  color: var(--green);
}
:root[data-theme="dark"] :is(.pill.hunt, .pill.race, .pill.retrying, .dev-code) {
  background: var(--dark-warning);
  border-color: #756040;
  color: var(--yellow);
}
:root[data-theme="dark"] :is(.pill.full, .panel.error) {
  background: var(--dark-danger);
  border-color: #85505b;
  color: var(--red);
}
:root[data-theme="dark"] .panel.delete-account-panel {
  background: var(--bad-soft);
  border-color: #85505b;
}
:root[data-theme="dark"] :is(.pill.unavailable, .pill.closed, .pill.off) { color: var(--muted); }

/* Use the dark semantic colors for the worker flash as well as its resting state. */
@keyframes dark-check-flash {
  0%, 35% { background: var(--dark-success); color: var(--green); }
  100% { background: transparent; color: var(--muted); }
}
@keyframes dark-booked-flash {
  0%, 100% { background: var(--dark-blue-soft); color: var(--dark-link); }
  35% { background: var(--dark-action); color: #fff; }
}
:root[data-theme="dark"] :is(.target-check, .worker-check-time).just-checked { animation-name: dark-check-flash; }
:root[data-theme="dark"] .worker-check-time.just-booked { animation-name: dark-booked-flash; }

/* Seasonal previews reuse the accessible dark and warm booking state colors. */
:root[data-seasonal-theme="halloween"] {
  --bg: #171518;
  --panel: #211c24;
  --soft: #2c252e;
  --line: #514552;
  --ink: #f7ebdc;
  --muted: #c5bac6;
  --dark-input: #1d191e;
  --dark-header: #231c26;
  --dark-raised: #322934;
  --dark-hover: #3a303d;
  --seasonal-accent: #ff9f33;
  --halloween-selected: #ffac48;
  --halloween-selected-hover: #ffc16e;
  --seasonal-icon: url("halloween-pumpkin.svg");
  --seasonal-header-art: url("halloween-header.webp");
  --seasonal-header-corner: url("halloween-web.svg");
}

/* Match the header geometry even when the pages have different lengths and artwork. */
.booker-main-page { scrollbar-gutter:stable; }
.app-header {
  --header-art-height: 68px;
  --header-padding-block: 8px;
  background:var(--booker-banner);
  color:white;
}
.app-header .header-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  width:100%;
  min-height: calc(var(--header-art-height) + 2 * var(--header-padding-block));
  padding:var(--header-padding-block) 24px;
}
.app-header .brand {
  display:flex; align-items:center; gap:12px; min-width:0;
  color:inherit; text-decoration:none; font-family:var(--font-sans);
}
.app-header .brand-logo { width:42px; height:42px; object-fit:contain; flex:none; }
.app-header .brand-name { display:block; margin:0; font-size:22px; font-weight:700; line-height:1.15; }
.app-header .brand-tagline { color:var(--booker-tagline); font-size:14px; font-weight:500; line-height:1.35; }
.app-header .avatar {
  display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px;
  border:1px solid #8fb7f0; border-radius:50%; background:#dcecff; color:#174c93;
  font:700 14px/1 var(--font-sans); text-decoration:none;
  transition:background-color .16s ease, color .16s ease, border-color .16s ease;
}
.app-header :is(a.avatar:hover, .user-menu > summary:hover .avatar, .user-menu[open] .avatar) {
  background:#1e6bd6; color:white; border-color:#1e6bd6;
}
.header-bix {
  --bix-width: min(calc(var(--header-art-height) * 8 / 9), var(--bix-room, 0px));
}

/* Artwork stays in the header, outside the timetable and booking controls. */
.seasonal-header-art { display: none; }
:root[data-seasonal-theme] header {
  background-image: var(--seasonal-header-corner);
  background-position: right top;
  background-repeat: no-repeat;
  background-size: 64px auto;
  box-shadow: inset 0 -2px var(--seasonal-accent);
}
:root[data-seasonal-theme] .seasonal-header-art {
  display: block;
  width: 92px;
  height: var(--header-art-height);
  align-self: center;
  background: var(--seasonal-header-art) center / contain no-repeat;
}
@media (max-width: 760px) {
  .app-header {
    --header-art-height: 62px;
    --header-padding-block: 6px;
  }
  .app-header .header-inner {
    display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:8px; padding-inline:10px;
  }
  .app-header .brand { gap:8px; }
  .app-header .brand-logo { width:34px; height:34px; }
  .app-header .brand-name { font-size:21px; }
  .app-header .brand-tagline { font-size:13px; line-height:1.1; }
  .app-header .avatar { width:32px; height:32px; }
  :root[data-seasonal-theme] header { background-size: 48px auto; }
  /* Stack the avatar and role badge to leave the brand and artwork room on phones. */
  :root[data-seasonal-theme] .header-actions {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-items: end;
    gap: 2px 7px;
  }
  :root[data-seasonal-theme] .seasonal-header-art {
    grid-column: 1;
    grid-row: 1 / 3;
    width: clamp(64px, 21vw, 88px);
  }
  :root[data-seasonal-theme] .user-menu { grid-column: 2; grid-row: 1; }
  :root[data-seasonal-theme] .header-session { grid-column: 2; grid-row: 2; }
  :root[data-seasonal-theme] .header-session .admin-badge {
    min-height: 17px;
    font-size: 10px;
    padding: 1px 5px;
    white-space: nowrap;
  }
}

:root[data-seasonal-theme="halloween"] :is(.view-switcher .active, details.filter-menu > summary) {
  background: var(--dark-raised);
  border-color: var(--line);
  color: var(--ink);
}
:root[data-seasonal-theme="halloween"] details.filter-menu > summary:hover {
  background: var(--dark-hover);
}
:root[data-seasonal-theme="halloween"] .week-strip .selected-day-button {
  background: var(--halloween-selected);
  color: var(--bg);
}
:root[data-seasonal-theme="halloween"] .week-strip .selected-day-button:hover {
  background: var(--halloween-selected-hover);
}

/* Keep the seasonal icon by the week range, leaving the day buttons uncluttered. */
:root[data-seasonal-theme] .week-label {
  --seasonal-range-icon-size: 22px;
  position: relative;
}
:root[data-seasonal-theme] .week-label::after {
  content: "";
  display: inline-block;
  width: var(--seasonal-range-icon-size);
  height: var(--seasonal-range-icon-size);
  margin-inline-start: 5px;
  vertical-align: -5px;
  background: var(--seasonal-icon) center / contain no-repeat;
}
/* Reuse the icon's space for the spinner so week navigation doesn't shift the header. */
:root[data-seasonal-theme] .week-label .week-loading-indicator {
  position: absolute;
  inset-inline-end: calc(var(--seasonal-range-icon-size) / 2 - 6px);
  top: calc(50% - 6px);
  width: 12px;
  height: 12px;
  margin: 0;
}
:root[data-seasonal-theme] .week-navigation-loading .week-label::after { visibility: hidden; }

/* Accent only the holiday that matches the active preview. */
:root[data-seasonal-theme="halloween"] .week-strip [data-halloween-day]:not(.selected-day-button),
:root[data-seasonal-theme="christmas"] .week-strip [data-christmas-day]:not(.selected-day-button),
:root[data-seasonal-theme="sinterklaas"] .week-strip [data-sinterklaas-day]:not(.selected-day-button) {
  box-shadow: inset 0 -2px var(--seasonal-accent);
}
:root[data-seasonal-theme="halloween"] :is(.day-header, .week-column-header)[data-halloween-day],
:root[data-seasonal-theme="christmas"] :is(.day-header, .week-column-header)[data-christmas-day],
:root[data-seasonal-theme="sinterklaas"] :is(.day-header, .week-column-header)[data-sinterklaas-day] {
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: inset 0 -2px var(--seasonal-accent);
}
:root[data-seasonal-theme="halloween"] :is(.day-header, .week-column-header)[data-halloween-day]::before,
:root[data-seasonal-theme="christmas"] :is(.day-header, .week-column-header)[data-christmas-day]::before,
:root[data-seasonal-theme="sinterklaas"] :is(.day-header, .week-column-header)[data-sinterklaas-day]::before {
  content: "";
  flex: 0 0 18px;
  height: 18px;
  background: var(--seasonal-day-icon, var(--seasonal-icon)) center / contain no-repeat;
}

@media (max-width: 360px) {
  /* Leave enough room for cross-month ranges on the same line as the title. */
  :root[data-seasonal-theme] .overview-title { column-gap: 3px; }
  :root[data-seasonal-theme] .week-label {
    --seasonal-range-icon-size: 18px;
    font-size: 12px;
  }
  /* Double-digit dates and filter counts need room on narrow phones. */
  :root[data-seasonal-theme] .week-strip {
    grid-template-columns: 24px repeat(7, minmax(0, 1fr)) 24px;
  }
  :root[data-seasonal-theme] .week-strip .day-date { white-space: nowrap; }
  :root[data-seasonal-theme] .filter-group { gap: 5px; }
  :root[data-seasonal-theme] .filter-group details.filter-menu > summary {
    gap: 4px;
    padding-inline: 5px;
    font-size: 12px;
  }
  :root[data-seasonal-theme] .filter-group :is(.filter-clear, .filter-today) {
    min-width: 42px;
    padding-inline: 5px;
    font-size: 12px;
  }
}

:root[data-seasonal-theme="christmas"] {
  --bg: #f0f4f1;
  --panel: #fffefc;
  --soft: #f5f7f5;
  --line: #d9e2dc;
  --ink: #24312b;
  --muted: #56645c;
  --warm-header: #203d34;
  --warm-raised: #e7ede8;
  --warm-hover: #dce6df;
  --seasonal-accent: #a83248;
  --seasonal-icon: url("christmas-tree.svg");
  /* Keep the reindeer a Christmas Day cameo, separate from the week icon. */
  --seasonal-day-icon: url("christmas-reindeer.svg");
  --seasonal-header-art: url("christmas-bauble.webp");
  --seasonal-header-corner: url("christmas-snowflakes.svg");
}

:root[data-seasonal-theme="christmas"] .week-strip .selected-day-button { background: var(--seasonal-accent); color: #fff; }
:root[data-seasonal-theme="christmas"] .week-strip .selected-day-button:hover { background: #8c2436; }

/* Garnet and brass stay in the seasonal chrome; class status colors are unchanged. */
:root[data-seasonal-theme="sinterklaas"] {
  --bg: #f7f4ef;
  --panel: #fffefc;
  --soft: #f8f5f2;
  --line: #e3d9d3;
  --ink: #302728;
  --muted: #665b59;
  --warm-header: #782c31;
  --warm-raised: #efe9e4;
  --warm-hover: #e8dfd9;
  --seasonal-accent: #e2b969;
  --seasonal-header-art: url("sinterklaas-bix.webp");
  --seasonal-header-corner: url("sinterklaas-house.svg");
  --seasonal-icon: url("sinterklaas-mitre.svg");
  --seasonal-day-icon: url("sinterklaas-parcel.svg");
}

:root[data-seasonal-theme="sinterklaas"] .week-strip .selected-day-button { background: #9b3c43; color: #fff; }
:root[data-seasonal-theme="sinterklaas"] .week-strip .selected-day-button:hover { background: #832b34; }

/* Roasted Copper keeps the stronger autumn colors in the header and selected date. */
:root[data-seasonal-theme="fall"] {
  --bg: #f3f2f0;
  --panel: #fffefc;
  --soft: #f7f5f3;
  --line: #e1d8d3;
  --ink: #302927;
  --muted: #655b57;
  --warm-header: #62382b;
  --warm-raised: #ede7e3;
  --warm-hover: #e6dcd6;
  --seasonal-accent: #dc914e;
  --seasonal-header-art: url("fall-bix.webp");
  --seasonal-header-corner: url("fall-maple-sweep.webp");
  --seasonal-icon: url("fall-leaf.svg");
}

:root[data-seasonal-theme="fall"] .week-strip .selected-day-button { background: #934930; color: #fff; }
:root[data-seasonal-theme="fall"] .week-strip .selected-day-button:hover { background: #793b26; }

/* The leaf sweep fills the right corner without reaching the wordmark. */
:root[data-seasonal-theme="fall"] header { background-size: 172px auto; }

/* Keep the gable above the desktop avatar and beside it on narrow screens. */
:root[data-seasonal-theme="sinterklaas"] header {
  background-position: right 18px top;
  background-size: 42px auto;
}
@media (max-width: 760px) {
  :root[data-seasonal-theme="fall"] header { background-size: clamp(138px, 44vw, 172px) auto; }
  :root[data-seasonal-theme="sinterklaas"] header {
    background-position: right 47px top 8px;
    background-size: 33px auto;
  }
}

/* Blue Hour uses cool surfaces without changing booking status colors. */
:root[data-seasonal-theme="winter-blue-hour"] {
  --seasonal-header-art: url("winter-bix.webp");
  --seasonal-header-corner: none;
  --seasonal-icon: url("winter-snowflake.svg");
  --bg: #eff3f5;
  --panel: #fcfdfd;
  --soft: #f2f6f8;
  --line: #d6e0e6;
  --ink: #28333c;
  --muted: #53616c;
  --warm-header: #2e4152;
  --warm-raised: #e4edf1;
  --warm-hover: #dbe7ee;
  --seasonal-accent: #a9c7dc;
}

:root[data-seasonal-theme="winter-blue-hour"] .week-strip .selected-day-button {
  background: #375b73;
  color: #fff;
}
:root[data-seasonal-theme="winter-blue-hour"] .week-strip .selected-day-button:hover {
  background: #2b495f;
}

/* Keep the flurries behind the header controls and out of the pointer path. */
:root[data-seasonal-theme="winter-blue-hour"] :is(header, .header-inner) { position: relative; }
:root[data-seasonal-theme="winter-blue-hour"] header::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 172px;
  background: #b4d0e3;
  mask: url("winter-flurries.svg") right top / 100% auto no-repeat;
  pointer-events: none;
}
@media (max-width: 760px) {
  :root[data-seasonal-theme="winter-blue-hour"] header::before { width: clamp(138px, 44vw, 172px); }
}

/* Retro accents belong to navigation and header art, not booking states. */
:root[data-seasonal-theme="eighties-warm-up-tape"] {
  --bg: #eaf5f2;
  --panel: #fcfefd;
  --soft: #f0f7f5;
  --line: #d0e2dc;
  --ink: #213b3a;
  --muted: #4c645f;
  --warm-header: #14666b;
  --warm-raised: #e0f0eb;
  --warm-hover: #d2e9e1;
  --seasonal-accent: #ff8273;
  --retro-selected: #b63748;
  --retro-selected-hover: #952b3b;
  --seasonal-header-art: url("eighties-warm-up-bix.webp");
  --seasonal-header-corner: url("eighties-memphis.svg");
  --seasonal-icon: url("eighties-vhs.svg");
}

:root[data-seasonal-theme="eighties-night-class"] {
  --bg: #edf0f9;
  --panel: #fdfdff;
  --soft: #f2f4fa;
  --line: #d7dff0;
  --ink: #243454;
  --muted: #52617c;
  --warm-header: #202d51;
  --warm-raised: #e8ebf7;
  --warm-hover: #dfe4f4;
  --seasonal-accent: #6ee2ef;
  --retro-selected: #a82464;
  --retro-selected-hover: #881d52;
  --seasonal-header-art: url("eighties-night-class-bix.webp");
  --seasonal-header-corner: url("eighties-studio-lights.svg");
  --seasonal-icon: url("eighties-lightning.svg");
}

:root[data-seasonal-theme^="eighties-"] header { background-size: 136px auto; }
:root[data-seasonal-theme^="eighties-"] { --booker-tagline: #e0ecef; }
:root[data-seasonal-theme^="eighties-"] .brand-tagline { color: var(--booker-tagline); }
:root[data-seasonal-theme^="eighties-"] .week-strip .selected-day-button {
  background: var(--retro-selected);
  color: #fff;
}
:root[data-seasonal-theme^="eighties-"] .week-strip .selected-day-button:hover {
  background: var(--retro-selected-hover);
}
@media (max-width: 760px) {
  :root[data-seasonal-theme^="eighties-"] header { background-size: 104px auto; }
}
