/*
 * Winter / New Year theme. Loaded only between the dates in app/view.php
 * (WINTER_FROM, WINTER_TO). Small touches only: slow snow behind the blue
 * banners, a snowflake by the greeting and a scarf on the assistant.
 * <html class="no-winter"> (set by the menu switch) hides everything.
 */

/* Slow snow inside the dashboard banner and the sign-in showcase. */
.winter-snow { position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: url("winter-snow.svg"), url("winter-snow-far.svg"); background-size: 240px 240px, 160px 160px; background-repeat: repeat; opacity: .55; animation: winter-fall 38s linear infinite; }
.login-showcase .winter-snow { z-index: 2; opacity: .5; }
@keyframes winter-fall { from { background-position: 0 0, 30px 0; } to { background-position: 0 240px, 30px 160px; } }

/* A small snowflake beside the greeting, and the New Year wish. */
.winter-flake { display: inline-grid; place-items: center; width: 26px; height: 26px; color: var(--sky); }
.winter-flake svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; animation: winter-turn 14s linear infinite; }
.winter-wish { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid #d6e7f8; background: linear-gradient(120deg, #eef5ff, #e9f8fb); color: var(--blue); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
@keyframes winter-turn { to { transform: rotate(360deg); } }

/* The assistant wears a warm scarf. */
.assistant-scarf { position: absolute; left: 50%; bottom: -8px; width: 72px; transform: translateX(-50%); pointer-events: none; filter: drop-shadow(0 3px 4px #0000002e); }
.assistant-scarf svg { display: block; width: 100%; height: auto; }
.assistant-scarf .scarf-band, .assistant-scarf .scarf-tail { fill: #e5484d; }
.assistant-scarf .scarf-tail { fill: #cf3a40; }
.assistant-scarf .scarf-stripe { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; opacity: .92; }
@media (max-width: 760px) { .assistant-scarf { width: 62px; bottom: -7px; } .sidebar-footer .winter-switch { display: none; } }

/* Menu switch. */
.winter-switch { display: inline-flex; align-items: center; gap: 6px; width: auto; min-height: 0; margin: 10px 8px 0; padding: 4px 0; border: 0; background: transparent; color: #536984; font-size: 11px; font-weight: 500; box-shadow: none; cursor: pointer; }
.winter-switch:hover { background: transparent; color: var(--blue); box-shadow: none; }
.bottom-more-menu .winter-switch { display: flex; width: 100%; margin: 0; padding: 12px 14px; font-size: 13px; color: var(--ink); }

/* Switched off on this device. */
.no-winter .winter-snow, .no-winter .winter-flake, .no-winter .winter-wish, .no-winter .assistant-scarf { display: none; }

@media (prefers-reduced-motion: reduce) { .winter-snow, .winter-flake svg { animation: none; } }
@media print { .winter-snow, .winter-flake, .winter-wish { display: none; } }

/* Dark mode. */
:root[data-theme="dark"] .winter-wish { border-color: var(--blue-line); background: linear-gradient(120deg, #182a44, #13303a); color: var(--link); }
:root[data-theme="dark"] .winter-flake { color: #8fbaf0; }
:root[data-theme="dark"] .winter-switch { color: #9fb0c6; }
:root[data-theme="dark"] .winter-switch:hover { color: var(--link); }

:root[data-theme="dark"] .bottom-more-menu .winter-switch { color: var(--ink); }
