/* Appointment Booking Module Styles */

.appointment-booking-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.appointment-booking-inner {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.appointment-info-text {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.appointment-info-text p {
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

/* Booking Steps */
.booking-step {
    display: none;
}

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

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

.booking-step-title {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

/* Calendar */
.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.current-month {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.btn-calendar-prev,
.btn-calendar-next {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-calendar-prev:hover,
.btn-calendar-next:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.calendar-container {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.weekday {
    padding: 6px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 10px;
    color: #6c757d;
    text-transform: uppercase;
}

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

.calendar-day {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px !important;
    color: #212529;
    cursor: not-allowed;
    user-select: none;
    position: relative;
    transition: all 0.2s;
    padding: 4px !important;
    min-height: 24px !important;
    height: 28px !important;
    max-height: 28px !important;
}

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

.calendar-day.available {
    cursor: pointer;
    font-weight: 500;
}

.calendar-day.available:hover {
    background: #e7f3ff;
    color: #007bff;
    transform: scale(1.05);
}

.calendar-day.selected {
    background: #007bff;
    color: #fff;
    font-weight: 600;
}

.calendar-day.disabled {
    color: #ced4da;
    background: #f8f9fa;
}

/* Time Slots */
.selected-date-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 16px;
}

.time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 6px;
    margin: 20px 0;
    min-height: 200px;
}

.time-slot {
    padding: 8px 10px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.time-slot:hover {
    border-color: #007bff;
    background: #e7f3ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.15);
}

.time-slot.selected {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.loading-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    padding: 40px;
}

/* Form */
.appointment-summary {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 16px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #212529;
    font-size: 14px;
}

.form-group label.required::after {
    content: " *";
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
}

/* Buttons */
.booking-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-outline-danger {
    background: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Confirmation Step */
.confirmation-message {
    text-align: center;
    padding: 30px 0;
}

.icon-success {
    margin-bottom: 20px;
}

.confirmation-message p {
    font-size: 16px;
    color: #495057;
    margin: 10px 0;
}

.confirmation-code-input {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.icon-success-large {
    margin-bottom: 25px;
}

.success-message h3 {
    font-size: 28px;
    color: #28a745;
    margin: 20px 0 15px 0;
}

.success-message p {
    font-size: 16px;
    color: #495057;
    margin: 10px 0;
    line-height: 1.6;
}

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

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

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.booking-loading p {
    color: #fff;
    margin-top: 20px;
    font-size: 16px;
}

/* Error Message */
.booking-error {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.booking-error.active {
    display: block;
}

.booking-error svg {
    margin-bottom: 15px;
}

.error-message {
    color: #dc3545;
    font-size: 16px;
    margin: 15px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .appointment-booking-inner {
        padding: 20px;
    }

    .booking-step-title {
        font-size: 20px;
    }

    .time-slots-container {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 6px;
    }

    .time-slot {
        padding: 8px 10px;
        font-size: 13px;
    }

    .booking-actions {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }

    .calendar-days {
        gap: 0;
    }
    
    .calendar-day {
        height: 28px;
        padding: 4px;
        font-size: 11px;
    }

    .weekday {
        padding: 6px 4px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .appointment-booking-container {
        padding: 10px;
        margin: 20px auto;
    }

    .appointment-booking-inner {
        padding: 15px;
    }

    .current-month {
        font-size: 16px;
    }

    .calendar-day {
        height: 28px;
        padding: 4px;
        font-size: 11px;
    }
    
    .time-slot {
        padding: 8px 10px;
        font-size: 13px;
    }
}