/**
 * Success Popup Modal - Beautiful Alert for Contact Forms
 * Modern, animated success message popup
 */

/* Modal Overlay */
.success-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999999;
    animation: fadeIn 0.3s ease-in-out;
}

.success-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Container */
.success-modal {
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

/* Success Icon Container */
.success-icon-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    text-align: center;
    position: relative;
}

.success-checkmark {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleUp 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s both;
}

.success-checkmark i {
    font-size: 50px;
    color: #10b981;
    animation: checkmarkPop 0.3s ease-in-out 0.7s both;
}

/* Confetti Background */
.confetti-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFD700;
    opacity: 0;
    animation: confettiFall 2s ease-in-out;
}

.confetti:nth-child(1) { left: 10%; animation-delay: 0s; background: #667eea; }
.confetti:nth-child(2) { left: 20%; animation-delay: 0.1s; background: #10b981; }
.confetti:nth-child(3) { left: 30%; animation-delay: 0.2s; background: #f59e0b; }
.confetti:nth-child(4) { left: 40%; animation-delay: 0.3s; background: #ef4444; }
.confetti:nth-child(5) { left: 50%; animation-delay: 0.4s; background: #8b5cf6; }
.confetti:nth-child(6) { left: 60%; animation-delay: 0.5s; background: #06b6d4; }
.confetti:nth-child(7) { left: 70%; animation-delay: 0.6s; background: #ec4899; }
.confetti:nth-child(8) { left: 80%; animation-delay: 0.7s; background: #f97316; }
.confetti:nth-child(9) { left: 90%; animation-delay: 0.8s; background: #3b82f6; }
.confetti:nth-child(10) { left: 95%; animation-delay: 0.9s; background: #14b8a6; }

/* Modal Content */
.success-modal-content {
    padding: 40px 30px;
    text-align: center;
}

.success-modal-content h2 {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 15px;
    animation: fadeInUp 0.5s ease-in-out 0.3s both;
}

.success-modal-content .success-message {
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 25px;
    animation: fadeInUp 0.5s ease-in-out 0.4s both;
}

.success-details {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    animation: fadeInUp 0.5s ease-in-out 0.5s both;
}

.success-details p {
    margin: 10px 0;
    color: #475569;
    font-size: 14px;
}

.success-details p i {
    color: #667eea;
    margin-right: 8px;
    width: 20px;
}

.success-details strong {
    color: #1e293b;
    font-weight: 600;
}

/* Action Buttons */
.success-actions {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.5s ease-in-out 0.6s both;
}

.success-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

.success-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #FFFFFF;
}

.success-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.success-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.success-btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* Close Button */
.success-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

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

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

@keyframes scaleUp {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

@keyframes confettiFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(300px) rotate(720deg);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .success-modal {
        width: 95%;
        max-width: none;
    }

    .success-icon-container {
        padding: 30px 20px;
    }

    .success-checkmark {
        width: 80px;
        height: 80px;
    }

    .success-checkmark i {
        font-size: 40px;
    }

    .success-modal-content {
        padding: 30px 20px;
    }

    .success-modal-content h2 {
        font-size: 24px;
    }

    .success-actions {
        flex-direction: column;
    }

    .success-btn {
        width: 100%;
    }
}
