/* Centro Médico Universal - Booking System CSS */

/* Booking Main Layout */
.booking-main {
    padding-top: 70px; /* Account for fixed navbar */
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.booking-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Booking Header */
.booking-header {
    text-align: center;
    margin-bottom: 3rem;
}

.booking-header h1 {
    font-size: 2.5rem;
    color: #2c5aa0;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.booking-header p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 3px solid #ddd;
}

.progress-step.active .step-circle {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.progress-step.completed .step-circle {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d72 100%);
    border-color: #2c5aa0;
    color: white;
}

.progress-step span {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    text-align: center;
}

.progress-step.active span,
.progress-step.completed span {
    color: #2c5aa0;
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    position: relative;
    z-index: 1;
    margin: 0 -10px;
    margin-bottom: 1.5rem;
}

.progress-line.completed {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Booking Form */
.booking-form {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.booking-step {
    padding: 3rem;
    display: none;
}

.booking-step.active {
    display: block;
    animation: slideInRight 0.3s ease;
}

.step-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.step-header h2 {
    color: #2c5aa0;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.step-header p {
    color: #666;
    font-size: 1rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading i {
    font-size: 2rem;
    color: #2c5aa0;
    margin-bottom: 1rem;
}

/* Doctor Selection */
.doctors-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.doctor-option {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.doctor-option:hover {
    border-color: #28a745;
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.2);
    transform: translateY(-2px);
}

.doctor-option.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(32, 201, 151, 0.05) 100%);
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.2);
}

.doctor-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.doctor-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.doctor-avatar i {
    font-size: 1.5rem;
    color: white;
}

.doctor-basic-info h3 {
    color: #2c5aa0;
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.doctor-specialty {
    color: #28a745;
    font-weight: 500;
    font-size: 0.9rem;
}

.doctor-details {
    margin-bottom: 1rem;
}

.doctor-experience {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.doctor-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.appointment-types {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.appointment-types h4 {
    color: #2c5aa0;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.appointment-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.appointment-type:last-child {
    border-bottom: none;
}

.type-info span:first-child {
    font-weight: 500;
    color: #333;
}

.type-info span:last-child {
    color: #666;
    font-size: 0.9rem;
}

.type-price {
    color: #28a745;
    font-weight: 600;
}

/* Calendar Styles */
.datetime-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.calendar-section h3,
.time-section h3 {
    color: #2c5aa0;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.calendar-container {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.calendar-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d72 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.calendar-nav {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.calendar-nav:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

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

.calendar-day {
    background: white;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.available {
    color: #333;
}

.calendar-day.available:hover {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.calendar-day.selected {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-weight: 600;
}

.calendar-day.unavailable {
    color: #ccc;
    cursor: not-allowed;
    background: #f8f9fa;
}

.calendar-day.other-month {
    color: #ccc;
}

.calendar-day-header {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
    cursor: default;
}

.calendar-day-header:hover {
    background: #f8f9fa;
}

/* Time Selection */
#available-times {
    max-height: 400px;
    overflow-y: auto;
}

.select-date-first {
    color: #666;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.time-slot {
    background: white;
    border: 2px solid #e9ecef;
    padding: 0.8rem 0.5rem;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.time-slot:hover {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.time-slot.selected {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
}

.time-slot.unavailable {
    background: #f8f9fa;
    color: #ccc;
    cursor: not-allowed;
    border-color: #f8f9fa;
}

/* Appointment Summary */
.appointment-summary {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(32, 201, 151, 0.05) 100%);
    border: 2px solid rgba(40, 167, 69, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.appointment-summary h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
    font-weight: 600;
}

.summary-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
}

.summary-item i {
    color: #28a745;
    font-size: 1.1rem;
    width: 20px;
}

/* Patient Form */
.patient-form {
    margin-bottom: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c5aa0;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Terms Checkbox */
.form-terms {
    margin-bottom: 2rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    cursor: pointer;
    color: #666;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 0.8rem;
}

/* Confirmation Step */
.confirmation-content {
    text-align: center;
    padding: 2rem 1rem;
}

.confirmation-icon {
    margin-bottom: 1.5rem;
}

.confirmation-icon i {
    font-size: 4rem;
    color: #28a745;
}

.confirmation-content h2 {
    color: #2c5aa0;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 600;
}

.confirmation-content > p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.confirmation-details {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(32, 201, 151, 0.05) 100%);
    border: 2px solid rgba(40, 167, 69, 0.2);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.confirmation-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.next-steps {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.next-steps h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.next-steps ul {
    list-style: none;
    padding: 0;
}

.next-steps li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    color: #666;
    line-height: 1.5;
}

.next-steps li i {
    color: #28a745;
    font-size: 1.1rem;
    width: 20px;
}

/* Navigation Buttons */
.step-navigation {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.step-navigation .btn:disabled {
    background: #e9ecef;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.step-navigation .btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-left: 4px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .datetime-selection {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .summary-details {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
}

@media (max-width: 768px) {
    .booking-container {
        padding: 1rem;
    }
    
    .booking-step {
        padding: 2rem 1.5rem;
    }
    
    .booking-header h1 {
        font-size: 2rem;
    }
    
    .progress-bar {
        padding: 0;
    }
    
    .progress-step span {
        font-size: 0.8rem;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
    }
    
    .doctors-selection {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .confirmation-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .booking-header h1 {
        font-size: 1.8rem;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .calendar-day {
        min-height: 40px;
        font-size: 0.9rem;
    }
    
    .progress-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-line {
        width: 2px;
        height: 30px;
        margin: 0;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .step-navigation,
    .confirmation-actions {
        display: none !important;
    }
    
    .booking-main {
        padding-top: 0;
    }
    
    .booking-step:not(#step-4) {
        display: none !important;
    }
    
    .confirmation-content {
        page-break-inside: avoid;
    }
}