/**
 * DBMedica Booking Styles
 * Styles for the booking interface on mavit.it
 */

/* Main Container */
#dbmedica-booking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 15px;
}

/* Step Indicator */
.booking-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
}

.booking-steps .step {
    flex: 1;
    text-align: center;
    position: relative;
    opacity: 0.5;
    transition: all 0.3s;
}

.booking-steps .step.active,
.booking-steps .step.completed {
    opacity: 1;
}

.booking-steps .step .step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-weight: bold;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.booking-steps .step.active .step-number {
    background: #007bff;
    color: white;
}

.booking-steps .step.completed .step-number {
    background: #28a745;
    color: white;
}

.booking-steps .step.completed .step-number::after {
    content: "✓";
}

.booking-steps .step .step-title {
    display: block;
    font-size: 14px;
    color: #333;
}

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

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

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

/* Step Content */
.booking-step-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.booking-step-content h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s;
}

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

.form-control:required:invalid {
    border-color: #dc3545;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #6c757d;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

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

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

.btn-secondary:hover {
    background: #545b62;
}

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

.btn-success:hover {
    background: #218838;
}

.btn-outline-secondary {
    background: white;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 18px;
}

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

/* Navigation Buttons */
.booking-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* Available Slots */
#available-slots-container {
    margin-top: 30px;
}

.slots-date-group {
    margin-bottom: 30px;
}

.slots-date-group h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.slot-button {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.slot-button:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

.slot-button.selected {
    border-color: #007bff;
    background: #e7f3ff;
}

.slot-button .slot-time {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 8px;
}

.slot-button .slot-doctor {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.slot-button .slot-location {
    display: block;
    font-size: 12px;
    color: #666;
}

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

.booking-summary h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.summary-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-section h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-section p {
    font-size: 16px;
    color: #333;
    margin: 0;
}

/* OTP Modal */
#otp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

#otp-modal .modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

#otp-modal h3 {
    margin-bottom: 20px;
    color: #333;
}

#otp-modal .form-group {
    margin: 20px 0;
}

#otp-modal #otp-code {
    font-size: 24px;
    letter-spacing: 10px;
    text-align: center;
    font-weight: bold;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    position: relative;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert .close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.5;
}

.alert .close:hover {
    opacity: 1;
}

/* Success Page */
.booking-step-content[data-step-content="success"] .alert-success {
    text-align: center;
    padding: 40px;
}

.booking-step-content[data-step-content="success"] .alert-success h2 {
    color: #155724;
    margin-bottom: 20px;
}

.booking-step-content[data-step-content="success"] .alert-success i {
    font-size: 48px;
    vertical-align: middle;
    margin-right: 10px;
}

/* Privacy Checkbox */
.form-check {
    display: flex;
    align-items: flex-start;
    margin: 20px 0;
}

.form-check-input {
    margin-right: 10px;
    margin-top: 3px;
}

.form-check-label {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.form-check-label a {
    color: #007bff;
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 768px) {
    .booking-steps {
        flex-wrap: wrap;
    }

    .booking-steps .step {
        flex-basis: 50%;
        margin-bottom: 20px;
    }

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

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

    .booking-nav-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .booking-nav-buttons .btn {
        width: 100%;
    }

    #otp-modal .modal-content {
        padding: 20px;
    }
}

/* Material Icons Support */
.material-icons {
    vertical-align: middle;
    font-size: 20px;
}
