/* ═══════════════════════════════════════════════════════════════
   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%;
    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-accent);
    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 {
    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: #fff;
}
.booking-option:hover {
    border-color: var(--md-sys-color-accent);
    box-shadow: 0 2px 8px rgba(194, 26, 100, 0.1);
}
.booking-option.selected {
    border-color: var(--md-sys-color-accent);
    background: rgba(194, 26, 100, 0.04);
}
.booking-option .option-icon {
    font-size: 36px;
    color: var(--md-sys-color-accent);
    margin-bottom: var(--spacing-sm);
}
.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 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: #fff;
    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, #fff);
}
.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: #fff;
}
.booking-slot-chip.selected {
    background: var(--md-sys-color-accent);
    color: #fff;
}
.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: #fff;
}
.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: rgba(194, 26, 100, 0.04);
}
.booking-expanded-slot.selected {
    background: var(--md-sys-color-accent);
    color: #fff;
    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: #fff;
}
.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: #fff;
}
.booking-day-slot:hover {
    border-color: var(--md-sys-color-accent);
    background: rgba(194, 26, 100, 0.04);
}
.booking-day-slot.selected {
    border-color: var(--md-sys-color-accent);
    background: var(--md-sys-color-accent);
    color: #fff;
}
.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: rgba(255, 255, 255, 0.8);
}
.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, #B3261E);
    background: var(--md-sys-color-error-container, #F9DEDC);
    color: var(--md-sys-color-on-error-container, #410E0B);
}
.booking-conflict-icon {
    font-size: 12px;
    color: var(--md-sys-color-error, #B3261E);
    vertical-align: middle;
    margin-left: 2px;
    cursor: help;
}
.booking-day-slot.has-conflict {
    border-color: var(--md-sys-color-error, #B3261E);
}
.booking-conflict-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--md-sys-color-error, #B3261E);
    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: rgba(0,0,0,0.5);
    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;
}
.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;
}

/* 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, #f5f5f5);
    border-radius: var(--md-sys-shape-corner-medium, 12px);
    font-size: 13px;
    line-height: 1.6;
}
