/* Booking Page Specific Styles */

/* Header Adjustments for Booking Page */
.header-content {
    justify-content: space-between;
}

.header-nav {
    flex: 1;
    text-align: center;
}

.header-contact {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: var(--transition);
}

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

.contact-item.whatsapp {
    color: #25d366;
}

.contact-item.whatsapp:hover {
    color: #128c7e;
}

/* Booking Section */
.booking-section {
    padding: 120px 0 80px;
    background: var(--light-gray);
    min-height: 100vh;
}

.booking-header {
    text-align: center;
    margin-bottom: 3rem;
}

.booking-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.booking-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 3rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-bottom: 2rem;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    width: 20%;
    transition: width 0.5s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

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

.step.completed .step-number {
    background: var(--secondary-color);
    color: var(--white);
}

.step-label {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--primary-color);
}

/* Booking Form */
.booking-form {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

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

.step-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

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

.service-option {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: var(--white);
}

.service-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.service-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8f9ff, #fff5f0);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pink-accent);
    border-radius: 50%;
}

.service-icon img {
    width: 40px;
    height: 40px;
}

.service-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.service-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.service-info p {
    color: var(--gray);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.service-price {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.service-select {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}

.service-option.selected .service-select {
    opacity: 1;
    transform: scale(1);
}

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

.doctor-option {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: var(--white);
}

.doctor-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.doctor-option.selected {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.doctor-image {
    height: 200px;
    overflow: hidden;
}

.doctor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-info {
    padding: 1.5rem;
}

.doctor-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.doctor-specialty {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.doctor-experience {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.doctor-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.doctor-rating i {
    color: #ffc107;
    font-size: 0.9rem;
}

.doctor-rating span {
    margin-right: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.doctor-select {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}

.doctor-option.selected .doctor-select {
    opacity: 1;
    transform: scale(1);
}

/* Date Selection */
.date-selection {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.calendar-container {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

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

.calendar-nav {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

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

.calendar-title {
    color: var(--primary-color);
    margin: 0;
}

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.calendar-day.header {
    background: var(--primary-color);
    color: var(--white);
    cursor: default;
    font-size: 0.8rem;
}

.calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

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

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

.selected-date-info {
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
}

.selected-date-info h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.selected-date {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Time Selection */
.time-selection {
    max-width: 600px;
    margin: 0 auto;
}

.time-period {
    margin-bottom: 2rem;
}

.time-period h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

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

.time-slot {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

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

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

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

.selected-time-info {
    margin-top: 2rem;
    text-align: center;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: var(--border-radius);
}

.selected-time-info h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.selected-time {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Patient Information */
.patient-info {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 74, 151, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    line-height: 1.5;
    font-weight: normal;
}

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

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Booking Summary */
.booking-summary {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem 3rem;
    margin-top: 2rem;
}

.booking-summary h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.summary-item.total {
    font-size: 1.2rem;
    font-weight: 600;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    margin-top: 1rem;
    padding-top: 1rem;
}

.summary-item .label {
    font-weight: 500;
}

.summary-item .value {
    font-weight: 600;
}

/* Success Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon i {
    font-size: 2rem;
    color: var(--white);
}

.modal-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.modal-body {
    padding: 1rem 2rem;
}

.modal-body p {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2rem;
}

.booking-details {
    background: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.booking-details h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.detail-item span:first-child {
    color: var(--gray);
}

.detail-item span:last-child {
    font-weight: 600;
    color: var(--dark-gray);
}

.next-steps h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.next-steps ul {
    padding-right: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.5rem;
    color: var(--gray);
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-section {
        padding: 100px 0 60px;
    }

    .booking-title {
        font-size: 2rem;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .step {
        flex: 0 0 calc(50% - 0.5rem);
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

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

    .form-step {
        padding: 2rem 1.5rem;
    }

    .step-title {
        font-size: 1.5rem;
    }

    .services-selection,
    .doctors-selection {
        grid-template-columns: 1fr;
    }

    .date-selection {
        grid-template-columns: 1fr;
    }

    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-navigation {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .booking-summary {
        padding: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .header-nav {
        order: -1;
    }

    .header-contact {
        justify-content: center;
    }

    .modal-content {
        margin: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .progress-steps {
        display: none;
    }

    .progress-bar {
        margin-bottom: 1rem;
    }

    .booking-title {
        font-size: 1.8rem;
    }

    .step-title {
        font-size: 1.3rem;
    }

    .form-step {
        padding: 1.5rem 1rem;
    }

    .time-slots {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        gap: 0.25rem;
    }

    .calendar-day {
        font-size: 0.9rem;
    }
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

.form-group .error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}
