/**
 * Contact Form Success Animation Styles
 * Beautiful green checkmark animation with smooth transitions
 */

/* Success Animation Container */
.success-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    text-align: center;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.3);
}

/* Checkmark Circle */
.checkmark-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 
        0 10px 40px rgba(16, 185, 129, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.3);
    position: relative;
    animation: scaleIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Checkmark */
.checkmark {
    width: 45px;
    height: 22px;
    border-left: 5px solid white;
    border-bottom: 5px solid white;
    transform: rotate(-45deg);
    position: absolute;
    top: 32px;
    left: 27px;
    animation: drawCheck 0.8s 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
    opacity: 0;
}

/* Success Message */
.success-message {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.6s 0.4s forwards;
    opacity: 0;
}

/* Success Submessage */
.success-submessage {
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1.5;
    animation: fadeInUp 0.6s 0.5s forwards;
    opacity: 0;
    max-width: 300px;
    margin: 0 auto;
}

/* Animations */
@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes drawCheck {
    0% {
        opacity: 0;
        transform: rotate(-45deg) scale(0);
    }
    50% {
        opacity: 1;
        transform: rotate(-45deg) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: rotate(-45deg) scale(1);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Animate Success Class */
.animate-success {
    animation: fadeIn 0.5s forwards;
}

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

/* Error Message Styles */
.error-message {
    animation: shake 0.5s, fadeIn 0.3s;
}

/* Loading State for Button */
button[type="submit"]:disabled {
    cursor: not-allowed;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Mobile Responsive */
@media (max-width: 640px) {
    .success-container {
        width: 90%;
        max-width: 320px;
        padding: 30px;
    }
    
    .checkmark-circle {
        width: 80px;
        height: 80px;
    }
    
    .checkmark {
        width: 36px;
        height: 18px;
        top: 26px;
        left: 22px;
        border-left-width: 4px;
        border-bottom-width: 4px;
    }
    
    .success-message {
        font-size: 1.25rem;
    }
    
    .success-submessage {
        font-size: 0.9rem;
    }
}