/* Contact Form Modal - Complete Redesign */

/* Modal Overlay */
.contact-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.contact-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.contact-modal {
    background: #242736;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 520px;
    width: 90%;
    min-width: 350px;
    min-height: 320px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transform: scale(0.9) translateY(-30px);
    transition: all 0.3s ease-in-out;
    position: relative;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: visible;
}

.contact-modal-overlay.show .contact-modal {
    transform: scale(1) translateY(0);
}

/* Close Button */
.contact-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-weight: bold;
}

.contact-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Modal Content */
.contact-modal-content {
    text-align: center;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 220px;
    gap: 0.75rem;
    overflow: visible;
}

/* Modal Icon */
.contact-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    position: relative;
    flex-shrink: 0;
}

/* Progress State */
.contact-modal-icon.progress {
    background: linear-gradient(135deg, #d92e33, #c1252a);
    box-shadow: 0 10px 20px rgba(217, 46, 51, 0.3);
}

.contact-modal-icon.progress .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success State */
.contact-modal-icon.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
    animation: successPulse 0.6s ease-out;
}

.contact-modal-icon.success::before {
    content: "✓";
    font-weight: bold;
    font-size: 3rem;
    animation: checkmark 0.6s ease-out 0.2s both;
}

/* Error State */
.contact-modal-icon.error {
    background: linear-gradient(135deg, #d92e33, #c1252a);
    box-shadow: 0 10px 20px rgba(217, 46, 51, 0.3);
    animation: errorShake 0.6s ease-out;
}

.contact-modal-icon.error::before {
    content: "✕";
    font-weight: bold;
    font-size: 3rem;
    animation: errormark 0.6s ease-out 0.2s both;
}

/* Modal Title */
.contact-modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
    line-height: 1.4;
    word-wrap: break-word;
    hyphens: auto;
    white-space: nowrap;
    overflow: visible;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.contact-modal-title.progress {
    color: #fff;
}

.contact-modal-title.success {
    color: #28a745;
}

.contact-modal-title.error {
    color: #d92e33;
}

/* Modal Message */
.contact-modal-message {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #bdc3c7;
    margin: 0;
    max-width: 420px;
    word-wrap: break-word;
    hyphens: auto;
    overflow: visible;
}

/* Action Buttons */
.contact-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.contact-modal-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.contact-modal-btn.primary {
    background: #d92e33;
    color: #fff;
}

.contact-modal-btn.primary:hover {
    background: #c1252a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 46, 51, 0.3);
}

.contact-modal-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Email Link */
.contact-modal-email {
    color: #d92e33;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-modal-email:hover {
    color: #c1252a;
    text-decoration: underline;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes successPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes checkmark {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes errormark {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-modal {
        padding: 2rem 1.5rem;
        margin: 1rem;
        min-width: 300px;
        max-width: 95vw;
    }
    
    .contact-modal-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .contact-modal-icon.progress .spinner {
        width: 30px;
        height: 30px;
        border-width: 3px;
    }
    
    .contact-modal-icon.success::before,
    .contact-modal-icon.error::before {
        font-size: 2rem;
    }
    
    .contact-modal-title {
        font-size: 1.3rem;
    }
    
    .contact-modal-message {
        font-size: 0.9rem;
    }
    
    .contact-modal-actions {
        flex-direction: column;
    }
    
    .contact-modal-btn {
        width: 100%;
    }
}

/* Dark theme optimization */
@media (prefers-color-scheme: light) {
    .contact-modal {
        background: #fff;
        color: #333;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .contact-modal-title {
        color: #333;
    }
    
    .contact-modal-message {
        color: #666;
    }
    
    .contact-modal-close {
        background: rgba(0, 0, 0, 0.1);
        color: #333;
    }
    
    .contact-modal-close:hover {
        background: rgba(0, 0, 0, 0.2);
    }
}