/* Weihnachts-Popup – nur auf der Startseite eingebunden */

.weihnachtspopup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 1rem 1rem;
}

/* Damit das Popup beim Schließen vollständig verschwindet */
.weihnachtspopup[hidden] {
    display: none;
}

.weihnachtspopup__background {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

/* Das Bild selbst bleibt unverändert: nur proportional skalieren */
.weihnachtspopup__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
}

.weihnachtspopup__image img {
    display: block;
    max-width: 92vw;
    max-width: min(92vw, 1100px);
    max-height: calc(100vh - 7rem);
    max-height: calc(100dvh - 7rem);
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Schnee-Ebenen hinter und vor dem Bild – Inhalte kommen aus snowfall.js */
.weihnachtspopup__snow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.weihnachtspopup__snow--back {
    z-index: 0;
}

.weihnachtspopup__snow--front {
    z-index: 1;
}

/* X-Button am oberen rechten Rand des Bildes */
.weihnachtspopup__close {
    position: absolute;
    top: clamp(0.85rem, 2vw, 1.5rem);
    right: clamp(0.85rem, 2vw, 1.5rem);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0 0 2px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.weihnachtspopup__close:hover,
.weihnachtspopup__close:focus-visible {
    background: rgba(5, 116, 187, 0.92);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .weihnachtspopup {
        padding: 4rem 0.5rem 0.5rem;
    }

    .weihnachtspopup__image img {
        max-width: 96vw;
        max-height: calc(100vh - 6rem);
        max-height: calc(100dvh - 6rem);
    }

    .weihnachtspopup__close {
        width: 40px;
        height: 40px;
        font-size: 1.75rem;
    }
}
