/* Christmas Eve: seasonal theme (original artwork). Snow and lights are decorative
   and never receive clicks; they sit behind content or in empty margins. */
:root {
    --xmas-night: #0f1b33;
    --xmas-ink: #1c2740;
    --xmas-red: #a3202a;
    --xmas-green: #1f6b45;
    --xmas-soft: #e8eef8;
    --xmas-snow-small:
        radial-gradient(circle at 18px 26px, #ffffffd9 0 1.6px, transparent 2.4px),
        radial-gradient(circle at 92px 70px, #ffffffb3 0 1.3px, transparent 2px),
        radial-gradient(circle at 160px 14px, #ffffffcc 0 1.8px, transparent 2.6px),
        radial-gradient(circle at 210px 130px, #ffffffa6 0 1.2px, transparent 2px),
        radial-gradient(circle at 54px 176px, #ffffffd9 0 1.6px, transparent 2.4px),
        radial-gradient(circle at 128px 214px, #ffffffb3 0 1.4px, transparent 2.2px),
        radial-gradient(circle at 196px 196px, #ffffffcc 0 1.2px, transparent 2px),
        radial-gradient(circle at 70px 110px, #ffffff99 0 1px, transparent 1.8px);
    --xmas-snow-big:
        radial-gradient(circle at 40px 60px, #fffffff2 0 3px, transparent 4.2px),
        radial-gradient(circle at 250px 30px, #ffffffd9 0 2.4px, transparent 3.4px),
        radial-gradient(circle at 360px 210px, #ffffffe6 0 3.2px, transparent 4.4px),
        radial-gradient(circle at 150px 290px, #ffffffcc 0 2.6px, transparent 3.6px),
        radial-gradient(circle at 300px 380px, #fffffff2 0 2.2px, transparent 3.2px),
        radial-gradient(circle at 70px 400px, #ffffffd9 0 2.8px, transparent 4px);
}

/* ---------- Snow (body layers sit behind every in-flow block) ---------- */
body.theme-christmas::before,
body.theme-christmas::after,
.theme-landing main > section:first-child::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
    will-change: transform;
}
body.theme-christmas::before {
    top: -240px;
    background-image: var(--xmas-snow-small);
    background-size: 240px 240px;
    animation: xmas-snow-small 22s linear infinite;
}
body.theme-christmas::after {
    top: -420px;
    background-image: var(--xmas-snow-big);
    background-size: 420px 420px;
    animation: xmas-snow-big 17s linear infinite;
}
@keyframes xmas-snow-small {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(0, 240px, 0); }
}
@keyframes xmas-snow-big {
    0% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(18px, 210px, 0); }
    100% { transform: translate3d(0, 420px, 0); }
}

/* ---------- Hanging lights under headers ---------- */
.theme-public .league-public-header::after,
.theme-landing > header::after,
.theme-registration > header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 26px;
    background: url('../../images/themes/christmas-lights.svg') center top / auto 26px repeat-x;
    pointer-events: none;
}
.theme-registration > header { position: relative; }

/* ---------- Organization admin ---------- */
body.theme-admin {
    background:
        url('../../images/themes/christmas-lights.svg') center 4px / auto 34px repeat-x,
        var(--xmas-night) url('../../images/themes/christmas-eve.svg') center -60px / max(100%, 1440px) auto no-repeat;
}
.theme-admin .theme-shell { margin: 86px 16px 16px; gap: 12px; }
.theme-admin .theme-sidebar {
    background: #ffffff;
    border: 1px solid #c9d3e4;
    border-radius: 24px;
    box-shadow: 0 12px 40px #0a143033;
}
.theme-admin .theme-workspace {
    border: 1px solid #ffffffb3;
    border-radius: 24px;
    background: #f6f8fc;
    box-shadow: 0 16px 48px #0a143040;
}
.theme-admin .theme-header {
    background: linear-gradient(180deg, #ffffff, #f7f9fd);
    border-bottom: 4px solid transparent;
    border-image: repeating-linear-gradient(135deg, var(--xmas-red) 0 10px, #ffffff 10px 20px, var(--xmas-green) 20px 30px, #ffffff 30px 40px) 4;
    border-radius: 24px 24px 0 0;
    min-height: 64px;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 12px;
}
.theme-admin .theme-main { background: transparent; }
.theme-admin .theme-workspace > footer { border-radius: 0 0 24px 24px; }
.theme-admin .theme-sidebar nav a,
.theme-admin .theme-sidebar nav button {
    color: var(--xmas-ink);
    font-weight: 600;
    min-height: 44px;
}
.theme-admin .theme-sidebar nav a:hover,
.theme-admin .theme-sidebar nav button:hover {
    background-color: var(--xmas-soft);
    color: var(--xmas-ink);
}
.theme-admin .theme-sidebar nav a[aria-current="page"],
.theme-admin .theme-sidebar nav button.bg-gray-100,
.theme-admin .theme-sidebar nav button.bg-blue-50 {
    background-color: var(--xmas-red);
    border-color: var(--xmas-red);
    color: #ffffff;
}
.theme-admin .theme-sidebar nav button.bg-gray-100 svg,
.theme-admin .theme-sidebar nav button.bg-blue-50 svg { color: inherit; }
.theme-admin .theme-sidebar nav a[data-small-club-locked] { color: #5b6478; }
.theme-admin .theme-header .border:not(.bg-blue-600) {
    background-color: #ffffff;
    border-color: #8d9ab3;
    color: var(--xmas-ink);
}
.theme-admin .theme-header .border:not(.bg-blue-600):hover { background-color: var(--xmas-soft); }
.theme-admin .theme-sidebar nav :is(a, button):focus-visible,
.theme-admin .theme-header :is(a, button):focus-visible,
.theme-landing > header a:focus-visible {
    outline: 3px solid var(--xmas-green);
    outline-offset: 3px;
}

/* ---------- Public league pages ---------- */
body.theme-public {
    background: var(--xmas-night) url('../../images/themes/christmas-eve.svg') center top / max(100%, 1500px) auto no-repeat;
}
.theme-public .league-public-header {
    background: linear-gradient(90deg, #0c1630f2, #0c1630c7, #0c1630f2);
    border-bottom-color: #ffffff26;
}
.theme-public .league-public-nav a {
    background: #16264a;
    border-color: #8ea3c9;
    color: #ffffff;
    font-size: .875rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.theme-public .league-public-nav a:hover { background: var(--xmas-red); border-color: #ffffff; }
.theme-public .league-public-nav a[aria-current="page"] { background: #ffffff; color: var(--xmas-night); border-color: #ffffff; }
.theme-public > .wrap { margin-top: 48px; }

/* ---------- Registration layout and landing ---------- */
body.theme-registration { background-color: #e6ecf6; }
.theme-registration > header,
.theme-landing > header {
    background: linear-gradient(180deg, #ffffff, #f4f7fc);
    border-color: #d3dceb;
}
.theme-landing > header nav {
    background: #ffffff;
    border: 1px solid #c9d3e4;
    border-radius: 16px;
    padding: 4px;
    gap: 2px;
}
.theme-landing > header nav a {
    color: var(--xmas-ink);
    font-weight: 600;
    padding: 12px 10px;
    border-radius: 12px;
}
.theme-landing > header nav a:hover { background: var(--xmas-soft); color: var(--xmas-red); }
.theme-landing > header a.border {
    background: #ffffff;
    border-color: #8d9ab3;
    color: var(--xmas-ink);
}
.theme-registration > main { margin-top: 48px; }
.theme-registration > main > div { border-radius: 24px; box-shadow: 0 20px 70px #0a143033; }
.theme-registration > footer { background: #fffffff5; }
.theme-landing main > section:first-child {
    background: linear-gradient(180deg, #0a143022, #0a1430d9 65%, #020617 100%), url('../../images/themes/christmas-eve.svg') center top / cover no-repeat;
}
.theme-landing main > section:first-child::before {
    position: absolute;
    z-index: auto;
    top: -420px;
    background-image: var(--xmas-snow-big), var(--xmas-snow-small);
    background-size: 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px,
        240px 240px, 240px 240px, 240px 240px, 240px 240px, 240px 240px, 240px 240px, 240px 240px, 240px 240px;
    animation: xmas-snow-big 17s linear infinite;
}
.theme-landing main > section:first-child > .pointer-events-none { display: none; }
.theme-landing main > section:first-child h1 { text-shadow: 0 2px 20px #0a143099; }
.theme-landing main > section:first-child > .relative { padding-top: 88px; }

@media (min-width: 768px) {
    .theme-admin .theme-sidebar { align-self: flex-start; min-height: calc(100vh - 104px); }
    .theme-admin .theme-workspace { min-height: calc(100vh - 104px); }
}
@media (max-width: 767px) {
    body.theme-admin { background-size: auto 26px, auto 330px; background-position: center 2px, 65% -35px; }
    .theme-admin .theme-shell { margin: 56px 8px 8px; gap: 0; }
    .theme-admin .theme-sidebar { border-radius: 0 22px 22px 0; }
    .theme-admin .theme-workspace { border-radius: 20px; }
    .theme-admin .theme-header { border-radius: 20px 20px 0 0; padding-inline: 12px; }
    .theme-admin .theme-main { padding: 16px 12px; }
    body.theme-public { background-size: auto 510px; background-position: 65% top; }
    .theme-public > .wrap, .theme-registration > main { margin-top: 32px; }
    .theme-landing main > section:first-child { background-size: auto 650px; background-color: #020617; background-position: 65% top; }
    .theme-landing main > section:first-child > .relative { padding-top: 56px; }
    /* Lighter snow on phones. */
    body.theme-christmas::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    body.theme-christmas::before,
    body.theme-christmas::after,
    .theme-landing main > section:first-child::before { animation: none; }
}
@media print {
    body.theme-christmas::before,
    body.theme-christmas::after,
    .theme-landing main > section:first-child::before,
    .theme-public .league-public-header::after,
    .theme-landing > header::after,
    .theme-registration > header::after { display: none; }
    body.theme-admin, body.theme-public { background: #fff; }
    .theme-admin .theme-header { border-image: none; border-bottom: 1px solid #e5e7eb; }
    .theme-public .league-public-header,
    .theme-registration > header,
    .theme-landing > header { background-image: none; }
    .theme-admin .theme-shell { margin: 0; }
    .theme-admin .theme-workspace { box-shadow: none; border: 0; }
    .theme-public > .wrap, .theme-registration > main { margin-top: 0; }
}
