/* Contact Form Popup Modal Styles */
.modal-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
    padding: 20px;
    box-sizing: border-box;
}

.modal-popup.show,
.modal-popup[style*="display: flex"],
.modal-popup[style*="display:block"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

/* Desktop specific - ensure same centering as mobile */
@media (min-width: 769px) {
    .modal-popup.show,
    .modal-popup[style*="display: flex"],
    .modal-popup[style*="display:block"] {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        min-height: 100vh !important;
    }
}

.modal-popup-content {
    background-color: #fff;
    margin: 0;
    padding: 40px 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .modal-popup {
        padding: 10px;
    }
    
    .modal-popup.show,
    .modal-popup[style*="display: flex"],
    .modal-popup[style*="display:block"] {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
    }
    
    .modal-popup-content {
        padding: 30px 20px;
        max-height: 85vh;
        width: 95%;
        margin: 0;
    }
}

.close-popup {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-popup:hover,
.close-popup:focus {
    color: #000;
}

.modal-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.modal-icon.success:before {
    content: "✓";
    color: #28a745;
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    background-color: #d4edda;
    border: 3px solid #28a745;
}

.modal-icon.error:before {
    content: "✕";
    color: #dc3545;
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    background-color: #f8d7da;
    border: 3px solid #dc3545;
}

#modalTitle {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

#modalMessage {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Button loading state */
.tf-btn.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.tf-btn.loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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