/* =========================================================================
   Collapsible menu sections + the "Sticker" theme: TNSVSDA Sticker Management (app shell only: html.theme-sticker body.admin).
   "Midnight & Antique Gold": a deep midnight menu with hairline dividers and a gold marker, an ivory canvas, white panels, serif display
   headings and two sparing accents taken from the sticker tape (antique gold, claret).
   Every animation stops for people who prefer reduced motion.
   ========================================================================= */

/* ---------- collapsible rail sections ---------- */
.rail-group-btn { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: calc(100% - 1.3rem); margin: 1.1rem .65rem .4rem; padding: .15rem 0; background: none; border: 0; text-align: left; cursor: pointer; border-radius: var(--r-sm); }
.rail-group-btn i { font-size: .7rem; transition: transform .2s ease; }
.rail-group.is-collapsed .rail-group-btn i { transform: rotate(-90deg); }
.rail-group .rail-list { animation: rail-open .18s ease; }
.rail-group .rail-list[hidden] { display: none; }
@keyframes rail-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* two menus: the membership one, and the Sticker platform one (only while the theme is on) */
.rail-nav-sticker { display: none; }
html.theme-sticker .rail-nav-classic { display: none; }
html.theme-sticker .rail-nav-sticker { display: block; }
.rail-soon { margin-left: auto; padding: .02rem .5rem; border-radius: 999px; background: #eff1f4; color: #6a7889; font-size: .58rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- the Sticker button in the top bar ---------- */
.sticker-btn { position: relative; display: inline-flex; align-items: center; gap: .55rem; padding: .32rem .95rem .32rem .4rem; border: 1px solid #c4962a; border-radius: 999px; background: linear-gradient(135deg, #f8e19a 0%, #e5b84f 52%, #c9932a 100%); background-size: 160% 160%; color: #0b1f3f; font-weight: 800; font-size: var(--fs-sm); letter-spacing: .02em; overflow: hidden; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 4px 12px -4px rgba(169, 120, 22, .6); transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease, background-position .5s ease, color .35s ease, border-color .35s ease; animation: sticker-pulse 3.4s ease-out infinite; }
.sticker-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%); transform: translateX(-120%); animation: sticker-shine 3.6s ease-in-out infinite; pointer-events: none; }
.sticker-btn:hover { transform: translateY(-2px) scale(1.035); background-position: 100% 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 10px 20px -6px rgba(169, 120, 22, .65); animation-play-state: paused; }
.sticker-btn:active { transform: scale(.95); transition-duration: .08s; }
.sticker-btn:focus-visible { outline: 2px solid #0b1f3f; outline-offset: 2px; }
.sticker-badge { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: radial-gradient(circle at 30% 28%, #1f4380, #0b1f3f 70%); color: #f6dd8f; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); animation: sticker-wobble 5s ease-in-out infinite; transition: background .35s ease, color .35s ease, transform .35s ease; }
/* on: a deep navy-to-claret face with gold text, and a live dot */
.sticker-btn[aria-pressed="true"] { background: linear-gradient(135deg, #0e2a54 0%, #1b3a6b 50%, #7d2a36 100%); background-size: 160% 160%; border-color: #d8b45a; color: #f6e3a8; box-shadow: 0 0 0 1px rgba(216, 180, 90, .35), 0 8px 18px -8px rgba(11, 31, 63, .7); animation: none; }
.sticker-btn[aria-pressed="true"]::after { background: linear-gradient(110deg, transparent 35%, rgba(246, 227, 168, .35) 50%, transparent 65%); }
.sticker-btn[aria-pressed="true"] .sticker-badge { background: radial-gradient(circle at 30% 28%, #fff1bd, #d8b45a 70%); color: #0b1f3f; transform: rotate(360deg); }
.sticker-btn[aria-pressed="true"] [data-sticker-label]::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-right: .4rem; border-radius: 50%; background: #5eea9c; box-shadow: 0 0 0 0 rgba(94, 234, 156, .7); vertical-align: .08rem; animation: sticker-live 1.8s ease-out infinite; }
@keyframes sticker-pulse { 0% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 4px 12px -4px rgba(169, 120, 22, .6), 0 0 0 0 rgba(216, 168, 52, .55); } 70%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 4px 12px -4px rgba(169, 120, 22, .6), 0 0 0 .65rem rgba(216, 168, 52, 0); } }
@keyframes sticker-live { 0% { box-shadow: 0 0 0 0 rgba(94, 234, 156, .7); } 70%, 100% { box-shadow: 0 0 0 .4rem rgba(94, 234, 156, 0); } }
@keyframes sticker-shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes sticker-wobble { 0%, 88%, 100% { transform: rotate(0); } 92% { transform: rotate(-12deg) scale(1.06); } 96% { transform: rotate(8deg) scale(1.06); } }
@media (max-width: 575.98px) { .sticker-btn [data-sticker-label] { display: none; } .sticker-btn { padding-right: .4rem; } }

/* circular wipe that plays while the theme switches: a soft sweep */
.sticker-wipe { position: fixed; inset: 0; z-index: 3000; pointer-events: none; clip-path: circle(0 at var(--x) var(--y)); animation: sticker-wipe .9s cubic-bezier(.65, 0, .35, 1) forwards; }
.sticker-wipe.to-sticker { background: radial-gradient(circle at var(--x) var(--y), #101a28, #182535 60%, #0a1019); }
.sticker-wipe.to-classic { background: radial-gradient(circle at var(--x) var(--y), #eef2f9, #dfe6f2 60%, #fff); }
@keyframes sticker-wipe { 0% { clip-path: circle(0 at var(--x) var(--y)); opacity: .96; } 45% { clip-path: circle(150vmax at var(--x) var(--y)); opacity: .96; } 100% { clip-path: circle(150vmax at var(--x) var(--y)); opacity: 0; } }

/* ---------- the Sticker palette ----------
   Limited to the signed-in app shell (body.admin): the public site and the sign-in pages never change.
   The brand "navy" scale is re-pointed at deep midnight ink and the gold scale at antique gold, so buttons, links, headings and panels follow. */
html.theme-sticker body.admin {
  --navy-950: #0a1019; --navy-900: #101a28; --navy-800: #182535; --navy-700: #24344a; --navy-600: #3b4c63; --navy-500: #62728a;
  --navy-300: #a7b2c2; --navy-200: #d9dfe8; --navy-100: #ebeef3; --navy-50: #f5f6f9;
  --gold-300: #e4cd96; --gold-400: #c3a05a; --gold-500: #a98536; --gold-700: #7a5c1c; --gold-100: #f1e8d2; --gold-50: #faf7ee;
  --stk-claret: #7d2a36; --stk-claret-dark: #5f1f29; --rose-50: #fcf1f2; --rose-100: #f5dcdf; --rose-300: #dba3aa; --rose-500: #b0505c;
  --surface: #f6f5f1; --line: #e7e4dc; --line-strong: #d3cfc4; --control-border: #98a0ad;
  --font-display: 'Source Serif 4 Variable', 'Source Serif 4', Georgia, 'Times New Roman', serif;
  /* Bootstrap derives its own variables at :root, so the ones the app reads are set again here */
  --bs-heading-color: #101a28; --bs-emphasis-color: #101a28; --bs-primary: #101a28; --bs-primary-rgb: 16, 26, 40;
  --bs-link-color: #7d2a36; --bs-link-color-rgb: 125, 42, 54; --bs-link-hover-color: #5f1f29; --bs-link-hover-color-rgb: 95, 31, 41;
  --bs-tertiary-bg: #f5f6f9; --bs-border-color: #e7e4dc;
  --focus: #a98536;
  --ring: 0 0 0 3px rgba(195, 160, 90, .32);
}

/* ---------- menu: deep midnight, hairline dividers, a gold marker for the current page ---------- */
html.theme-sticker body.admin .rail-col { background: #0d1522; box-shadow: 1px 0 0 rgba(255, 255, 255, .04); }
html.theme-sticker body.admin .rail { --bs-offcanvas-bg: #0d1522; --bs-offcanvas-color: #c4ccd8; color: #c4ccd8 !important; background: linear-gradient(180deg, #0f1826 0%, #0b121d 100%); }
html.theme-sticker body.admin .rail-head { border-bottom: 1px solid rgba(255, 255, 255, .07); padding: 1.3rem 1.2rem 1.2rem; }
html.theme-sticker body.admin .rail-brand, html.theme-sticker body.admin .rail-brand:hover { color: #fff; }
html.theme-sticker body.admin .rail-brand-sticker { gap: .85rem; }
html.theme-sticker body.admin .rail-brand-mark { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 12px; background: linear-gradient(155deg, #1c2a3f, #0a111b); box-shadow: inset 0 0 0 1px rgba(195, 160, 90, .6), 0 8px 18px rgba(0, 0, 0, .35); }
html.theme-sticker body.admin .rail-brand-kicker { color: var(--gold-400); }
html.theme-sticker body.admin .rail-brand-sticker b { color: #fff; font-family: var(--font-display); font-weight: 600; letter-spacing: 0; }
html.theme-sticker body.admin .rail-brand-sticker small { color: #8794a8; }
html.theme-sticker body.admin .rail-head .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }
html.theme-sticker body.admin .rail-nav { scrollbar-width: thin; scrollbar-color: #2a3a52 transparent; }
html.theme-sticker body.admin .rail-heading { color: #6f7d92; }
html.theme-sticker body.admin .rail-group-btn:hover { color: #fff; }
html.theme-sticker body.admin .rail-link { color: #b9c3d1; font-weight: 500; transition: background .18s ease, color .18s ease; }
html.theme-sticker body.admin .rail-link i.lead-ic { color: #70809a; transition: color .18s ease; }
html.theme-sticker body.admin .rail-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }
html.theme-sticker body.admin .rail-link:hover i.lead-ic { color: var(--gold-300); }
html.theme-sticker body.admin .rail-link.active { color: #fff; font-weight: 600; background: linear-gradient(90deg, rgba(195, 160, 90, .20), rgba(195, 160, 90, .05)); box-shadow: inset 0 0 0 1px rgba(195, 160, 90, .22); }
html.theme-sticker body.admin .rail-link.active::before { background: linear-gradient(180deg, var(--gold-300), var(--gold-500)); }
html.theme-sticker body.admin .rail-link.active i.lead-ic { color: var(--gold-300); }
html.theme-sticker body.admin .rail-soon { background: rgba(255, 255, 255, .07); color: #8f9db2; }
html.theme-sticker body.admin .rail-link.active .rail-soon { background: rgba(195, 160, 90, .2); color: var(--gold-300); }
html.theme-sticker body.admin .rail-count { background: var(--gold-400); color: #0a1019; }
html.theme-sticker body.admin .rail-foot { color: #6f7d92; border-top: 1px solid rgba(255, 255, 255, .07); }
html.theme-sticker body.admin .rail-link:focus-visible, html.theme-sticker body.admin .rail-group-btn:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 2px; }

/* top bar: translucent ivory with a hairline */
html.theme-sticker body.admin .topbar { border-bottom: 1px solid var(--line); box-shadow: none; }
html.theme-sticker body.admin .monogram { background: linear-gradient(145deg, #1c2a3f, #0a111b); color: var(--gold-300); box-shadow: inset 0 0 0 1px rgba(195, 160, 90, .6); }
html.theme-sticker body.admin .user-btn .who small { color: var(--gold-700); }

@media (prefers-reduced-motion: reduce) {
  .sticker-btn, .sticker-btn::after, .sticker-btn [data-sticker-label]::before, .sticker-badge, .rail-group .rail-list, .sticker-wipe { animation: none !important; }
  .sticker-btn, .sticker-btn:hover, .sticker-btn:active { transition: none; transform: none; }
  html.theme-sticker body.admin .rail-link { transition: none; }
}

/* the dispatch team always works in Sticker: the button stays lit but cannot be switched off */
.sticker-btn:disabled { cursor: default; opacity: 1; pointer-events: none; }
