/* ============================================================
   emailconversion · emc-termin.css
   Version : 1.2.0
   Stand   : 30.04.2026 MEZ
   Autor   : EMC Development
   v1.1.0: Layout auf buchen.php-Basis (bk-header, bk-main, card)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Step-Bubbles — zwischen Header und Card ── */
.termin-steps-outer {
    max-width: 640px;
    margin: 0 auto 16px;
    padding: 0 16px;
}

.termin-steps {
    display: flex;
    align-items: center;
    padding: 20px 0 4px;
}

.termin-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    position: relative;
}

.termin-step::after {
    content: '';
    position: absolute;
    top: 14px;
    left: calc(50% + 16px);
    right: calc(-50% + 16px);
    height: 2px;
    background: #e2e8f0;
}

.termin-step:last-child::after { display: none; }
.termin-step.done::after  { background: #2471be; }

.step-bubble {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: background 0.2s, box-shadow 0.2s;
}

.termin-step.done   .step-bubble { background: #2471be; color: #fff; }
.termin-step.active .step-bubble { background: #2471be; color: #fff; box-shadow: 0 0 0 4px #d4e7f8; }
.termin-step.todo   .step-bubble { background: #e2e8f0; color: #8a96aa; }

.step-label-txt {
    font-size: 10px;
    font-weight: 500;
    color: #8a96aa;
    text-align: center;
    white-space: nowrap;
}

.termin-step.active .step-label-txt { color: #2471be; font-weight: 600; }
.termin-step.done   .step-label-txt { color: #2471be; }

/* ── Card-Body Padding (termin-body wird direkt ins .card gerendert) ── */
#termin-body {
    padding: 28px 32px;
}

/* ── Datum-Chips ── */
.date-chips {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 24px;
}

.date-chip {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 2px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: #f8fafc;
    user-select: none;
}

.date-chip:hover { border-color: #2471be; }

.date-chip.selected {
    border-color: #2471be;
    background: #e8f1fb;
}

.date-chip.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
    background: #f1f3f5;
}

.date-chip .wd {
    font-size: 9px;
    font-weight: 600;
    color: #8a96aa;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
}

.date-chip .dd {
    font-size: 14px;
    font-weight: 700;
    color: #1a2233;
    display: block;
    margin-top: 2px;
}

.date-chip.selected .dd  { color: #2471be; }
.date-chip.disabled .dd  { color: #aaa; }

/* ── Slot-Grid ── */
.slot-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-bottom: 24px;
}

.slot-btn {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 9px 4px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #1a2233;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.slot-btn:hover:not(.taken):not(.selected) { border-color: #2471be; }

.slot-btn.taken {
    opacity: 0.3;
    text-decoration: line-through;
    cursor: default;
    pointer-events: none;
}

.slot-btn.selected {
    border-color: #2471be;
    background: #e8f1fb;
    color: #185FA5;
    font-weight: 700;
}

.slots-loading {
    text-align: center;
    padding: 20px;
    color: #8a96aa;
    font-size: 13px;
}

.slots-empty {
    text-align: center;
    padding: 20px;
    color: #8a96aa;
    font-size: 13px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 8px;
}

/* ── Form (nutzt buchen.css .form-group/.fg falls vorhanden) ── */
.fg {
    margin-bottom: 16px;
}

.fg label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #8a96aa;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 5px;
}

.fg input[type="text"],
.fg input[type="email"],
.fg input[type="tel"],
.fg select,
.fg textarea {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    color: #1a2233;
    outline: none;
    transition: border-color 0.15s;
    appearance: none;
    -webkit-appearance: none;
}

.fg input:focus,
.fg input[type="tel"]:focus,
.fg select:focus,
.fg textarea:focus { border-color: #2471be; }

.fg textarea { resize: vertical; min-height: 70px; }
.fg .hint    { font-size: 11px; color: #8a96aa; margin-top: 4px; }

/* ── Buchungs-Zusammenfassung ── */
.booking-summary {
    background: #e8f1fb;
    border: 1px solid #b5d4f4;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.booking-summary-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}

.booking-summary-row:last-child { margin-bottom: 0; }
.booking-summary-row .bsr-label { color: #8a96aa; min-width: 60px; flex-shrink: 0; }
.booking-summary-row .bsr-val   { color: #1a2233; font-weight: 600; }

/* ── OTP ── */
.otp-wrap {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 8px 0 4px;
}

.otp-digit {
    width: 44px;
    height: 52px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: #1a2233;
    font-family: 'DM Mono', monospace;
    outline: none;
    transition: border-color 0.15s;
}

.otp-digit:focus { border-color: #2471be; }

/* ── Buttons ── */
.btn-primary {
    width: 100%;
    background: #2471be;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.btn-primary:hover   { background: #185FA5; }
.btn-primary:active  { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: default; }

.btn-back {
    background: none;
    border: none;
    color: #8a96aa;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-back:hover { color: #1a2233; }

/* ── Alerts (ergänzt buchen.css) ── */
.alert-info {
    background: #e8f1fb;
    border: 1px solid #b5d4f4;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #185FA5;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* ── Success-Screen ── */
.success-screen {
    text-align: center;
    padding: 8px 0;
}

.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f0fdf4;
    border: 2px solid #86efac;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.success-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a2233;
    margin-bottom: 8px;
}

.success-sub {
    font-size: 13px;
    color: #8a96aa;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ── Responsive ── */
@media (max-width: 540px) {
    #termin-body { padding: 20px 16px; }
    .date-chips  { gap: 3px; }
    .date-chip   { padding: 6px 1px; }
    .date-chip .dd { font-size: 13px; }
    .slot-grid   { grid-template-columns: repeat(3, 1fr); }
    .otp-digit   { width: 38px; height: 46px; font-size: 20px; }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* section-title */
.section-title {
    font-size: 11px;
    font-weight: 600;
    color: #2471be;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 12px;
}

/* alert-error für Termin */
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;

/* ── Kalender-Lade-Animation ── */
@keyframes cal-pulse {
    0%, 100% { opacity: .35; transform: scale(.85); }
    50%       { opacity: 1;   transform: scale(1);   }
}

.cal-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2471be;
    animation: cal-pulse 1.1s ease-in-out infinite;
    flex-shrink: 0;
}

/* ── Buchungsgrund-Kacheln (Schritt 1) ── */
.grund-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 4px;
}

.grund-kachel {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: #f8fafc;
    user-select: none;
}

.grund-kachel:hover {
    border-color: #2471be;
    background: #f0f6fe;
}

.grund-kachel.selected {
    border-color: #2471be;
    background: #e8f1fb;
}

.gk-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a2233;
    margin-bottom: 3px;
}

.grund-kachel.selected .gk-name { color: #185FA5; }

.gk-sub {
    font-size: 11px;
    color: #8a96aa;
    line-height: 1.4;
}

@media (max-width: 400px) {
    .grund-grid { grid-template-columns: 1fr; }
}
