/* ========================================== */
/* POPUP DE SUCESSO COM CONFETE */
/* ========================================== */

.success-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.success-popup {
    background: linear-gradient(135deg, #1e7e34, #28a745);
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.7);
    animation: popIn 0.5s ease forwards;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.success-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.success-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.success-content {
    position: relative;
    z-index: 10001;
}

.success-icon {
    font-size: 4rem;
    color: white;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease 0.2s both;
}

.success-title {
    color: white;
    font-size: 2rem;
    margin: 0 0 15px 0;
    font-weight: 700;
    animation: slideInUp 0.5s ease 0.3s both;
}

.success-message {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    font-weight: 500;
    animation: slideInUp 0.5s ease 0.4s both;
}

.success-details {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    animation: slideInUp 0.5s ease 0.5s both;
}

.success-details i {
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.9);
}

/* Canvas para confete */
.confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 20px;
}

/* ========================================== */
/* ANIMAÇÕES DO POPUP */
/* ========================================== */

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes popIn {
    0% { transform: scale(0.7) rotate(-5deg); }
    50% { transform: scale(1.05) rotate(2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes bounceIn {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(-90deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes slideInUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; transform: scale(0.9); }
}

.success-popup-overlay.closing {
    animation: fadeOut 0.3s ease forwards;
}

/* ========================================== */
/* RESPONSIVIDADE DO POPUP */
/* ========================================== */

@media (max-width: 768px) {
    .success-popup {
        padding: 30px 20px;
        max-width: 350px;
    }
    
    .success-title {
        font-size: 1.7rem;
    }
    
    .success-message {
        font-size: 1.1rem;
    }
    
    .success-icon {
        font-size: 3.5rem;
    }
}
