/* ====================== [ Branded Success Popup ] ====================== */

/* Popup Overlay */
.if-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.if-popup-overlay.active {
    display: flex;
}

/* Popup Container */
.if-popup {
    background: #fff;
    border-radius: 30px;
    padding: 50px 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: center;
}

/* Dark Mode Support */
body:not(.light) .if-popup {
    background: #1f1f1f;
    color: #fff;
}

body.light .if-popup {
    background: #fff;
    color: #161616;
}

/* Close Button */
.if-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
    color: #666;
}

body:not(.light) .if-popup-close {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.if-popup-close:hover {
    background: #DDF160;
    color: #111;
    transform: rotate(90deg);
}

body:not(.light) .if-popup-close:hover {
    background: #9F8BE7;
    color: #fff;
}

/* Icon Container */
.if-popup-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: iconBounce 0.6s ease 0.2s;
}

/* Success Icon */
.if-popup-icon.success {
    background: linear-gradient(135deg, #DDF160 0%, #c9e04a 100%);
    box-shadow: 0 10px 30px rgba(221, 241, 96, 0.4);
}

body:not(.light) .if-popup-icon.success {
    background: linear-gradient(135deg, #9F8BE7 0%, #8a76d4 100%);
    box-shadow: 0 10px 30px rgba(159, 139, 231, 0.4);
}

.if-popup-icon i {
    font-size: 50px;
    color: #111;
}

body:not(.light) .if-popup-icon i {
    color: #fff;
}

/* Checkmark Animation Circle */
.if-popup-icon::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #DDF160;
    opacity: 0.3;
    animation: pulse 2s infinite;
}

body:not(.light) .if-popup-icon::before {
    border-color: #9F8BE7;
}

/* Title */
.if-popup-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    font-family: 'Funnel Display', sans-serif;
}

body.light .if-popup-title {
    color: #161616;
}

body:not(.light) .if-popup-title {
    color: #fff;
}

/* Message */
.if-popup-message {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.8;
}

body.light .if-popup-message {
    color: #585858;
}

body:not(.light) .if-popup-message {
    color: #d2d1d1;
}

/* Button */
.if-popup-btn {
    display: inline-block;
    padding: 15px 40px;
    background: #DDF160;
    color: #111;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body:not(.light) .if-popup-btn {
    background: #9F8BE7;
    color: #fff;
}

.if-popup-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(221, 241, 96, 0.4);
    background: #c9e04a;
}

body:not(.light) .if-popup-btn:hover {
    box-shadow: 0 10px 25px rgba(159, 139, 231, 0.4);
    background: #8a76d4;
}

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

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .if-popup {
        padding: 40px 30px;
        max-width: 90%;
    }
    
    .if-popup-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }
    
    .if-popup-icon i {
        font-size: 40px;
    }
    
    .if-popup-icon::before {
        width: 100px;
        height: 100px;
    }
    
    .if-popup-title {
        font-size: 24px;
    }
    
    .if-popup-message {
        font-size: 14px;
    }
    
    .if-popup-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* Newsletter Inline Message Styling */
#newsletter-message {
    margin-top: 15px;
    padding: 15px 20px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    animation: slideDown 0.3s ease;
}

#newsletter-message.success {
    background: rgba(221, 241, 96, 0.2);
    color: #DDF160;
    border: 2px solid #DDF160;
}

body.light #newsletter-message.success {
    background: rgba(221, 241, 96, 0.1);
    color: #5a6b1f;
    border-color: #DDF160;
}

#newsletter-message.error {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 2px solid #f44336;
}

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

