/* ═══════════════════════════════════════════════════════════════
   BOOKING WIZARD
   ═══════════════════════════════════════════════════════════════ */

.booking-progress {
    height: 4px;
    background: var(--md-sys-color-surface-container-highest);
    border-radius: 2px;
    margin-bottom: var(--spacing-xs);
    overflow: hidden;
}
.booking-progress-fill {
    height: 100%;
    width: 0;
    background: var(--md-sys-color-accent);
    border-radius: 2px;
    transition: width 0.4s var(--md-sys-motion-easing-standard);
}
.booking-steps-label {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.booking-step {
    animation: bookingFadeIn 0.3s ease;
}
@keyframes bookingFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.booking-step h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}
.booking-step h2 .material-symbols-outlined {
    color: var(--md-sys-color-on-surface);
    opacity: 0.7;
    font-size: 22px;
}

/* Option Cards (Standort, Versicherung, etc.) */
.booking-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}
.booking-option-grid--two {
    grid-template-columns: repeat(2, 1fr);
}
.booking-option {
    border: 2px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: var(--spacing-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--md-sys-color-surface-container-lowest);
}
.booking-option:hover {
    border-color: var(--md-sys-color-accent);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--md-sys-color-accent) 10%, transparent);
}
.booking-option.selected {
    border-color: var(--md-sys-color-accent);
    background: color-mix(in srgb, var(--md-sys-color-accent) 6%, transparent);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--md-sys-color-accent) 12%, transparent);
}
.booking-option.selected .option-label {
    color: var(--md-sys-color-accent);
}
.booking-option .option-icon {
    font-size: 36px;
    color: var(--md-sys-color-on-surface);
    opacity: 0.7;
    margin-bottom: var(--spacing-sm);
    transition: color 0.2s, opacity 0.2s;
}
/* Welle-6: <details> in Step-7 Bedingungen — Expand-Icon rotiert */
.booking-step details > summary {
    list-style: none;
}
.booking-step details > summary::-webkit-details-marker {
    display: none;
}
.booking-step details[open] > summary .material-symbols-outlined:last-child {
    transform: rotate(180deg);
}
.booking-option:hover .option-icon,
.booking-option.selected .option-icon {
    color: var(--md-sys-color-accent);
    opacity: 1;
}
.booking-option .option-label {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}
.booking-option .option-desc {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
}

/* Navigation */
.booking-nav {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--md-sys-color-outline-variant);
}
.booking-nav-icon {
    font-size: 18px;
}
.booking-spin-icon {
    display: none;
}
.booking-hold-countdown {
    position: fixed;
    right: 20px;
    bottom: 90px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--md-sys-color-accent);
    color: var(--md-sys-color-on-accent, var(--md-sys-color-on-surface));
    box-shadow: 0 2px 12px var(--md-sys-color-accent-container);
    font-size: 13px;
    font-weight: 600;
}
.booking-hold-icon {
    font-size: 16px;
}
@keyframes bookingSpin {
    to { transform: rotate(360deg); }
}

/* ── Booking Calendar (Monatsansicht, quadratische Tiles) ── */
.booking-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}
.booking-calendar-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
.booking-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
    text-align: center;
}
.booking-calendar-weekdays span {
    font-size: 12px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    padding: 6px 0;
}
.booking-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.booking-calendar-day {
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: 14px;
    cursor: default;
    border: 1px solid var(--md-sys-color-outline-variant);
    transition: border-color 0.15s;
    padding: 4px;
    background: var(--md-sys-color-surface-container-lowest);
    overflow: hidden;
}
.booking-calendar-day.other-month {
    opacity: 0.3;
    border-color: transparent;
    background: transparent;
}
.booking-calendar-day.past {
    opacity: 0.3;
    border-color: transparent;
}
.booking-calendar-day.today {
    border-color: var(--md-sys-color-accent);
}
.booking-calendar-day.has-slots {
    border-color: var(--md-sys-color-primary-container);
    background: var(--md-sys-color-surface-container-lowest);
}
.booking-calendar-day .day-num {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
    text-align: right;
    padding: 0 2px;
    color: var(--md-sys-color-on-surface-variant);
}
.booking-calendar-day.today .day-num {
    color: var(--md-sys-color-accent);
}
.booking-calendar-day .day-slots {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.booking-slot-chip {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 4px;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.booking-slot-chip:hover {
    background: var(--md-sys-color-accent);
    color: var(--md-sys-color-on-accent);
}
.booking-slot-chip.selected {
    background: var(--md-sys-color-accent);
    color: var(--md-sys-color-on-accent);
}
.booking-slot-more {
    font-size: 9px;
    color: var(--md-sys-color-accent);
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    padding: 1px 0;
}
.booking-slot-more:hover {
    text-decoration: underline;
}

/* Expanded Slots (Modal/Popover unter dem Kalender) */
.booking-day-expanded {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-container-lowest);
}
.booking-day-expanded h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}
.booking-expanded-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: var(--spacing-xs);
}
.booking-expanded-slot {
    padding: 6px 8px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}
.booking-expanded-slot:hover {
    border-color: var(--md-sys-color-accent);
    background: color-mix(in srgb, var(--md-sys-color-accent) 4%, transparent);
}
.booking-expanded-slot.selected {
    background: var(--md-sys-color-accent);
    color: var(--md-sys-color-on-accent);
    border-color: var(--md-sys-color-accent);
}

@media (max-width: 600px) {
    .booking-calendar-day {
        min-height: 70px;
        padding: 3px;
    }
    .booking-slot-chip {
        font-size: 9px;
        padding: 1px 2px;
    }
}

/* Booking Summary */
.booking-summary {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}
.booking-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    font-size: 14px;
}
.booking-summary-row:last-child {
    border-bottom: none;
}
.booking-summary-row .label {
    color: var(--md-sys-color-on-surface-variant);
}
.booking-summary-row .value {
    font-weight: 600;
}

/* ── Booking View Toggle ─────────────────────────────────── */
.booking-view-toggle {
    justify-content: center;
    margin-bottom: var(--spacing-md);
}
.booking-view-toggle .material-symbols-outlined {
    font-size: 16px;
    color: var(--md-sys-color-accent);
}
.booking-view-toggle button.active .material-symbols-outlined {
    color: inherit;
}

/* ── Wochenansicht ───────────────────────────────────────── */
.booking-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.booking-week-day {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 200px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: var(--spacing-xs);
    background: var(--md-sys-color-surface-container-lowest);
}
.booking-week-day.today {
    border-color: var(--md-sys-color-accent);
}
.booking-week-day.past {
    opacity: 0.4;
}
.booking-week-day .week-day-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
.booking-week-day.today .week-day-label {
    color: var(--md-sys-color-accent);
}
.booking-week-day .week-day-slots {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    flex: 1;
}
.booking-week-grid .booking-slot-chip {
    font-size: 11px;
    padding: 3px 6px;
}
.booking-week-day .week-no-slots {
    font-size: 11px;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    padding-top: var(--spacing-sm);
}

/* ── Tagesansicht ────────────────────────────────────────── */
.booking-day-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}
.booking-day-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    border: 2px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--md-sys-color-surface-container-lowest);
}
.booking-day-slot:hover {
    border-color: var(--md-sys-color-accent);
    background: color-mix(in srgb, var(--md-sys-color-accent) 4%, transparent);
}
.booking-day-slot.selected {
    border-color: var(--md-sys-color-accent);
    background: var(--md-sys-color-accent);
    color: var(--md-sys-color-on-accent);
}
.booking-day-slot .slot-time {
    font-size: 16px;
    font-weight: 600;
}
.booking-day-slot .slot-meta {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
}
.booking-day-slot.selected .slot-meta {
    color: color-mix(in srgb, var(--md-sys-color-on-accent) 80%, transparent);
}
.booking-day-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--md-sys-color-on-surface-variant);
}
.booking-day-empty .material-symbols-outlined {
    font-size: 48px;
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--md-sys-color-outline);
}

/* ── Terminkonflikt-Indikatoren ──────────────────────────── */
.booking-slot-chip.has-conflict,
.booking-week-grid .booking-slot-chip.has-conflict {
    border: 1px solid var(--md-sys-color-error);
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}
.booking-conflict-icon {
    font-size: 12px;
    color: var(--md-sys-color-error);
    vertical-align: middle;
    margin-left: 2px;
    cursor: help;
}
.booking-day-slot.has-conflict {
    border-color: var(--md-sys-color-error);
}
.booking-conflict-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--md-sys-color-error);
    margin-top: 4px;
}
.booking-conflict-hint .material-symbols-outlined {
    font-size: 16px;
}

/* Responsive */
@media (max-width: 600px) {
    .booking-option-grid {
        grid-template-columns: 1fr;
    }
    .booking-calendar-day .day-num {
        font-size: 13px;
    }
    .booking-calendar-day .slot-count {
        font-size: 9px;
    }
    .booking-week-grid {
        grid-template-columns: 1fr;
    }
    .booking-week-day {
        min-height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--spacing-xs);
    }
    .booking-week-day .week-day-label {
        min-width: 60px;
        border-bottom: none;
        border-right: 1px solid var(--md-sys-color-outline-variant);
        padding-right: var(--spacing-xs);
        padding-bottom: 0;
    }
    .booking-week-day .week-day-slots {
        flex-direction: row;
        flex-wrap: wrap;
        overflow-y: visible;
    }
    .booking-view-toggle {
        gap: 2px;
    }
    .booking-view-toggle button {
        font-size: 12px;
        padding: 5px 8px;
    }
    .booking-view-toggle .material-symbols-outlined {
        font-size: 14px;
    }
}

/* ── Booking Modal ──────────────────────────────────── */
.booking-modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--md-sys-color-scrim);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.booking-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}
.booking-modal {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-extra-large, 20px);
    max-width: 560px;
    width: calc(100vw - 32px);
    max-height: 90vh;
    transform: scale(0.92);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.booking-modal-backdrop.active .booking-modal {
    transform: scale(1);
}
.booking-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    flex-shrink: 0;
}
body.booking-body-locked {
    overflow: hidden;
}
.booking-provider-head {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    min-width: 0;
}
.booking-provider-avatar,
.booking-provider-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}
.booking-provider-avatar {
    object-fit: cover;
}
.booking-provider-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--md-sys-color-primary-container);
}
.booking-provider-avatar-icon {
    color: var(--md-sys-color-on-primary-container);
    font-size: 20px;
}
.booking-provider-text {
    min-width: 0;
}
.booking-provider-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}
.booking-provider-action {
    font-size: 12px;
}
.booking-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--md-sys-color-on-surface-variant);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.booking-modal-close:hover {
    background: var(--md-sys-color-surface-container);
}
.booking-modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
}

.booking-card-padded {
    padding: var(--spacing-lg);
}
.booking-card-spaced,
.booking-status-card,
.booking-login-card {
    margin-bottom: var(--spacing-lg);
}
.booking-card-spaced {
    margin-bottom: var(--spacing-md);
}
.booking-card-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin: 0 0 var(--spacing-sm);
    font-size: 14px;
}
.booking-card-title--spaced {
    margin-bottom: var(--spacing-md);
}
.booking-muted-icon {
    color: var(--md-sys-color-on-surface);
    font-size: 18px;
    opacity: .7;
}
.booking-provider-note {
    margin: 0 0 var(--spacing-md);
    white-space: pre-line;
    font-size: 14px;
    line-height: 1.5;
}
.booking-terms-details {
    font-size: 14px;
}
.booking-terms-summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.booking-expand-icon {
    margin-left: 4px;
    color: var(--md-sys-color-on-surface);
    font-size: 18px;
    opacity: .6;
    transition: transform 200ms ease;
}
.booking-terms-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin: var(--spacing-sm) 0 0;
    padding-left: var(--spacing-lg);
}
.booking-consent-label,
.booking-consent-current {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}
.booking-consent-label {
    cursor: pointer;
}
.booking-checkbox {
    margin-top: 3px;
    accent-color: var(--md-sys-color-accent);
}
.booking-consent-text,
.booking-consent-current,
.booking-consent-copy {
    font-size: 14px;
}
.booking-consent-text--small {
    font-size: 13px;
}
.booking-link,
.booking-link-nowrap,
.booking-resend-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--md-sys-color-accent);
    cursor: pointer;
    font: inherit;
    padding: 0;
}
.booking-link-nowrap,
.booking-resend-link {
    font-weight: 600;
}
.booking-link-nowrap {
    display: inline-flex;
    margin-top: var(--spacing-xs);
    white-space: nowrap;
}
.booking-consent-divider {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--md-sys-color-outline-variant);
}
.booking-consent-current-icon {
    color: var(--md-sys-color-accent);
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 18px;
}
.booking-consent-copy {
    margin: 0 0 var(--spacing-md);
}
.booking-consent-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}
.booking-other-person-fields {
    margin-top: var(--spacing-lg);
}
.booking-status-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}
.booking-status-icon,
.booking-status-inline-icon {
    color: var(--md-sys-color-accent);
}
.booking-login-card {
    padding: var(--spacing-md);
}
.booking-login-title,
.booking-login-copy {
    margin: 0 0 var(--spacing-sm);
}
.booking-login-copy {
    font-size: 13px;
}
.booking-icon-xs {
    font-size: 16px;
}
.booking-birthdate-input {
    max-width: 200px;
}
.booking-birthdate-input.is-readonly {
    background: var(--md-sys-color-surface-container);
}
.booking-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}
.booking-form-group-spaced,
.booking-otp-section {
    margin-bottom: var(--spacing-md);
}
.booking-inline-field,
.booking-otp-row {
    display: flex;
    gap: var(--spacing-sm);
}
.booking-otp-row {
    align-items: center;
}
.booking-inline-input {
    flex: 1;
}
.booking-nowrap {
    white-space: nowrap;
}
.booking-otp-code {
    width: 160px;
    text-align: center;
    letter-spacing: 4px;
    font-weight: 700;
    font-size: 18px;
}
.booking-otp-code.is-verified {
    border-color: var(--md-sys-color-success);
}
.booking-otp-help {
    margin-top: var(--spacing-xs);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 13px;
}
.booking-resend-link {
    margin-left: var(--spacing-sm);
}
.booking-status-inline-icon {
    vertical-align: middle;
    font-size: 16px;
}
.booking-status-inline-icon.is-success,
.booking-otp-success-text {
    color: var(--md-sys-color-success);
}
.booking-otp-success-text {
    font-weight: 600;
}
.booking-otp-error-text {
    color: var(--md-sys-color-error);
    font-size: 13px;
}

/* Mobile: Fullscreen */
@media (max-width: 600px) {
    .booking-modal {
        max-width: 100vw;
        width: 100vw;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    .booking-modal-backdrop {
        align-items: stretch;
    }
}

/* Health data consent expandable */
.health-data-more {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-medium, 12px);
    font-size: 13px;
    line-height: 1.6;
}
