/* =====================================================
   Samowar Lunch Popup – Frontend-Styles v1.1.0
   ===================================================== */

/* ── Overlay ── */
.slp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--slp-overlay-bg, rgba(0, 0, 0, 0.72));
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    z-index: 999999;
    padding: 16px;
    align-items: center;
    justify-content: center;
}

.slp-overlay.slp-visible {
    display: flex;
    animation: slpFadeIn 0.3s ease forwards;
}

/* ── Popup-Fenster ── */
.slp-popup {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--slp-popup-bg, #ffffff);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.06);
    border-radius: 0;
    animation: slpSlideUp 0.4s cubic-bezier(0.34, 1.28, 0.64, 1) forwards;

    /* ── Desktop-Grundgröße: ~50 × 50 % Viewport ── */
    width: 50vw;
    min-width: 480px;
    max-width: 960px;
    height: 50vh;
    min-height: 380px;
}

/* ── Inhaltsbereich: zentriert, scrollbar ── */
.slp-popup-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;

    /* Inhalt horizontal & vertikal zentrieren */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 40px 50px;
    text-align: center;
    width: 100%;
}

/* Alle direkten Kinder bekommen max. Popup-Breite */
.slp-popup-content > * {
    max-width: 100%;
    width: 100%;
}

/* Wenn der Inhalt größer als das Fenster ist: oben ausrichten statt überlaufen */
@media (max-height: 500px) {
    .slp-popup-content {
        justify-content: flex-start;
    }
}

/* ── X-Schließen-Button: immer oben rechts, über Divi-Inhalt ── */
.slp-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 99999;          /* Über jeglichem Divi-Content */
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.15s ease, background 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.slp-close:hover {
    transform: scale(1.1);
}

/* Dunkler Stil – für helle Divi-Hintergründe (Standard) */
.slp-close--dark {
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.slp-close--dark:hover {
    background: rgba(0, 0, 0, 0.78);
}

/* Heller Stil – für dunkle Divi-Hintergründe */
.slp-close--light {
    background: rgba(255, 255, 255, 0.75);
    color: #1a1a1a;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.slp-close--light:hover {
    background: rgba(255, 255, 255, 0.96);
}

/* ──────────────────────────────────────────────────
   RESPONSIVE BREAKPOINTS
────────────────────────────────────────────────── */

/* ── Tablet: 601–1024 px ── */
@media (min-width: 601px) and (max-width: 1024px) {
    .slp-popup {
        width: 75%;
        min-width: 0;
        height: auto;
        min-height: 0;
        max-height: 78vh;
    }
}

/* ── Mobile: ≤ 600 px ── */
@media (max-width: 600px) {
    .slp-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .slp-popup {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 90vh;
        min-height: 0;
        border-radius: 0;
        animation: slpSlideUpMobile 0.36s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
    }
}

/* ──────────────────────────────────────────────────
   ANIMATIONEN
────────────────────────────────────────────────── */

@keyframes slpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slpSlideUp {
    from { opacity: 0; transform: translateY(32px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

@keyframes slpSlideUpMobile {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0);    }
}

