/* ============================================================
   BIB:EVENTS — anmeldung.css
   Nur Custom-Styles die Tailwind nicht abbilden kann.
   Alle anderen Styles: Tailwind-Klassen direkt im HTML.
   ============================================================ */

/* Form-Step Visibility (JS togglet .active-step) */
.form-step { display: none; }
.form-step.active-step { display: block; }

/* Loading Overlay (bleibt unverändert) */
#loadingOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
#loadingOverlay.active { display: flex; }
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--bc-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Stepper-Wrapper (eigener Background-Bereich) */
.stepper-wrapper {
    background: #f8fafc;
    border-top: 1px solid #e9eef4;
    border-bottom: 1px solid #e9eef4;
    padding: 24px 24px 20px;
    margin-bottom: 8px;
}

/* Stepper: Verbindungslinie (::before-Trick, nicht in Tailwind) */
.stepper-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto;
    max-width: 480px;
}
.step-line {
    height: 2px;
    flex: 1;
    background-color: #e2e8f0;
    transition: background-color 0.3s ease;
}
.step-line.completed {
    background-color: var(--bc-primary);
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 72px;
}
.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #94a3b8;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-size: 15px;
    transition: all 0.3s ease;
}
.step.active .step-circle {
    background-color: var(--bc-primary);
    color: white;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--bc-primary) 20%, transparent);
}
.step.done .step-circle {
    background-color: var(--bc-primary-light);
    color: var(--bc-primary);
}
.step-number { line-height: 1; }
.step-label {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
    text-align: center;
}
.step.active .step-label { color: var(--bc-primary); font-weight: 700; }
.step.done .step-label  { color: var(--bc-primary); font-weight: 600; }

/* Klickbare abgeschlossene Schritte */
.step.done { cursor: pointer; }
.step.done:hover .step-circle {
    background-color: var(--bc-primary);
    color: white;
    transform: scale(1.08);
}

/* Schritt-Indikator */
.stepper-indicator {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 8px;
    font-weight: 500;
}

/* Date-Card: Option A — Kalender-Card mit Datums-Block */
.date-card {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    border-radius: 16px;
    border: none;
    box-shadow: 0 0 0 2px #e2e8f0;
    background: white;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    user-select: none;
    overflow: hidden;
}
.date-card:hover {
    box-shadow: 0 0 0 2px var(--bc-primary-subtle), 0 2px 8px rgba(0,0,0,0.06);
}
.date-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.date-card.selected,
.date-card:has(input:checked) {
    background: color-mix(in srgb, var(--bc-primary) 4%, white);
    box-shadow: 0 0 0 2px var(--bc-primary), 0 0 0 5px color-mix(in srgb, var(--bc-primary) 12%, transparent);
}
.date-card input:disabled ~ .date-card-cal,
.date-card input:disabled ~ .date-card-body { opacity: 0.45; }
.date-card:has(input:disabled) { cursor: default; box-shadow: 0 0 0 2px #e2e8f0; background: #f8fafc; }
.date-card:has(input:disabled):hover { box-shadow: 0 0 0 2px #e2e8f0; }

/* Kalenderblatt links */
.date-card-cal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 12px 14px;
    background: #f1f5f9;
    border-right: 2px solid #e2e8f0;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.date-card.selected .date-card-cal,
.date-card:has(input:checked) .date-card-cal {
    background: var(--bc-primary);
    border-right-color: transparent;
}
.date-card-cal-weekday {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    line-height: 1;
    transition: color 0.25s ease;
}
.date-card-cal-day {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    transition: color 0.25s ease;
}
.date-card-cal-month {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    line-height: 1;
    margin-top: 1px;
    transition: color 0.25s ease;
}
.date-card.selected .date-card-cal-weekday,
.date-card:has(input:checked) .date-card-cal-weekday,
.date-card.selected .date-card-cal-day,
.date-card:has(input:checked) .date-card-cal-day,
.date-card.selected .date-card-cal-month,
.date-card:has(input:checked) .date-card-cal-month {
    color: white;
}

/* Inhalt rechts */
.date-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 14px 16px 14px 16px;
    min-width: 0;
}
.date-card-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.date-card-day  { font-weight: 600; color: #1e293b; font-size: 0.92rem; }
.date-card-date { color: #334155; font-size: 0.92rem; }
.date-card-sep  { color: #94a3b8; }
.date-card-time { color: #64748b; font-size: 0.88rem; display: flex; align-items: center; gap: 4px; }
.date-card-time i { font-size: 0.75rem; color: #94a3b8; }

.date-card-check {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: transparent;
    flex-shrink: 0;
    transition: all 0.2s;
}
.date-card-check-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    padding: 0 16px 0 8px;
    flex-shrink: 0;
}
.date-card.selected .date-card-check,
.date-card:has(input:checked) .date-card-check {
    background-color: var(--bc-primary);
    border-color: var(--bc-primary);
    color: white;
}

/* Sitzplatz-Balken (jetzt unter dem Text) */
.seat-avail { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.seat-avail-label { font-size: 0.78rem; font-weight: 600; color: var(--bc-primary); white-space: nowrap; }
.seat-avail-track { width: 100%; height: 5px; background: rgba(0,0,0,0.08); border-radius: 999px; }
.seat-avail-fill { height: 100%; border-radius: 999px; background: #22c55e; transition: width 0.4s ease; min-width: 4px; }
.seat-avail-fill.medium { background: #f59e0b; }
.seat-avail-fill.low    { background: #ef4444; }

.bc-price-badge {
    display: inline-block;
    background: var(--bc-primary, #166534);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 1px 7px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.seat-unlimited-label {
    background-color: var(--bc-primary-light);
    color: var(--bc-primary);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.seat-bar-text.full {
    background-color: #fee2e2; color: #b91c1c;
    padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 4px;
}
.seat-bar-text.wl {
    background-color: #fef3c7; color: #b45309;
    padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 4px;
}

/* Checkbox-Liste */
.checkbox-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.checkbox-list li { width: 80%; }
.checkbox-list .date-card { width: 100%; }
@media (max-width: 768px) { .checkbox-list li { width: 100%; } }
.checkbox-list.checkbox-error .date-card { border-color: #ef4444; }

/* Form-Step-Abschnitte (Sub-Container) */
.form-step-section {
    margin: 16px 24px 24px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e9eef4;
}
@media (max-width: 480px) {
    .form-step-section {
        margin: 12px 10px 16px;
        padding: 14px;
    }
}

/* Form-Sections */
.form-section-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.form-section-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background-color: var(--bc-primary-light);
    color: var(--bc-primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 1.1rem;
}
.form-section-title  { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin: 0 0 2px; }
.form-section-subtitle { font-size: 0.85rem; color: #64748b; margin: 0; }

/* Form Grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid-full { grid-column: 1 / -1; }

/* Input Fieldset (BC-Pattern) */
.input-fieldset {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px 14px 12px;
    transition: border-color 0.2s ease;
    background: white;
}
.input-fieldset:hover  { border-color: color-mix(in srgb, var(--bc-primary) 25%, white); }
.input-fieldset:focus-within { border-color: var(--bc-primary); }
.input-fieldset.input-error { border-color: #ef4444 !important; background: #fff8f8; }

.input-fieldset legend {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #94a3b8; padding: 0 4px;
}
.input-fieldset:focus-within legend { color: var(--bc-primary); }
.input-fieldset.input-error legend  { color: #ef4444; }

.input-inner { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.input-icon  { color: #94a3b8; font-size: 0.95rem; flex-shrink: 0; transition: color 0.2s; }
.input-fieldset:focus-within .input-icon { color: var(--bc-primary); }
.input-fieldset.input-error .input-icon  { color: #ef4444; }

.input-fieldset input,
.input-fieldset select,
.input-fieldset textarea {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 0.95rem; color: #1e293b; min-width: 0;
}
.input-fieldset input::placeholder  { color: #cbd5e1; }
.input-fieldset select { cursor: pointer; }

.input-error-text {
    display: none; font-size: 0.78rem; color: #ef4444; margin-top: 6px;
}
.input-fieldset.input-error .input-error-text { display: block; }

/* Form Actions */
.form-actions { display: flex; margin-top: 24px; gap: 12px; }
.form-actions--end { justify-content: flex-end; }
.form-actions--between { justify-content: space-between; }

/* Buttons */
.btn-modern {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; border: 2px solid transparent; transition: all 0.2s ease;
    text-decoration: none; white-space: nowrap;
}
.btn-modern--primary {
    background-color: var(--bc-primary); color: white; border-color: var(--bc-primary);
}
.btn-modern--primary:hover { background-color: var(--bc-primary-hover); border-color: var(--bc-primary-hover); }
.btn-modern--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-modern--secondary {
    background: transparent; color: var(--bc-primary); border-color: var(--bc-primary);
}
.btn-modern--secondary:hover { background-color: var(--bc-primary-light); }

/* Kind-Card */
.child-card {
    background: #f8fafc; border-radius: 16px;
    border: 2px solid #e2e8f0; padding: 18px; margin-bottom: 14px; position: relative;
}
.child-card-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.child-card-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #334155; }
.child-card-remove {
    width: 32px; height: 32px; border-radius: 8px; border: none;
    background: #fee2e2; color: #ef4444; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.child-card-remove:hover { background: #fecaca; }

/* "Kind hinzufügen" Button */
.add-child-modern {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: 999px; font-size: 0.88rem; font-weight: 600;
    background: transparent; color: var(--bc-primary); border: 2px solid var(--bc-primary);
    cursor: pointer; transition: all 0.2s; margin-bottom: 4px;
}
.add-child-modern:hover { background: var(--bc-primary-light); }
.add-child-modern:disabled,
#add-child-btn.disabled { opacity: 0.5; cursor: not-allowed; }
.add-child-hint { font-size: 0.8rem; color: #94a3b8; margin-bottom: 16px; }

/* Min-Age-Hinweis */
.min-age-notice {
    display: flex; align-items: flex-start; gap: 10px;
    background: #fffbeb; border: 1px solid #fcd34d;
    border-radius: 10px; padding: 12px 14px; margin-bottom: 18px;
    font-size: 0.88rem; color: #78350f;
}

/* Zusammenfassungs-Karte */
.summary-card { border-radius: 16px; overflow: hidden; border: 2px solid #e2e8f0; margin-bottom: 20px; }
.summary-header {
    background: #f8fafc; padding: 14px 18px;
    font-size: 1rem; font-weight: 700; color: #334155;
    border-bottom: 1px solid #e2e8f0;
}
.summary-subtext { font-size: 0.85rem; font-weight: 400; color: #64748b; margin-top: 2px; }
.summary-body { background: white; padding: 18px; }
.summary-row { display: flex; flex-direction: column; margin-bottom: 14px; }
.summary-row:last-child { margin-bottom: 0; }
.summary-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; margin-bottom: 4px; }
.summary-value { color: #334155; line-height: 1.5; font-size: 0.95rem; }

/* Thank-You-Sektion */
.thank-you-message { display: none; }

/* Autor-Events im Modal */
#authorEventsContainer { display: flex; flex-direction: column; gap: 8px; }
.author-event-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 16px;
    background: #f8fafc; border: 2px solid #e2e8f0;
    transition: all 0.2s ease; text-decoration: none; color: inherit;
}
.author-event-card:hover {
    border-color: color-mix(in srgb, var(--bc-primary) 30%, white);
    background: color-mix(in srgb, var(--bc-primary) 4%, white);
}
.author-event-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--bc-primary-light); color: var(--bc-primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.9rem;
}
.author-event-info { flex: 1; min-width: 0; }
.author-event-title {
    font-weight: 600; font-size: 0.9rem; color: var(--bc-primary);
    margin: 0 0 2px; line-height: 1.3;
}
.author-event-date { font-size: 0.8rem; color: #64748b; margin: 0; }
.author-event-arrow { color: #94a3b8; font-size: 0.85rem; flex-shrink: 0; transition: transform 0.2s; }
.author-event-card:hover .author-event-arrow { transform: translateX(2px); color: var(--bc-primary); }

/* Sticky Mobile Nav */
#stickyNav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: white; border-top: 1px solid #e2e8f0;
    padding: 12px 16px; display: flex; gap: 10px; z-index: 100;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
@media (min-width: 768px) { #stickyNav { display: none; } }

/* Datenschutz-Checkbox */
.privacy-consent {
    display: flex; align-items: flex-start; gap: 12px;
    margin-top: 20px; padding: 14px 16px;
    background: white; border: 2px solid #e2e8f0;
    border-radius: 16px; cursor: pointer;
    transition: border-color 0.2s;
    user-select: none;
}
.privacy-consent:hover { border-color: color-mix(in srgb, var(--bc-primary) 30%, white); }
.privacy-consent:has(input:checked) { border-color: var(--bc-primary); }
.privacy-consent input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.privacy-check {
    width: 22px; height: 22px; border-radius: 6px;
    border: 2px solid #cbd5e1; display: flex;
    align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.7rem; color: transparent;
    transition: all 0.2s; margin-top: 1px;
}
.privacy-consent:has(input:checked) .privacy-check {
    background: var(--bc-primary); border-color: var(--bc-primary); color: white;
}
.privacy-text { font-size: 0.85rem; color: #475569; line-height: 1.5; }
.privacy-text a { color: var(--bc-primary); font-weight: 600; text-decoration: none; }
.privacy-text a:hover { text-decoration: underline; }
.privacy-error-text {
    display: none; font-size: 0.78rem; color: #ef4444; margin-top: 6px;
}
.privacy-consent.privacy-error { border-color: #ef4444 !important; background: #fff8f8; }
.privacy-consent.privacy-error ~ .privacy-error-text { display: block; }

/* Error-Felder */
.child-entry-error { border-color: #ef4444 !important; background: #fff8f8; }

/* Screen Reader */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
