:root {
    --primary-color: #0f4c81;
    --secondary-color: #1e88e5;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

.booking-page {
    padding-top: 160px;
    padding-bottom: 80px;
    background: var(--bg-light);
    min-height: 100vh;
}

.booking-header {
    text-align: center;
    margin-bottom: 50px;
}

.booking-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.booking-header p {
    font-size: 16px;
    color: var(--text-light);
}

.booking-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 50px;
    box-shadow: var(--shadow-md);
}

/* Calendar Section */
.calendar-section {
    margin-bottom: 40px;
}

.calendar-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: var(--bg-light);
    border-radius: 10px;
}

.calendar-month {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav button:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.calendar-nav button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

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

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
    padding: 10px;
    font-size: 14px;
}

.calendar-weekday.sunday {
    color: #e74c3c;
}

.calendar-weekday.saturday {
    color: #3498db;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: white;
}

.calendar-day.empty {
    border: none;
    cursor: default;
}

.calendar-day.past {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #f0f0f0;
}

.calendar-day.unavailable {
    background: #ffebee;
    color: #c62828;
    cursor: not-allowed;
    border-color: #ffcdd2;
}

.calendar-day.available:hover {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

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

.day-number {
    font-size: 16px;
    font-weight: 600;
}

.day-status {
    font-size: 11px;
    margin-top: 5px;
    font-weight: 500;
}

.calendar-day.available .day-status {
    color: #2e7d32;
}

.calendar-day.selected .day-status {
    color: white;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.legend-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid;
}

.legend-box.available {
    background: white;
    border-color: #e0e0e0;
}

.legend-box.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.legend-box.unavailable {
    background: #ffebee;
    border-color: #ffcdd2;
}

/* Time Selection */
.time-section {
    margin-top: 50px;
    margin-bottom: 40px;
    display: none;
}

.time-section.active {
    display: block;
}

.time-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-date-info {
    background: #e3f2fd;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--primary-color);
}

.time-dropdown-wrapper {
    position: relative;
}

.time-dropdown {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-dropdown:hover {
    border-color: var(--primary-color);
}

.time-dropdown.open {
    border-color: var(--primary-color);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.time-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.time-options.open {
    display: block;
}

.time-option {
    padding: 15px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.time-option:last-child {
    border-bottom: none;
}

.time-option:hover {
    background: #f8f9fa;
}

.time-option.disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}

.time-option.disabled:hover {
    background: #f5f5f5;
}

.time-label {
    font-weight: 600;
    font-size: 16px;
}

.time-blocks {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blocks-available {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.blocks-available.has-blocks {
    background: #e8f5e9;
    color: #2e7d32;
}

.blocks-available.no-blocks {
    background: #ffebee;
    color: #c62828;
}

.blocks-icon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.blocks-available.has-blocks .blocks-icon {
    background: #2e7d32;
}

.blocks-available.no-blocks .blocks-icon {
    background: #c62828;
}

/* Patient Information Form */
.patient-form {
    display: none;
}

.patient-form.active {
    display: block;
}

.form-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

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

.required {
    color: #e74c3c;
    margin-left: 3px;
}

/* Booking Summary */
.booking-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.booking-summary h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

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

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

.summary-label {
    color: var(--text-light);
}

.summary-value {
    font-weight: 600;
    color: var(--text-dark);
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #0a3a63;
}

.btn-secondary {
    background: #e0e0e0;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #d0d0d0;
}

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

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
}

.loading-spinner {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .booking-page {
        padding-top: 120px;
        padding-bottom: 40px;
    }
    
    .booking-container {
        padding: 20px 15px;
    }
    
    .booking-header h1 {
        font-size: 28px;
    }
    
    .calendar-section {
        overflow-x: auto;
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .calendar-grid {
        gap: 3px;
        min-width: 100%;
    }
    
    .calendar-weekday {
        padding: 8px 2px;
        font-size: 12px;
    }
    
    .calendar-day {
        font-size: 12px;
        border-width: 1px;
        border-radius: 8px;
    }
    
    .day-number {
        font-size: 13px;
    }
    
    .day-status {
        font-size: 9px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .calendar-legend {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .legend-item {
        font-size: 12px;
    }
}


.success-page {
    padding-top: 160px;
    padding-bottom: 80px;
    background: var(--bg-light);
    min-height: 100vh;
}

.success-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 60px 50px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: white;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.success-message {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.6;
}

.reservation-details {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    text-align: left;
}

.details-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-label i {
    width: 20px;
    color: var(--primary-color);
}

.detail-value {
    font-weight: 600;
    color: var(--text-dark);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 15px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.info-box {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: left;
}

.info-box-title {
    font-weight: 600;
    color: #f57c00;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box-text {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.6;
}

.info-box-text ul {
    margin: 10px 0;
    padding-left: 20px;
}

.info-box-text li {
    margin: 5px 0;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0a3a63;
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.contact-section {
    padding: 25px;
    background: #e3f2fd;
    border-radius: 15px;
    margin-top: 30px;
}

.contact-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border-radius: 20px;
    font-weight: 500;
    color: var(--text-dark);
}

.contact-item i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .success-page {
        padding-top: 120px;
        padding-bottom: 40px;
    }
    
    .success-container {
        padding: 40px 20px;
    }
    
    .success-icon {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }
    
    .success-title {
        font-size: 24px;
    }
    
    .reservation-details {
        padding: 20px 15px;
    }
    
    .details-header {
        font-size: 16px;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 8px;
        padding: 12px 0;
    }
    
    .detail-label {
        font-size: 14px;
    }
    
    .detail-value {
        font-size: 15px;
        padding-left: 28px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        flex-direction: column;
    }
    
    .contact-item {
        justify-content: center;
    }
}