/* =========================================
   SCHEDULE SESSION MODAL STYLES
   Modern Calendly-style booking interface
   ========================================= */

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 28, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .modal-backdrop.show {
        opacity: 1;
    }

/* Modal Container */
.schedule-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

    .schedule-modal.show {
        opacity: 1;
        transform: scale(1);
        pointer-events: all;
    }

.modal-dialog {
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
}

.modal-content {
    background: var(--pure-white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/* Modal Header */
.modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-gray);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--deep-navy);
    margin: 0 0 0.25rem 0;
}

.header-content .subtitle {
    font-size: 1rem;
    color: var(--calm-violet);
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--deep-navy);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

    .btn-close:hover {
        background: var(--light-gray);
        transform: rotate(90deg);
    }

/* Progress Steps */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-gray);
    gap: 0.5rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-gray);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .step.active .step-circle {
        background: linear-gradient(135deg, #0E51C7 0%, #7F4CB9 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(14, 81, 199, 0.3);
    }

    .step.completed .step-circle {
        background: var(--tranquil-green);
        color: white;
    }

.step-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

    .step.active .step-label {
        color: var(--deep-navy);
        font-weight: 600;
    }

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border-gray);
    transition: all 0.3s ease;
}

    .step-line.completed {
        background: var(--tranquil-green);
    }

/* Modal Body */
.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

    .loading-state p {
        color: #64748b;
        margin: 0;
    }

/* Step Content */
.step-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Week Navigator */
.week-navigator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--light-gray);
    border-radius: 12px;
}

.week-range {
    font-weight: 600;
    color: var(--deep-navy);
    font-size: 1rem;
}

.nav-btn {
    background: white;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .nav-btn:hover:not(:disabled) {
        background: var(--primary-gold);
        border-color: var(--primary-gold);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(246, 195, 68, 0.3);
    }

    .nav-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
}

.calendar-day {
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
}

    .calendar-day:hover:not(.disabled):not(.past) {
        border-color: var(--strong-blue);
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(14, 81, 199, 0.15);
    }

    .calendar-day.selected {
        border-color: var(--strong-blue);
        background: linear-gradient(135deg, rgba(14, 81, 199, 0.1) 0%, rgba(127, 76, 185, 0.1) 100%);
    }

    .calendar-day.disabled,
    .calendar-day.past {
        opacity: 0.4;
        cursor: not-allowed;
    }

.day-header {
    margin-bottom: 0.75rem;
}

.day-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.day-date {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--deep-navy);
}

.day-status {
    margin-top: 0.5rem;
}

.status-text {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
}

    .status-text.available {
        background: rgba(40, 155, 135, 0.1);
        color: var(--tranquil-green);
    }

    .status-text.unavailable {
        background: rgba(100, 116, 139, 0.1);
        color: #64748b;
    }

    .status-text.muted {
        color: #94a3b8;
    }

/* Selected Date Display */
.selected-date-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(14, 81, 199, 0.05) 0%, rgba(127, 76, 185, 0.05) 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(14, 81, 199, 0.2);
}

    .selected-date-display i {
        font-size: 1.5rem;
        color: var(--strong-blue);
    }

    .selected-date-display span {
        font-weight: 600;
        color: var(--deep-navy);
        font-size: 1rem;
    }

/* Time Slots Grid */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.time-slot {
    background: white;
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--deep-navy);
}

    .time-slot i {
        font-size: 1.25rem;
        color: var(--strong-blue);
    }

    .time-slot:hover {
        border-color: var(--strong-blue);
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(14, 81, 199, 0.15);
    }

    .time-slot.selected {
        background: linear-gradient(135deg, #0E51C7 0%, #7F4CB9 100%);
        border-color: var(--strong-blue);
        color: white;
        box-shadow: 0 8px 24px rgba(14, 81, 199, 0.3);
    }

        .time-slot.selected i {
            color: white;
        }

/* No Slots Message */
.no-slots-message {
    text-align: center;
    padding: 3rem 2rem;
}

    .no-slots-message i {
        font-size: 4rem;
        color: #cbd5e1;
        margin-bottom: 1rem;
    }

    .no-slots-message p {
        color: #64748b;
        margin-bottom: 1.5rem;
        font-size: 1.125rem;
    }

/* Booking Summary */
.booking-summary {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .summary-item:last-child {
        margin-bottom: 0;
    }

    .summary-item i {
        font-size: 1.5rem;
        color: var(--strong-blue);
        margin-top: 0.25rem;
    }

    .summary-item div {
        flex: 1;
    }

    .summary-item label {
        font-size: 0.875rem;
        color: #64748b;
        display: block;
        margin-bottom: 0.25rem;
    }

    .summary-item strong {
        display: block;
        font-size: 1.125rem;
        color: var(--deep-navy);
        font-weight: 600;
    }

    .summary-item span {
        color: #64748b;
        font-size: 0.95rem;
    }

/* Details Form */
.details-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .form-group label {
        font-weight: 600;
        color: var(--deep-navy);
        font-size: 0.95rem;
    }

.form-select,
.form-control {
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .form-select:focus,
    .form-control:focus {
        outline: none;
        border-color: var(--strong-blue);
        box-shadow: 0 0 0 4px rgba(14, 81, 199, 0.1);
    }

/* Alert */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

    .alert-danger i {
        font-size: 1.25rem;
    }

/* Modal Footer */
.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-gray);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.btn {
    padding: 0.875rem 1.75rem;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--deep-navy);
    border: 2px solid var(--border-gray);
}

    .btn-secondary:hover:not(:disabled) {
        background: #e2e8f0;
        transform: translateY(-2px);
    }

.btn-primary {
    background: linear-gradient(135deg, #0E51C7 0%, #7F4CB9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 81, 199, 0.3);
}

    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(14, 81, 199, 0.4);
    }

.btn-confirm {
    background: linear-gradient(135deg, #F6C344 0%, #f4b222 100%);
    box-shadow: 0 4px 12px rgba(246, 195, 68, 0.3);
}

    .btn-confirm:hover:not(:disabled) {
        box-shadow: 0 8px 24px rgba(246, 195, 68, 0.4);
    }

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-dialog {
        max-width: 100%;
        max-height: 100vh;
    }

    .modal-content {
        border-radius: 0;
        max-height: 100vh;
    }

    .calendar-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .progress-steps {
        padding: 1rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-line {
        width: 30px;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .time-slots-grid {
        grid-template-columns: 1fr;
    }
}
