/* Unified Popup Modal Styles */
/* Clean, modern design with gold theme integration */

/* Modal Container */
.unified-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.unified-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal Overlay */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    cursor: pointer;
}

/* Modal Container */
.modal-container {
    position: relative;
    background: linear-gradient(135deg, #fffaf0, #fefefe);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 2px solid #bf8c11;
    z-index: 10001;
}

.unified-modal.active .modal-container {
    transform: scale(1);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 15px;
    border-bottom: 1px solid #e8dfcc;
    background: linear-gradient(to right, #f9f4e8, #fefefe);
}

.modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #2c2c2c;
    letter-spacing: 0.5px;
}

.modal-close {
    background: linear-gradient(135deg, #bf8c11, #d4af37);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(191, 140, 17, 0.3);
}

.modal-close:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #d4af37, #bf8c11);
    box-shadow: 0 4px 12px rgba(191, 140, 17, 0.4);
}

/* Modal Body */
.modal-body {
    padding: 25px 30px 30px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Form Styles */
.popup-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d9c9a9;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #bf8c11;
    box-shadow: 0 0 0 3px rgba(191, 140, 17, 0.2);
}

.form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.field-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #bf8c11, #d4af37);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(191, 140, 17, 0.3);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #d4af37, #bf8c11);
    box-shadow: 0 6px 20px rgba(191, 140, 17, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Form Response */
.form-response {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

.form-response.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-response.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Alternative Contact */
.alternative-contact {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.or-divider {
    margin: 15px 0;
    color: #666;
    font-weight: 500;
    position: relative;
}

.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #eee;
    z-index: 1;
}

.or-divider span {
    background: #fff;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.phone-link {
    display: inline-block;
    padding: 12px 20px;
    background: #f9f4e8;
    border: 1px solid #d9c9a9;
    border-radius: 30px;
    color: #5a4a2d;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.phone-link:hover {
    background: #f0e6d0;
    border-color: #bf8c11;
    color: #bf8c11;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(191, 140, 17, 0.2);
}

.phone-link i {
    margin-right: 8px;
    color: #bf8c11;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px 20px 15px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .submit-btn {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .modal-container {
        width: 98%;
        margin: 5px;
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 18px 15px 12px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 18px 15px 20px;
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .unified-modal,
    .modal-container,
    .modal-close,
    .submit-btn,
    .phone-link {
        transition: none;
    }
    
    .unified-modal.active .modal-container {
        transform: none;
    }
}

/* Focus styles for accessibility */
.form-control:focus,
.modal-close:focus,
.submit-btn:focus,
.phone-link:focus {
    outline: 2px solid #bf8c11;
    outline-offset: 2px;
}

/* Hide scrollbar but keep functionality */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #bf8c11;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #d4af37;
}