/* Offene Informationsabende - Frontend (eigenstaendiges Basis-Styling).
   100%-Durchgaengigkeit der Form-Atome kommt spaeter ueber die Theme-Bridge
   (.as-ea-anmeldung in farning/_partials/_forms.scss). */

/* Breite an die Ferienkurs-Liste angeglichen (1180px, padding 0 16px) – Konsistenz. */
.as-ea-anmeldung { max-width: 1180px; margin: 0 auto; padding: 0 16px; color: #222D58; }

/* Termin-Cards */
.as-ea-cards { display: flex; flex-direction: column; gap: 14px; container-type: inline-size; }
.as-ea-card {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    border: 1px solid #E6E8EC; border-radius: 14px; padding: 18px 22px; background: #fff;
    box-shadow: 0 2px 10px rgba(34,45,88,0.05);
}
.as-ea-card-title { font-size: 18px; font-weight: 800; color: #005A84; margin-bottom: 2px; }
.as-ea-card-date { font-size: 15px; font-weight: 600; color: #222D58; }
.as-ea-card-loc a { color: inherit; text-decoration: none; }
.as-ea-card-loc a:hover { color: #005A84; text-decoration: underline; text-underline-offset: 2px; }
.as-ea-loc-icon { margin-left: 4px; color: #005A84; font-size: 0.85em; }
.as-ea-card-meta { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; font-size: 15px; color: #414968; }
.as-ea-meta-row { display: flex; align-items: flex-start; gap: 8px; line-height: 1.45; }
.as-ea-meta-icon { width: 18px; text-align: center; flex-shrink: 0; color: #005A84; font-size: 14px; margin-top: 2px; }
.as-ea-card-loc strong { font-weight: 800; color: #222D58; }
.as-ea-card-badge { margin-top: 9px; }
.as-ea-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px; }
.as-ea-badge-free { background: #E8F5EE; color: #2C7A52; }
.as-ea-badge-full { background: #FCEAEA; color: #B23B3B; }
.as-ea-badge-info { background: #EAF4F8; color: #005A84; }
.as-ea-note { font-size: 13px; color: #777E90; }

/* Anmelde-Formular IN der gewaehlten Termin-Card (Akkordeon) */
/* Terminuebersicht bleibt sichtbar, wenn ein Buchungsformular in einer Card oeffnet
   (Kunden-Wunsch). Nur der Wunschtermin-Link blendet aus, solange dessen Formular offen ist. */
.as-ea-anmeldung.as-ea-wunsch-open .as-ea-wunsch-link-wrap { display: none; }
.as-ea-card.as-ea-active {
    flex-direction: column; align-items: stretch;
    border-color: #CDE3ED; box-shadow: 0 4px 18px rgba(34,45,88,0.10);
}
.as-ea-card.as-ea-active .as-ea-card-action { display: none; }
.as-ea-card.as-ea-active .as-ea-formwrap {
    margin: 16px 0 0; padding: 18px 0 0; width: 100%;
    border: 0; border-top: 1px solid #E6E8EC; border-radius: 0; background: transparent;
}
.as-ea-form-head { font-size: 16px; font-weight: 800; color: #222D58; margin: 0 0 4px; }

/* Venue-Bild-Card als GRID: Bild links (volle Hoehe, full-bleed via Negativ-Margins,
   overflow:hidden klippt auf den Card-Radius), Info oben-rechts, CTA-Button in eigener
   Grid-Reihe DARUNTER -> bleibt auf JEDER Breite unter dem Info-Text; das Bild wandert
   NICHT nach oben. */
/* Breite Card: einreihiges Grid – Bild links (full-bleed), Info, Button RECHTS daneben
   (vertikal zentriert) -> Button floatet rechts, belegt KEINE eigene Zeile, kein Gap. */
/* Card: Bild 33% links (full-bleed über die volle Card-Höhe), Text 66% rechts
   (Info oben, Button darunter rechts). 2-Spalten, skaliert proportional. */
.as-ea-card--has-media {
    display: grid;
    grid-template-columns: 33% minmax(0, 1fr);
    grid-template-areas: "media main" "media action";
    column-gap: 20px;
    align-items: start;
    overflow: hidden;
    padding: 30px 22px;
}
/* Bild füllt die ganze Card-Höhe (align-self:stretch) und blutet per Negativ-Margins
   an Ober-/Unter-/linke Kante — KEIN weißer Streifen oben/unten. */
.as-ea-card--has-media .as-ea-card-media { grid-area: media; position: relative; align-self: stretch; min-height: 90px; margin: -30px 0 -30px -22px; }
.as-ea-card--has-media .as-ea-card-main { grid-area: main; }
.as-ea-card--has-media .as-ea-card-action { grid-area: action; align-self: end; justify-self: end; }
.as-ea-card-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
/* Aktiv (Formular offen): zurueck zu Flex-Spalte, Bild ausblenden. */
.as-ea-card--has-media.as-ea-active { display: flex; overflow: visible; padding: 18px 22px; }
.as-ea-card.as-ea-active .as-ea-card-media { display: none; }
/* Cards ohne Bild: CTA unten-rechts (Flex). */
.as-ea-card:not(.as-ea-card--has-media) .as-ea-card-action { align-self: flex-end; }

/* Bild IMMER über die volle Card-Höhe (align-self:stretch aus der Basis-Regel),
   in jeder Breite — KEINE separate Schmal-/Thumbnail-Variante. */

/* Nur mittlere Cards (450–520px): Bild 40 / 60. Schmaler UND breiter = 33 / 66 (Basis). */
@container (min-width: 451px) and (max-width: 520px) {
    .as-ea-card--has-media { grid-template-columns: 40% minmax(0, 1fr); }
}

/* Wochentag-Checkboxen native lassen: die Theme-Form-Bridge stylt
   `.as-form-group input` pauschal als Eingabefeld – ohne dieses Override werden
   die Checkboxen zu unklickbaren Riesen-Pillen. Hoehere Spezifitaet schlaegt die Bridge. */
.as-ea-anmeldung .as-ea-tage input[type="checkbox"] {
    -webkit-appearance: auto; appearance: auto;
    width: auto; height: auto; min-height: 0;
    margin: 0; padding: 0; border: 0; border-radius: 0;
    background: none; box-shadow: none; flex: 0 0 auto;
    accent-color: #005A84; cursor: pointer;
}
.as-ea-tag-chip:has(input:checked) { border-color: #005A84; background: #EAF4F8; color: #005A84; }

.as-ea-empty { background: #F7F8FA; border-radius: 12px; padding: 20px; font-size: 15px; color: #555B7A; }

.as-ea-wunsch-link-wrap { margin: 18px 0 0; text-align: center; }
.as-ea-wunsch-link { color: #005A84; font-size: 14px; text-decoration: none; font-weight: 600; }
.as-ea-wunsch-link:hover { text-decoration: underline; }

/* Formular-Wrapper */
.as-ea-formwrap {
    margin-top: 22px; border: 1px solid #E6E8EC; border-radius: 14px;
    padding: 26px; background: #FBFCFD;
}
.as-ea-form-title { font-size: 20px; margin: 0 0 6px; color: #222D58; }
.as-ea-form-sub { font-size: 14px; color: #005A84; font-weight: 600; margin: 0 0 4px; }
.as-ea-form-hint { font-size: 13px; color: #777E90; margin: 0 0 18px; }

/* Form-Atome (Basis - Theme-Bridge ergaenzt/ueberschreibt spaeter) */
.as-ea-anmeldung .as-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.as-ea-anmeldung .as-form-group { display: flex; flex-direction: column; margin-bottom: 14px; }
.as-ea-anmeldung .as-form-group label,
.as-ea-anmeldung > .as-ea-formwrap label { font-size: 14px; font-weight: 600; margin-bottom: 5px; color: #222D58; }
/* Input/Select/Textarea-Atome werden zentral im Theme gestylt
   (_forms.scss, .as-ea-anmeldung-Bridge) - bewusst KEINE eigenen Atom-Regeln
   hier, damit select == input in der Hoehe ist (siehe feedback_form_classes_unified). */
.as-opt { font-weight: 400; color: #9AA0B4; font-size: 12px; }

.as-ea-tage { display: flex; flex-wrap: wrap; gap: 8px; }
.as-ea-tag-chip {
    display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 500 !important;
    border: 1px solid #CDD2E0; border-radius: 20px; padding: 6px 12px; cursor: pointer; margin-bottom: 0 !important;
}

.as-form-privacy { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: #555B7A; font-weight: 400 !important; margin: 6px 0 16px; }
.as-form-error { background: #FCEAEA; color: #B23B3B; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.as-form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }

.as-submit-btn {
    background: #005A84; color: #fff; border: none; padding: 11px 24px; border-radius: 8px;
    font-size: 15px; font-weight: 600; cursor: pointer;
}
.as-submit-btn:hover { background: #00496b; }
.as-submit-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.as-ea-link-btn { background: none; border: none; color: #777E90; cursor: pointer; font-size: 14px; }

/* Success */
.as-success { text-align: center; padding: 16px; }
.as-success-icon {
    width: 64px; height: 64px; line-height: 64px; margin: 0 auto 12px; border-radius: 50%;
    background: #E8F5EE; color: #2C7A52; font-size: 32px; font-weight: 700;
}
.as-success h3 { margin: 0 0 6px; color: #222D58; }
.as-success-details { color: #555B7A; font-size: 15px; }

@media (max-width: 640px) {
    .as-ea-anmeldung .as-form-row { grid-template-columns: 1fr; }
    .as-ea-card:not(.as-ea-card--has-media) { flex-direction: column; align-items: flex-start; }
}
