/* Appointment Booking Styles */

/* CTA Section */
.appointment-cta-section {
    margin-top: 30px;
    padding: 20px 0;
}

.appointment-cta-section .theme-btn {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.appointment-cta-section .theme-btn i {
    font-size: 18px;
}

/* Modal Styles */
.appointment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow-y: auto;
}

.appointment-modal.active {
    display: block;
}

.appointment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.appointment-modal-content {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2;
    animation: modalSlideIn 0.4s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.appointment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-radius: 16px 16px 0 0;
}

.appointment-modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Alert Messages */
.appointment-alert {
    margin: 20px 30px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
}

.appointment-alert strong {
    display: block;
    margin-bottom: 5px;
}

/* Progress Steps */
.appointment-steps {
    display: flex;
    justify-content: space-between;
    padding: 30px 30px 20px;
    position: relative;
}

.appointment-steps::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 30px;
    right: 30px;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-label {
    font-size: 13px;
    color: #666666;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

.step.active .step-label {
    color: #0066cc;
}

.step.completed .step-number {
    background: #28a745;
    color: #ffffff;
}

.step.completed .step-number::after {
    content: '✓';
    font-size: 20px;
}

.step.completed .step-label {
    color: #28a745;
}

/* Modal Body */
.appointment-modal-body {
    padding: 30px;
    min-height: 400px;
}

.appointment-step-content h4 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #222222;
}

.step-description {
    margin-bottom: 25px;
    color: #666666;
    font-size: 15px;
}

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

.appointment-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333333;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.appointment-date-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
}

/* Time Slots */
.time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.time-slot-option {
    cursor: pointer;
    position: relative;
}

.time-slot-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.time-slot-btn {
    display: block;
    padding: 12px 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    color: #333333;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.time-slot-btn:hover {
    border-color: #0066cc;
    background-color: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

.time-slot-option input[type="radio"]:checked+.time-slot-btn {
    border-color: #0066cc;
    background-color: #0066cc;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.time-slot-option input[type="radio"]:disabled+.time-slot-btn {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
    border-color: #d0d0d0;
}

.time-slot-option input[type="radio"]:disabled+.time-slot-btn:hover {
    transform: none;
    box-shadow: none;
}

/* Alert styles for availability messages */
.availability-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.6;
}

.availability-alert strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.availability-alert p {
    margin: 5px 0 0;
}

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

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

/* Loading state */
.time-slots-loading {
    text-align: center;
    padding: 30px;
    color: #666666;
    font-size: 16px;
}

.time-slots-loading:after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

/* Appointment Summary */
.appointment-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.summary-section {
    margin-bottom: 25px;
}

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

.summary-section h5 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 700;
    color: #0066cc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-section h5 i {
    font-size: 18px;
}

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

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

.summary-item strong {
    color: #555555;
    font-weight: 600;
    min-width: 120px;
}

.summary-item span {
    color: #222222;
    text-align: right;
    flex: 1;
}

.message-preview {
    margin: 5px 0 0;
    padding: 10px;
    background: #ffffff;
    border-radius: 6px;
    color: #555555;
    font-size: 14px;
    line-height: 1.6;
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.step-actions button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.step-actions .btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #ffffff;
    flex: 1;
}

.step-actions .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

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

.step-actions .btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.step-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.step-actions .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: #ffffff;
    flex: 1;
}

.step-actions .btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.step-actions .btn-success:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .appointment-modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .appointment-modal-header {
        padding: 20px;
    }

    .appointment-modal-header h3 {
        font-size: 20px;
    }

    .appointment-modal-body {
        padding: 20px;
    }

    .appointment-steps {
        padding: 20px 15px 15px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .step-label {
        font-size: 11px;
    }

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

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

    .step-actions {
        flex-direction: column;
    }

    .step-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .appointment-modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
        border-radius: 12px;
    }

    .appointment-modal-header h3 {
        font-size: 18px;
    }

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

    .appointment-steps::before {
        display: none;
    }

    .step {
        flex-direction: column;
    }
}
