/* Success Popup Styles */

.success-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-in-out forwards;
}

.success-popup-overlay.closing {
    animation: fadeOut 0.5s ease-in-out forwards;
}

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

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

.success-popup {
    background: white;
    border-radius: 15px;
    padding: 0;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.4s ease-out forwards;
}

.success-popup.closing {
    animation: slideDown 0.5s ease-in forwards;
}

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

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

/* Progress Bar */
.success-popup-progress-bar {
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #4caf50, #45a049);
    width: 100%;
    transform-origin: left;
}

@keyframes reduceWidth {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

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

/* Checkmark Animations */
.checkmark-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.checkmark-circle {
    stroke: #4caf50;
    stroke-width: 2;
    stroke-linecap: round;
    animation: strokeCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    stroke: #4caf50;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: strokeCheck 0.6s 0.3s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes strokeCircle {
    0% {
        stroke-dasharray: 166;
        stroke-dashoffset: 166;
    }
    100% {
        stroke-dasharray: 166;
        stroke-dashoffset: 0;
    }
}

@keyframes strokeCheck {
    0% {
        stroke-dasharray: 48;
        stroke-dashoffset: 48;
    }
    100% {
        stroke-dasharray: 48;
        stroke-dashoffset: 0;
    }
}

/* Text Content */
.success-popup-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 15px 0 10px 0;
    animation: slideInText 0.5s 0.4s ease-out forwards;
    opacity: 0;
}

.success-popup-message {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    animation: slideInText 0.5s 0.5s ease-out forwards;
    opacity: 0;
}

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

/* Responsive Design */
@media (max-width: 480px) {
    .success-popup {
        width: 85%;
        max-width: 100%;
    }

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

    .checkmark {
        width: 60px;
        height: 60px;
    }

    .success-popup-title {
        font-size: 20px;
    }

    .success-popup-message {
        font-size: 13px;
    }
}
