/* Modern Contact Modal */
.contact-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Prevent scrollbar jump */
body.modal-open {
    overflow: hidden;
}

.contact-modal-overlay.active {
    display: block;
    opacity: 1;
}

.contact-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 650px;
    height: 63vh;
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.contact-modal-overlay.active .contact-modal {
    transform: translate(-50%, -50%) scale(1);
}

.contact-modal-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 3px solid #52adb6;
    padding: 25px 30px;
    position: relative;
}

.contact-modal-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    color: #2c3e50;
}

.contact-modal-header p {
    margin: 8px 0 0 0;
    font-size: 15px;
    color: #6c757d;
}

.contact-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 2px solid #dee2e6;
    color: #6c757d;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.contact-modal-close:hover {
    background: #f8f9fa;
    border-color: #52adb6;
    color: #52adb6;
    transform: rotate(90deg);
}

.contact-modal-body {
    padding: 0;
    position: relative;
    flex: 1;
    background: #ecedf4;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.contact-modal-iframe {
    width: 100%;
    height: 950px;
    border: none;
    background: white;
    display: block;
    margin-bottom: 0;
    clip-path: inset(0 0 200px 0);
}

.contact-modal-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #52adb6;
    z-index: 100000;
    display: block;
    background: rgba(236, 237, 244, 0.95);
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-modal-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top-color: #52adb6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .contact-modal {
        width: 95%;
        height: 60vh;
    }
    
    .contact-modal-header {
        padding: 20px;
    }
    
    .contact-modal-header h2 {
        font-size: 22px;
    }
    
    .contact-modal-header p {
        font-size: 14px;
    }
    
    .contact-modal-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .contact-modal-iframe {
        height: 950px;
        margin-bottom: 0;
        clip-path: inset(0 0 200px 0);
    }
    
    .contact-modal-close {
        width: 36px;
        height: 36px;
        font-size: 24px;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .contact-modal {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .contact-modal-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .contact-modal-iframe {
        height: 950px;
        margin-bottom: 0;
        clip-path: inset(0 0 200px 0);
    }
}
