/*
 * Seasonal winter / christmas design for the login page.
 * Only loaded when the winter design is active (see SeasonalDesignHelper).
 * All decorations are purely visual: no pointer events, hidden from screen readers
 * and never placed on top of content.
 */

/* ---------- Snowfall ---------- */

.winter-snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Behind all content: the body background is painted on the root, so the canvas is still visible */
    z-index: -1;
    pointer-events: none;
    user-select: none;
}

/* ---------- Winter hat on the login box ---------- */

/* Extra space above the box so the hat is never cut off */
body.winter-design #landing-page-modal {
    margin-top: 2rem !important;
}

body.winter-design #landing-page-modal::before {
    content: "";
    position: absolute;
    top: -34px;
    left: -30px;
    width: 96px;
    height: 78px;
    pointer-events: none;
    user-select: none;
    transform: rotate(-24deg);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='80' viewBox='0 0 100 80'%3E%3Cpath d='M12 60 C22 28 48 6 80 12 C73 26 77 44 88 60 Z' fill='%23c90a0e'/%3E%3Cpath d='M58 58 C62 40 66 24 80 12 C73 26 77 44 88 60 Z' fill='%239e0a0c'/%3E%3Crect x='4' y='54' width='92' height='19' rx='9.5' fill='%23ffffff' stroke='%23d5dbe0' stroke-width='1.5'/%3E%3Ccircle cx='20' cy='62' r='1.6' fill='%23e3e8ec'/%3E%3Ccircle cx='42' cy='66' r='1.6' fill='%23e3e8ec'/%3E%3Ccircle cx='64' cy='61' r='1.6' fill='%23e3e8ec'/%3E%3Ccircle cx='82' cy='66' r='1.6' fill='%23e3e8ec'/%3E%3Ccircle cx='82' cy='12' r='9.5' fill='%23ffffff' stroke='%23d5dbe0' stroke-width='1.5'/%3E%3C/svg%3E");
}

/* Small screens: little space left of the box, use a smaller hat closer to the corner */
@media (max-width: 768px) {
    body.winter-design #landing-page-modal::before {
        top: -26px;
        left: -10px;
        width: 70px;
        height: 57px;
    }
}

/* Accessibility: no animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .winter-snow {
        display: none;
    }
}

/* No decorations when printing */
@media print {
    .winter-snow,
    body.winter-design #landing-page-modal::before {
        display: none !important;
    }
}
