/* Holiday theme. Linked only while christmas_season is true. */

html:not([data-theme="highContrast"]):not([data-theme="dark"]) {
    --primary-color: #1B4332 !important;
    --primary-hover: #143528 !important;
    --navbar-bg: #1B4332 !important;
    --btn-primary-bg: #1B4332 !important;
    --btn-primary-border: #1B4332 !important;
    --btn-secondary-bg: #9B2335 !important;
    --btn-secondary-border: #9B2335 !important;
    --wooden-bg: #1B4332 !important;
    --terracotta: #9B2335 !important;
    --foliage-green: #1B4332 !important;
    --mountain-green: #95D5B2 !important;
    --sun-gradient-start: #F7F3E9 !important;
    --sun-gradient-end: #F3D6D8 !important;
    --container-bg: linear-gradient(135deg, #F7F3E9 0%, #F3D6D8 100%) !important;
    --app-body-bg: linear-gradient(135deg, #F7F3E9 0%, #F3D6D8 100%) !important;
    --admin-container-bg: linear-gradient(135deg, #F7F3E9 0%, #F3D6D8 100%) !important;
    --main-content-bg: linear-gradient(135deg, #F7F3E9 0%, #F3D6D8 100%) !important;
    --bailey-primary: #1B4332;
    --bailey-accent: #9B2335;
    --bailey-light: #95D5B2;
}

html[data-theme="dark"] {
    --navbar-bg: #0D2818 !important;
    --wooden-bg: #0D2818 !important;
    --primary-color: #95D5B2 !important;
    --primary-hover: #2D6A4F !important;
    --btn-primary-bg: #1B4332 !important;
    --btn-primary-border: #95D5B2 !important;
    --btn-secondary-bg: #9B2335 !important;
    --btn-secondary-border: #C6A15B !important;
    --terracotta: #C4505A !important;
    --foliage-green: #2D6A4F !important;
    --mountain-green: #95D5B2 !important;
    --navbar-color: #F7F3E9 !important;
    --bailey-primary: #1B4332;
    --bailey-accent: #C6A15B;
}

html.christmas .marketing-navbar {
    padding-top: 46px !important;
}

.custom-navbar {
    border-bottom: 3px solid #C6A15B !important;
}

.nav-cta-start {
    background: #9B2335 !important;
}

.nav-cta-start:hover {
    background: #7d1c2b !important;
}

.hero-section::before,
.banner-overlay {
    background: linear-gradient(180deg, rgba(12, 28, 22, 0.28) 0%, rgba(18, 14, 12, 0.42) 100%) !important;
}

.cta-button {
    background: linear-gradient(135deg, #1B4332 0%, #9B2335 100%);
    box-shadow: 0 4px 15px rgba(27, 67, 50, 0.35);
}

.cta-button:hover {
    background: linear-gradient(135deg, #9B2335 0%, #1B4332 100%);
    box-shadow: 0 6px 20px rgba(155, 35, 53, 0.35);
}

.bailey-chat-button {
    overflow: visible;
}

.bailey-chat-button .bailey-button-icon,
.bailey-chat-header-left img,
.bailey-header-left img {
    object-fit: cover;
    object-position: center 18%;
    border-radius: 18px;
}

/* A few glass bulbs on short cords. No drawn wire. Clicks pass through. */
.christmas-lights {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    z-index: 1001;
    pointer-events: none;
    overflow: hidden;
}

.christmas-bulb {
    --glow: rgba(255, 70, 70, 0.75);
    position: absolute;
    left: calc(6% + var(--i) * 11%);
    width: 16px;
    height: 20px;
    margin-left: -8px;
    border-radius: 46% 46% 50% 50% / 40% 40% 60% 60%;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px),
        radial-gradient(circle at 42% 38%, rgba(255, 255, 255, 0.45) 0 18%, var(--bulb, #e23b3b) 46%, var(--bulb-deep, #8e1c24) 100%);
    box-shadow: 0 0 6px 1px var(--glow);
    animation: bulb-twinkle 2.8s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.45s);
}

.christmas-bulb::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 4px;
    width: 8px;
    height: 4px;
    border-radius: 2px 2px 0 0;
    background: #2a241c;
}

.christmas-bulb:nth-child(4n + 1) { top: 12px; }
.christmas-bulb:nth-child(4n + 2) { top: 24px; }
.christmas-bulb:nth-child(4n + 3) { top: 16px; }
.christmas-bulb:nth-child(4n) { top: 30px; }

.christmas-bulb--red { --bulb: #e23b3b; --bulb-deep: #8e1c24; --glow: rgba(226, 59, 59, 0.8); }
.christmas-bulb--gold { --bulb: #f0c14a; --bulb-deep: #a67c00; --glow: rgba(240, 193, 74, 0.8); }
.christmas-bulb--green { --bulb: #3cba6a; --bulb-deep: #146b32; --glow: rgba(60, 186, 106, 0.7); }
.christmas-bulb--ice { --bulb: #6eb5ff; --bulb-deep: #1a4f86; --glow: rgba(110, 181, 255, 0.75); }

.christmas-bulb:nth-child(3n) { animation-duration: 1.8s; }

@keyframes bulb-twinkle {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 6px 1px var(--glow);
    }
    50% {
        opacity: 0.55;
        box-shadow: 0 0 2px 0 transparent;
    }
}

.christmas-snow {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 4;
}

.christmas-snow--hero {
    height: 680px;
}

.christmas-snow--banner {
    height: 300px;
}

.christmas-snow span {
    position: absolute;
    top: -12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    animation: christmas-fall linear infinite;
}

.christmas-snow span:nth-child(1) { left: 6%; animation-duration: 9s; animation-delay: 0s; }
.christmas-snow span:nth-child(2) { left: 14%; animation-duration: 12s; animation-delay: 1.2s; width: 5px; height: 5px; }
.christmas-snow span:nth-child(3) { left: 22%; animation-duration: 8s; animation-delay: 2s; }
.christmas-snow span:nth-child(4) { left: 31%; animation-duration: 11s; animation-delay: 0.4s; width: 4px; height: 4px; }
.christmas-snow span:nth-child(5) { left: 40%; animation-duration: 10s; animation-delay: 1.8s; }
.christmas-snow span:nth-child(6) { left: 48%; animation-duration: 13s; animation-delay: 0.8s; width: 5px; height: 5px; }
.christmas-snow span:nth-child(7) { left: 57%; animation-duration: 9.5s; animation-delay: 2.4s; }
.christmas-snow span:nth-child(8) { left: 66%; animation-duration: 11.5s; animation-delay: 0.2s; width: 4px; height: 4px; }
.christmas-snow span:nth-child(9) { left: 74%; animation-duration: 8.5s; animation-delay: 1.5s; }
.christmas-snow span:nth-child(10) { left: 83%; animation-duration: 12.5s; animation-delay: 2.8s; }
.christmas-snow span:nth-child(11) { left: 91%; animation-duration: 10.5s; animation-delay: 0.6s; width: 5px; height: 5px; }
.christmas-snow span:nth-child(12) { left: 97%; animation-duration: 9s; animation-delay: 1.9s; }

@keyframes christmas-fall {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 0.9; }
    100% { transform: translateY(680px); opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
    .christmas-bulb,
    .christmas-snow span {
        animation: none;
    }

    .christmas-bulb {
        opacity: 1;
        filter: none;
    }

    .christmas-snow span {
        top: 28px;
        opacity: 0.85;
    }
}
