/* JusticeNET's seasons (dojseason.js): a touch of the season on the portal and the public site. */
body[class*="doj-season-"] { --season-accent: var(--sl-gold); }
body.doj-season-halloween { --season-accent: #e8731a; }
body.doj-season-autumn { --season-accent: #c8641e; }
body.doj-season-christmas { --season-accent: #c8263a; }
body[class*="doj-season-"] .sidebar { border-right-color: var(--season-accent); }
body[class*="doj-season-"] .public-header { border-bottom-color: var(--season-accent); position: relative; }
body[class*="doj-season-"] .topbar { box-shadow: inset 0 -2px 0 var(--season-accent); }
body.doj-season-halloween .public-header { background: linear-gradient(90deg, #1a1030 0%, var(--sl-navy) 55%, #3a1c08 100%); }
body.doj-season-autumn .public-header { background: linear-gradient(90deg, var(--sl-navy) 0%, var(--sl-navy) 55%, #4a2410 100%); }
body.doj-season-christmas .public-header { background: linear-gradient(90deg, #0d2a1c 0%, var(--sl-navy) 55%, #3a0d16 100%); }

/* The season's greeting next to the brand. */
.season-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  background: color-mix(in srgb, var(--season-accent) 16%, transparent); color: var(--season-accent); border: 1px solid color-mix(in srgb, var(--season-accent) 45%, transparent); }
.public-header .season-tag { color: #fff; background: color-mix(in srgb, var(--season-accent) 35%, transparent); }

/* Falling leaves, snow and bats: behind nothing you click, and gone for anyone who asks for less motion. */
.season-fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1040; }
.season-fx span { position: absolute; top: -40px; line-height: 1; opacity: .85; will-change: transform; animation: season-fall linear infinite; }
.season-fx i { position: absolute; top: -10px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 0 4px rgba(255, 255, 255, .6); animation: season-fall linear infinite; }
[data-bs-theme="light"] .season-fx i { background: #b9cbe0; box-shadow: none; }
.season-fx .bat { top: auto; animation: season-bat linear infinite; opacity: .7; }
@keyframes season-fall { to { transform: translate(var(--drift, 40px), 110vh) rotate(var(--spin, 360deg)); } }
@keyframes season-bat { 0% { transform: translateX(-60px) translateY(0); } 25% { transform: translateX(25vw) translateY(-18px); } 50% { transform: translateX(50vw) translateY(10px); } 75% { transform: translateX(75vw) translateY(-12px); } 100% { transform: translateX(calc(100vw + 60px)) translateY(0); } }

/* Christmas lights along the top of the header. */
.season-lights { position: absolute; left: 0; right: 0; top: 0; height: 14px; display: flex; justify-content: space-around; pointer-events: none; z-index: 2;
  background: linear-gradient(transparent 3px, rgba(30, 30, 30, .55) 3px 4px, transparent 4px); }
.season-lights b { width: 7px; height: 10px; margin-top: 3px; border-radius: 50% 50% 45% 45%; background: var(--c); box-shadow: 0 0 8px var(--c); animation: season-twinkle 1.6s ease-in-out infinite; }
.season-lights b:nth-child(4n+1) { --c: #ff4d5e; } .season-lights b:nth-child(4n+2) { --c: #ffd24d; animation-delay: -.4s; }
.season-lights b:nth-child(4n+3) { --c: #4dd88a; animation-delay: -.8s; } .season-lights b:nth-child(4n) { --c: #5aa8ff; animation-delay: -1.2s; }
@keyframes season-twinkle { 50% { opacity: .35; box-shadow: none; } }
.topbar .season-lights { top: auto; bottom: -8px; }

/* The switch to turn the falling things off (remembered in this browser). */
.season-toggle { position: fixed; right: 14px; bottom: 14px; z-index: 1045; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--sl-border, #ccc);
  background: var(--sl-surface, #fff); font-size: 18px; line-height: 1; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); cursor: pointer; }
.season-toggle.off { filter: grayscale(1); opacity: .6; }

@media (prefers-reduced-motion: reduce) { .season-fx, .season-toggle { display: none; } .season-lights b { animation: none; } }
@media print { .season-fx, .season-toggle, .season-lights, .season-tag { display: none !important; } }

/* A hat on the seal (doj-season.js). */
.season-hat-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.season-hat { position: absolute; left: 50%; top: 0; width: 82%; transform: translate(-50%, -62%) rotate(-14deg); transform-origin: 50% 100%; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); overflow: visible; }
.season-hat-halloween { width: 96%; transform: translate(-50%, -74%) rotate(-12deg); }
.public-header .season-hat-wrap { margin-top: 8px; }
.sidebar .brand { overflow: visible; }
@media print { .season-hat { display: none; } }
.sidebar .brand:has(.season-hat-wrap) { padding-top: 1.6rem; }
