/* STAPES Online-Terminbuchung (termin.php) */

.booking-hero h1 { margin-bottom: 1rem; }
.booking-section { padding-top: 2.5rem; }

/* ── Fortschrittsanzeige ─────────────────────────────────────────────── */
.booking-steps {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2.5rem;
    margin: 0 0 2rem;
    padding: 0;
}
.booking-steps[hidden] { display: none; }
.booking-steps li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.booking-steps li.is-active,
.booking-steps li.is-done { opacity: 1; }
.booking-steps li.is-active { color: var(--color-text); }
.booking-steps .step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}
.booking-steps li.is-active .step-no,
.booking-steps li.is-done .step-no {
    background: var(--color-accent);
    color: #fff;
}

/* ── Rahmen der App ──────────────────────────────────────────────────── */
.booking-app {
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    min-height: 420px;
    scroll-margin-top: 100px;
}
.bk-panel { animation: bk-fade 0.35s ease; }
.bk-panel[hidden] { display: none; }
@keyframes bk-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}
.bk-title {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
}
.booking-app p { max-width: none; }

.bk-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 0;
    padding: 0;
    margin-bottom: 1.5rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    cursor: pointer;
}
.bk-back i { font-size: 1.2rem; }
.bk-back:hover { color: var(--color-accent-hover); }

/* ── Schritt 1: Dienste ──────────────────────────────────────────────── */
.bk-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.bk-service {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    padding: 1.4rem 3.5rem 1.4rem 1.5rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-left: 4px solid var(--color-bg-alt);
    font: inherit;
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.bk-service:hover,
.bk-service:focus-visible {
    border-color: var(--color-accent);
    border-left-color: var(--color-accent);
    box-shadow: 0 10px 24px rgba(56, 97, 120, 0.12);
    transform: translateY(-2px);
    outline: none;
}
.bk-service-name {
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.35;
}
.bk-service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.bk-service-meta i { color: var(--color-accent); margin-right: 3px; }
.bk-price { font-weight: 600; color: var(--color-text); }
.bk-price.is-free { color: var(--color-accent); }
.bk-service-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}
.bk-service-arrow {
    position: absolute;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.6rem;
    color: var(--color-accent);
    transition: transform 0.3s ease;
}
.bk-service:hover .bk-service-arrow { transform: translate(4px, -50%); }

.bk-skeleton,
.bk-slot-skeleton {
    background: linear-gradient(90deg, #f1f0ec 25%, #f8f7f4 50%, #f1f0ec 75%);
    background-size: 200% 100%;
    animation: bk-shimmer 1.4s infinite linear;
}
.bk-skeleton { height: 96px; }
.bk-slot-skeleton { height: 46px; }
@keyframes bk-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* ── Schritt 2: Kalender & Zeiten ────────────────────────────────────── */
.bk-selected {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    background: rgba(215, 213, 203, 0.35);
    border-left: 4px solid var(--color-accent);
    color: var(--color-text);
}
.bk-selected-label {
    width: 100%;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    font-weight: 500;
}
.bk-selected-meta { font-size: 0.9rem; color: var(--color-text-muted); }

.bk-time-grid {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
}
.bk-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.bk-cal-month {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-text);
}
.bk-cal-nav {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--color-accent);
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.bk-cal-nav:hover:not(:disabled) { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.bk-cal-nav:disabled { opacity: 0.3; cursor: default; }
.bk-cal-weekdays,
.bk-cal-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}
.bk-cal-weekdays span {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    padding-bottom: 0.5rem;
}
.bk-day {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    font: inherit;
    font-size: 0.95rem;
    color: rgba(34, 34, 34, 0.3);
    position: relative;
}
.bk-day.is-available {
    background: rgba(56, 97, 120, 0.08);
    color: var(--color-accent);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.bk-day.is-available:hover { background: rgba(56, 97, 120, 0.18); }
.bk-day.is-selected,
.bk-day.is-selected:hover { background: var(--color-accent); color: #fff; }
.bk-day.is-today::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
}
.bk-calendar.is-loading .bk-cal-days { opacity: 0.4; pointer-events: none; }

.bk-slots-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    min-height: 1.5em;
}
.bk-slot-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 0.6rem;
}
.bk-slot {
    padding: 0.8rem 0.5rem;
    background: #fff;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.bk-slot:hover,
.bk-slot:focus-visible {
    background: var(--color-accent);
    color: #fff;
    outline: none;
}
.bk-empty {
    grid-column: 1 / -1;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    background: rgba(215, 213, 203, 0.3);
}
.bk-tz-note {
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ── Schritt 3: Angaben ──────────────────────────────────────────────── */
.bk-details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}
.bk-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    border: 0;
    padding: 0;
    min-width: 0;
}
.bk-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.25rem;
}
.bk-field label,
.bk-field legend {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
}
.bk-field legend { margin-bottom: 0.4rem; }
.bk-optional { font-weight: 400; color: var(--color-text-muted); }
.bk-field input[type="text"],
.bk-field input[type="email"],
.bk-field input[type="tel"],
.bk-field textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 0;
    background: #fff;
    font: inherit;
    font-size: 1rem; /* 16px verhindert Auto-Zoom auf iOS */
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.bk-field textarea { resize: vertical; min-height: 110px; }
.bk-field input:focus,
.bk-field textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(56, 97, 120, 0.15);
}
.bk-field.has-error input,
.bk-field.has-error textarea { border-color: #b3261e; }
.bk-field-error { font-size: 0.8rem; color: #b3261e; }
.bk-radio {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--color-text);
    padding: 0.35rem 0;
    cursor: pointer;
}
.bk-radio input { accent-color: var(--color-accent); width: 1.1rem; height: 1.1rem; }
.bk-hp {
    position: absolute !important;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.bk-form-error {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: #fbeceb;
    border-left: 4px solid #b3261e;
    color: #5c1410;
    font-size: 0.92rem;
}
.bk-form-error a,
.bk-link {
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.bk-submit { width: 100%; }
.bk-submit.is-loading { opacity: 0.8; cursor: progress; }
.bk-privacy {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.bk-privacy a { color: var(--color-accent); }

.bk-summary {
    position: sticky;
    top: 110px;
    padding: 1.75rem;
    background: rgba(215, 213, 203, 0.35);
    border-left: 4px solid var(--color-accent);
    color: var(--color-text);
}
.bk-summary-service {
    display: block;
    font-size: 1.1rem;
    margin: 0.25rem 0 1rem;
}
.bk-summary-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.92rem;
}
.bk-summary-list li { display: flex; gap: 0.7rem; align-items: baseline; }
.bk-summary-list i { width: 1rem; text-align: center; color: var(--color-accent); flex-shrink: 0; }

/* ── Bestätigung / Fehler ────────────────────────────────────────────── */
.bk-done,
.bk-unavailable {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    padding: 1.5rem 0;
}
.bk-done-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: #fff;
    font-size: 2rem;
    animation: bk-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes bk-pop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.bk-done-text { margin-bottom: 2rem; }
.bk-done-text .accent-text { display: inline-block; margin-top: 0.5rem; font-size: 1.2em; }
.bk-summary-done {
    position: static;
    text-align: left;
    margin-bottom: 2rem;
}
.bk-done-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem 2rem;
}
.bk-unavailable-icon {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
}
.bk-unavailable p { margin: 0 auto 2rem; }


/* ── Tablet ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .bk-time-grid,
    .bk-details-grid { grid-template-columns: 1fr; gap: 2rem; }
    .bk-calendar { max-width: 480px; width: 100%; margin: 0 auto; }
    .bk-summary { position: static; order: -1; padding: 1.25rem 1.5rem; }
}

/* ── Handy ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .booking-section { padding-top: 1rem; }
    .booking-steps {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }
    .booking-steps li {
        flex-direction: column;
        text-align: center;
        gap: 0.4rem;
        font-size: 0.75rem;
        line-height: 1.3;
        flex: 1 1 0;
    }
    .booking-app {
        padding: 1.5rem 1.1rem;
        box-shadow: none;
    }
    .bk-title { font-size: 1.15rem; margin-bottom: 1.1rem; }
    .bk-services { grid-template-columns: 1fr; gap: 0.75rem; }
    .bk-service { padding: 1.1rem 3rem 1.1rem 1.1rem; }
    .bk-service:hover { transform: none; }
    .bk-selected { margin-bottom: 1.5rem; }
    .bk-slot-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bk-slot { padding: 0.9rem 0.25rem; }
    .bk-field-row { grid-template-columns: 1fr; }
    .bk-done-actions { flex-direction: column; }
    .bk-done-actions .btn { width: 100%; }
}

/* Lese-Tipp würde die Buchung verdecken */
#sidebar-container { display: none !important; }
