/* --- Grid-Layout --- */
.cep-wrap {
    display: grid;
    grid-template-columns: 1fr;   /* mobile: stacked */
    gap: 24px;
}

/* ab Desktop: 2/3 – 1/3 */
@media (min-width: 1024px) {
    .cep-wrap {
        grid-template-columns: 2fr 1fr; /* 2/3 links, 1/3 rechts */
        align-items: start;
    }
}

/* --- Linke Spalte: scrollbare Liste mit fixer Höhe --- */
.cep-left { min-height: 0; } /* wichtig für korrektes Scrolling in CSS-Grids */

.cep-events {
    height: 60vh;             /* passe nach Bedarf an */
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #eaeaea;
    border-radius: 0;
    background: #fff;
    -webkit-overflow-scrolling: touch;
    padding: 6px 0;
}

/* Liste */
.cep-list { list-style: none; margin: 0; padding: 0; }

.cep-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background .15s ease;
    background: #fff;
}
.cep-item:hover { background: #f9fbff; }
.cep-item:last-child { border-bottom: none; }

.cep-item .line  { font-size: 16px; font-weight: 500; color:#2a2a2a; }
.cep-item .badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #d4af37; color:#fff; white-space: nowrap; }
.cep-item.active { background:#eaf6ff; }

/* Ausgebuchte Termine: visuell deaktiviert + nicht klickbar (JS blockt zusätzlich) */
.cep-item.is-soldout { background: #fde9dd; color:#7a7a7a; cursor: not-allowed; }
.cep-item.is-soldout .badge { background:#e86f4d; color:#fff; }
.cep-item.is-soldout:hover { background:#fde1d3; }

/* --- Rechte Spalte: nur Positionierung; Optik abhängig vom Formular-Typ --- */
.cep-right { position: sticky; top: 24px; align-self: start; }

/* Grüner Header (immer) */
.cep-form-header {
    background: #3e8365;   /* deine geänderte Farbe */
    color: #fff;
    padding: 14px 18px;
    border-radius: 0;
}
.cep-form-datetime { font-size: 14px; opacity: .95; margin-bottom: 6px; }
.cep-form-title    { font-size: 22px; font-weight: 600; line-height: 1.25; }

/* === Handoff: externes (Avada) Form → NICHT global überschreiben === */
.cep-booking.cep-handoff {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.cep-booking.cep-handoff .cep-form-header {
    margin-bottom: 16px;   /* kleiner Abstand zum Avada-Form */
    border-radius: 0px;   /* eigener Header mit runden Ecken */
}
.cep-booking.cep-handoff form {
    padding: 0 !important;             /* Avada steuert Abstände selbst */
    background: transparent !important;
    border: 0 !important;
}

/* === Nur unser Default-Form (ohne Avada) stylen === */
.cep-booking:not(.cep-handoff) {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
}
.cep-booking:not(.cep-handoff) .cep-default-form { padding: 16px; }

.cep-booking:not(.cep-handoff) .cep-default-form input,
.cep-booking:not(.cep-handoff) .cep-default-form textarea,
.cep-booking:not(.cep-handoff) .cep-default-form select {
    width: 100%;
    border: 1px solid #e4e4e4;
    border-radius: 0;
    padding: 10px 12px;
    margin: 6px 0;
    background: #fff;
    color: #222;
}

.cep-booking:not(.cep-handoff) .cep-default-form button {
    background: #26a69a;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    margin-top: 8px;
}

/* Optional: Scrollbar leicht stylen (WebKit) */
.cep-events::-webkit-scrollbar { width: 10px; }
.cep-events::-webkit-scrollbar-track { background: #f5f5f5; border-radius: 0; }
.cep-events::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 0; }
.cep-events::-webkit-scrollbar-thumb:hover { background: #bdbdbd; }

/* Empty-State, falls nichts geladen wird */
.cep-events:empty::before {
    content: "Keine kommenden Events gefunden.";
    display: block;
    padding: 16px;
    color: #666;
}
