/*
 * EatDrinkTable Buchungs-Panel — Off-Canvas-Styles.
 *
 * Panel + Backdrop sind permanent im DOM (für Pre-Load des iFrames).
 * Sichtbarkeit über CSS-Klasse .is-open auf beiden Elementen.
 * visibility:hidden im geschlossenen Zustand nimmt das Panel aus der
 * Tab-/AT-Order (zusammen mit inert auf den anderen Body-Kindern).
 */

/* Backdrop */
.edt-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.edt-panel-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Panel */
.edt-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 440px;
    /* Safari-Adressleiste: 100vh als Fallback, 100dvh wenn unterstützt. */
    height: 100vh;
    height: 100dvh;
    background: #fffdf7; /* neutrales Ivory — CI kommt aus dem Widget */
    z-index: 99999;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}

.edt-panel.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s linear 0s;
}

/* Header */
.edt-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e5e0d4;
    flex-shrink: 0;
    background: #fffdf7;
}

.edt-panel-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #2d2419;
    letter-spacing: 0.02em;
}

/* Close-Button — großzügige Tap-Area fürs iPad */
.edt-panel-close {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 10px;
    margin: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b6357;
    border-radius: 8px;
    min-width: 44px;
    min-height: 44px;
}

.edt-panel-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #2d2419;
}

.edt-panel-close:focus-visible {
    outline: 2px solid #2d2419;
    outline-offset: 2px;
}

/* Body: scrollt vertikal, falls Widget-Höhe > Panel-Höhe (kritisch für
   Mobile, sonst klippt der CTA unten weg). */
.edt-panel-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fffdf7;
}

.edt-panel-body iframe {
    display: block;
    width: 100%;
    border: 0;
    /* Mindesthöhe bis der Resize-Listener vom Widget-Host die echte
       Content-Höhe setzt. */
    min-height: 600px;
    background: transparent;
}

/* Trigger: minimaler Default — User kann via class="..."-Attribut oder
   eigene CSS-Klasse beliebig stylen. */
.edt-panel-trigger {
    cursor: pointer;
}

/* Mobile: Panel volle Breite */
@media (max-width: 480px) {
    .edt-panel {
        max-width: 100%;
    }
}
