/* ============================================
   RESERVATIONS PAGE STYLES
   All measurements in rem for accessibility
   ============================================ */

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: center;
    gap: 1rem;
    position: relative;
    max-width: 40rem;
    margin: 0 auto;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 25%;
    right: 25%;
    height: 0.125rem;
    background: #dee2e6;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 8rem;
}

.step-number {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--bs-primary);
    color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: #198754;
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
    font-weight: 500;
}

.step.active .step-label {
    color: var(--bs-primary);
    font-weight: 600;
}

/* Main Card */
.reservation-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
}

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
}

/* Form Sections */
.form-section {
    margin-bottom: 1.5rem;
}

/* Date & Time Slots */
#reservation-date {
    cursor: pointer;
}

#time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.time-slot {
    padding: 1rem;
    border: 0.125rem solid #dee2e6;
    border-radius: 0.5rem;
    background: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
}

.time-slot:hover:not(.disabled):not(.selected) {
    border-color: var(--bs-primary);
    background: #f8f9fa;
    transform: translateY(-0.125rem);
}

.time-slot.selected {
    border-color: var(--bs-primary);
    background: var(--bs-primary);
    color: white;
}

.time-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8f9fa;
}

.time-slot.almost-full::after {
    content: 'Almost full';
    position: absolute;
    top: -0.625rem;
    right: -0.625rem;
    background: #ffc107;
    color: #000;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.time-slot-time {
    font-size: 1rem;
    display: block;
}

.time-slot-label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
    display: block;
}

/* Party Size Selector */
.party-size-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    gap: 0.75rem;
}

.party-size-btn {
    padding: 1.5rem 1rem;
    border: 0.125rem solid #dee2e6;
    border-radius: 0.75rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.party-size-btn:hover {
    border-color: var(--bs-primary);
    background: #f8f9fa;
    transform: translateY(-0.125rem);
}

.party-size-btn.selected {
    border-color: var(--bs-primary);
    background: var(--bs-primary);
    color: white;
}

.party-icon {
    font-size: 2rem;
}

.party-size-btn.selected .party-icon {
    filter: brightness(0) invert(1);
}

.party-label {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Special Requests */
.special-requests-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 1.25rem;
}

.suggestion-btn:hover {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

/* Confirmation Summary */
.reservation-summary {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.summary-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 0.0625rem solid #dee2e6;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item i {
    font-size: 1.25rem;
    color: var(--bs-primary);
    margin-top: 0.125rem;
}

.summary-content {
    flex: 1;
}

.summary-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

/* Confidence Badges */
.confidence-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.badge-item i {
    font-size: 1.125rem;
}

/* Buttons */
.btn-next,
.btn-back {
    min-height: 3rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#confirm-reservation-btn {
    min-height: 3.5rem;
    font-size: 1.25rem;
}

/* Responsive Design */
@media (max-width: 48rem) {
    .reservation-card {
        padding: 1.5rem;
    }

    .progress-steps {
        gap: 0.5rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .progress-steps::before {
        top: 1.25rem;
    }

    #time-slots-container {
        grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
        gap: 0.5rem;
    }

    .time-slot {
        padding: 0.75rem 0.5rem;
    }

    .party-size-selector {
        grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
        gap: 0.5rem;
    }

    .party-size-btn {
        padding: 1rem 0.5rem;
    }

    .party-icon {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reservation-step {
    animation: fadeIn 0.3s ease;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin: -1rem 0 0 -1rem;
    border: 0.25rem solid var(--bs-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Flatpickr Custom Styling */
.flatpickr-calendar {
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.15);
}

.flatpickr-day.selected {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}

.flatpickr-day.today {
    border-color: var(--bs-primary);
}

.flatpickr-day.disabled {
    color: #ccc;
}
