/* Popup Overlay with Blur */
.appointment-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.appointment-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.appointment-popup-content {
    background: #ffffff;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    /* Limit height to viewport height */
    overflow-y: auto;
    /* Enable vertical scrolling */
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    scrollbar-width: thin;
    /* Firefox */
}

/* Custom Scrollbar */
.appointment-popup-content::-webkit-scrollbar {
    width: 6px;
}

.appointment-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.appointment-popup-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.appointment-popup-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.appointment-popup-overlay.active .appointment-popup-content {
    transform: scale(1);
}

/* Close Button */
.close-popup-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s;
}

.close-popup-btn:hover {
    color: #ef4444;
}

/* Form Styles */
.popup-form h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    text-align: center;
}

.popup-form p {
    color: #6b7280;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 0.875rem;
    background-color: #FC6A1F;
    /* Brand Orange */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
}

.submit-btn:hover {
    background-color: #e55a15;
}

.submit-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Success/Error Messages */
.form-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
    display: none;
}

.form-message.success {
    color: #10b981;
    display: block;
}

.form-message.error {
    color: #ef4444;
    display: block;
}