/* Booking Page Styles */
.booking-section {
    padding: 60px 0;
    background-color: #f8fafc;
    min-height: calc(100vh - 80px);
}

.booking-steps {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto 40px;
    position: relative;
}

.booking-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #e2e8f0;
    color: #64748b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: var(--primary);
    color: white;
}

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

.booking-form-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.booking-step {
    display: none;
}

.booking-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Service Selection */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.service-option {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.service-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.service-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.service-option h3 {
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.service-option p {
    color: #64748b;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.service-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin: 10px 0;
}

.service-duration {
    color: #64748b;
    font-size: 0.9rem;
}

/* Specialist Selection */
.specialist-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.specialists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.specialist-option {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.specialist-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.specialist-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.specialist-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.specialist-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    margin-right: 15px;
}

.specialist-info h3 {
    color: var(--dark);
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.specialist-specialty {
    color: var(--primary);
    font-weight: 500;
    margin: 0;
}

.specialist-details {
    margin-top: 15px;
}

.specialist-rating {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.specialist-rating .stars {
    color: #fbbf24;
    margin-right: 8px;
}

.specialist-experience, .specialist-patients {
    color: #64748b;
    font-size: 0.9rem;
    margin: 5px 0;
}

/* Date & Time Selection */
.datetime-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.calendar-container, .time-slots-container {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    text-align: center;
    padding: 8px;
    font-weight: 500;
    color: #64748b;
}

.calendar-date {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-date:hover {
    background: #e2e8f0;
}

.calendar-date.selected {
    background: var(--primary);
    color: white;
}

.calendar-date.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}


.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    max-height: 420px;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
}

.time-slot {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    min-height: 180px;
    padding: 18px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.time-slot::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 12px;
    border: 1px dashed transparent;
    transition: border-color 0.25s ease;
    pointer-events: none;
}

.time-slot:hover {
    border-color: rgba(15, 118, 110, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(15, 118, 110, 0.15);
}

.time-slot.selected {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.12) 0%, rgba(236, 253, 245, 0.65) 100%);
    box-shadow: 0 14px 32px rgba(15, 118, 110, 0.25);
}

.time-slot.selected::after {
    border-color: rgba(15, 118, 110, 0.25);
}

.time-slot-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-end;
}

.time-slot-segment {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.time-slot-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 600;
}

.time-slot-time-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
}

.time-slot-duration-value {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.time-slot-duration-note {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.time-slot-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0) 0%, rgba(148, 163, 184, 0.45) 50%, rgba(148, 163, 184, 0) 100%);
}

.time-slot-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
    color: #334155;
}

.time-slot-row {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.time-slot-row i {
    color: var(--primary);
}

.time-slot-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.time-slot-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
    font-size: 0.75rem;
    font-weight: 600;
}

.time-slot.selected .time-slot-label,
.time-slot.selected .time-slot-time-value,
.time-slot.selected .time-slot-duration-value,
.time-slot.selected .time-slot-duration-note,
.time-slot.selected .time-slot-body,
.time-slot.selected .time-slot-row,
.time-slot.selected .time-slot-row i,
.time-slot.selected .time-slot-badge,
.time-slot.selected .slot-occurrence-timeline,
.time-slot.selected .slot-occurrence-timeline .timeline-label,
.time-slot.selected .slot-occurrence-timeline .timeline-time,
.time-slot.selected .slot-occurrence-more {
    color: #044e46;
}

.time-slot.selected .time-slot-badge {
    background: rgba(15, 118, 110, 0.15);
}

.slot-occurrence-timeline {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.78rem;
    color: #475569;
}

.slot-occurrence-timeline .timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.slot-occurrence-timeline .timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
    flex-shrink: 0;
}

.slot-occurrence-timeline .timeline-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.slot-occurrence-timeline .timeline-label {
    font-weight: 600;
    color: #1e293b;
}

.slot-occurrence-timeline .timeline-time {
    color: #475569;
}

.slot-occurrence-more {
    margin-left: 18px;
    font-style: italic;
    color: #64748b;
}

.time-slot.disabled {
    background: #f1f5f9;
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
}

.time-slot.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e2e8f0;
}

/* No slots message */
.no-slots {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text);
    background: white;
    border-radius: 15px;
    border: 2px dashed var(--primary);
}

.no-slots p {
    margin: 5px 0;
    font-size: 1.1rem;
}

.no-slots p:first-child {
    font-weight: 600;
    color: var(--dark);
}

/* Loading state for time slots */
.time-slots.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.time-slot-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.time-slot-controls .control-group {
    flex: 1 1 160px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slot-interval-insight {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    border-radius: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(26, 147, 111, 0.12) 100%);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.slot-interval-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.01em;
}

.slot-interval-chip i {
    color: var(--primary);
    font-size: 1rem;
}

#slot-interval-indicator[data-interval="60"] .slot-interval-chip {
    background: rgba(126, 34, 206, 0.15);
}

#slot-interval-indicator[data-interval="15"] .slot-interval-chip {
    background: rgba(59, 130, 246, 0.15);
}

#slot-interval-indicator[data-interval="20"] .slot-interval-chip {
    background: rgba(6, 182, 212, 0.16);
}

#slot-interval-indicator[data-interval="30"] .slot-interval-chip {
    background: rgba(15, 118, 110, 0.16);
}

#slot-interval-indicator[data-interval="45"] .slot-interval-chip {
    background: rgba(249, 115, 22, 0.16);
}

.slot-interval-insight .control-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #475569;
}

.time-slot-controls label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.time-slot-controls select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    background: white;
    color: #0f172a;
}

.time-slot-controls input[type="time"] {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    background: white;
    color: #0f172a;
}

.time-slot-controls select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 147, 111, 0.15);
}

.time-slot-controls input[type="time"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 147, 111, 0.15);
}

.time-slot-controls .control-hint {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.3;
}

.time-slot-controls .control-hint[data-state="match"] {
    color: #198754;
}

.time-slot-controls .control-hint[data-state="miss"],
.time-slot-controls .control-hint[data-state="invalid"] {
    color: #c0392b;
}

.time-slot-controls .control-group-preferred {
    flex: 1 1 100%;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 12px 14px 14px;
}

.time-slot-controls .control-group-preferred label {
    margin-bottom: 4px;
}

.preferred-time-field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 6px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.preferred-time-field:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 147, 111, 0.18);
}

.preferred-time-field i {
    color: var(--primary);
    font-size: 1rem;
}

.preferred-time-field input[type="time"] {
    border: none;
    padding: 0;
    flex: 1;
    min-height: 34px;
}

.preferred-time-field input[type="time"]:focus {
    outline: none;
    box-shadow: none;
}

.time-slots.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Confirmation Step */
.booking-summary {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.summary-item strong {
    color: var(--dark);
}

.location-selection {
    margin: 30px 0;
}

.location-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.location-option {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-option:hover {
    border-color: var(--primary);
}

.location-option input[type="radio"] {
    display: none;
}

.location-option input[type="radio"]:checked + .location-content {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.location-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.location-option i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 8px;
}

.location-option span {
    color: var(--dark);
    font-weight: 500;
    margin-bottom: 5px;
}

.location-option small {
    color: #666;
    font-size: 0.85rem;
    opacity: 0.8;
}

.address-field {
    margin-top: 20px;
    display: none;
}

.address-field.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.additional-notes {
    margin: 20px 0;
}

.additional-notes textarea {
    min-height: 100px;
    resize: vertical;
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .booking-steps::before {
        display: none;
    }
    
    .step-indicator {
        flex-direction: row;
        gap: 15px;
    }
    
    .specialist-filters {
        grid-template-columns: 1fr;
    }
    
    .datetime-selection {
        grid-template-columns: 1fr;
    }
    
    .location-options {
        grid-template-columns: 1fr;
    }
    
    .services-grid,
    .specialists-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Elements */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 147, 111, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-full {
    width: 100%;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
}

.close:hover {
    color: var(--dark);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-container input {
    margin-right: 8px;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #64748b;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Alternatives */
.alternatives {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.alternatives h4 {
    margin: 0 0 15px 0;
    color: var(--dark);
    font-size: 1.1rem;
}

.alternative-date,
.alternative-specialist {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alternative-date:hover,
.alternative-specialist:hover {
    border-color: var(--primary);
    background: #f0fdf4;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 147, 111, 0.1);
}

.alternative-date strong,
.alternative-specialist strong {
    color: var(--primary);
    font-weight: 600;
}

.slots-count,
.first-slot,
.rate {
    font-size: 0.9rem;
    color: #666;
    margin-left: 10px;
}

.slots-count {
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.first-slot {
    font-style: italic;
}

.rate {
    color: var(--success);
    font-weight: 600;
}

/* Enhanced Location Options */
.address-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.address-input-group textarea {
    flex: 1;
    min-height: 80px;
}

.address-input-group .btn {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0;
}

.address-validation {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    display: none;
}

.address-validation.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    display: block;
}

.address-validation.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

.clinic-selection,
.online-details {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.5s ease;
}

.online-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 15px;
}

.online-info i {
    color: #3b82f6;
    font-size: 1.2rem;
}

.online-info span {
    color: #1e40af;
    font-weight: 500;
}

.online-requirements h4 {
    margin: 0 0 10px 0;
    color: var(--dark);
    font-size: 1rem;
}

.online-requirements ul {
    margin: 0;
    padding-left: 20px;
}

.online-requirements li {
    margin: 5px 0;
    color: #666;
    font-size: 0.9rem;
}

/* Location-specific pricing */
.location-pricing {
    margin-top: 15px;
    padding: 15px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    display: none;
}

.location-pricing.active {
    display: block;
}

.location-pricing h5 {
    margin: 0 0 10px 0;
    color: var(--success);
    font-size: 1rem;
}

.location-pricing .pricing-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.location-pricing .additional-fee {
    color: var(--warning);
    font-weight: 600;
}

/* Responsive adjustments for location options */
@media (max-width: 768px) {
    .location-options {
        grid-template-columns: 1fr;
    }
    
    .address-input-group {
        flex-direction: column;
    }
    
    .address-input-group .btn {
        align-self: stretch;
    }
}