﻿/**
 * Exit Popup Styles
 * @package SOS_Pedagogico
 * @since 1.12
 */

/* Overlay */
.sos-exit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.sos-exit-popup-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease;
}

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

/* Modal */
.sos-exit-popup-modal {
    position: relative;
    max-width: 480px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

/* Close Button */
.sos-exit-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 2px solid #1e3a5f !important;
    background: #ffffff !important;
    color: #1e3a5f !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    line-height: 1 !important;
}

.sos-exit-popup-close:hover {
    background: #1e3a5f !important;
    color: #ffffff !important;
}

/* Image */
.sos-exit-popup-image {
    width: 100%;
    max-height: 200px;
    overflow: hidden;
}

.sos-exit-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content */
.sos-exit-popup-content {
    padding: 32px;
    text-align: center;
}

.sos-exit-popup-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.3;
}

.sos-exit-popup-subtitle {
    font-size: 16px;
    opacity: 0.8;
    margin: 0 0 24px;
}

/* Coupon */
.sos-exit-popup-coupon {
    background: #1e3a5f;
    color: #ffffff;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.sos-exit-popup-coupon-discount {
    font-size: 36px;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 12px;
}

.sos-exit-popup-coupon-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sos-exit-popup-coupon-label {
    font-size: 14px;
    opacity: 0.9;
}

.sos-exit-popup-code {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: monospace;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sos-exit-popup-code:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sos-exit-popup-copy {
    background: #ffffff !important;
    border: 2px solid #1e3a5f !important;
    font-size: 16px !important;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px !important;
    color: #1e3a5f !important;
    transition: all 0.2s ease;
}

.sos-exit-popup-copy:hover {
    background: #1e3a5f !important;
    color: #ffffff !important;
    border-color: #1e3a5f !important;
}

.sos-exit-popup-copy.copied {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

@keyframes copyPulse {
    50% { transform: scale(1.1); }
}

/* Product */
.sos-exit-popup-product {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: left;
}

.sos-exit-popup-product-image {
    flex-shrink: 0;
    width: 80px;
}

.sos-exit-popup-product-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.sos-exit-popup-product-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
}

.sos-exit-popup-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent, #F97316);
}

/* Newsletter */
.sos-exit-popup-newsletter {
    margin-bottom: 24px;
}

.sos-exit-popup-form {
    display: flex;
    gap: 10px;
}

.sos-exit-popup-form input[type="email"] {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.sos-exit-popup-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent, #F97316);
}

.sos-exit-popup-form button {
    padding: 14px 24px;
    background: var(--accent, #F97316);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sos-exit-popup-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

/* Actions */
.sos-exit-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sos-exit-popup-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: #10b981;
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.sos-exit-popup-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: #059669;
    color: #ffffff;
    text-decoration: none;
}

.sos-exit-popup-cta:active {
    transform: translateY(0);
}

.sos-exit-popup-cta.loading {
    opacity: 0.7;
    pointer-events: none;
}

.sos-exit-popup-cta.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.sos-exit-popup-cta.success {
    background: #059669 !important;
}

.sos-exit-popup-decline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    border: 2px solid #1e3a5f !important;
    padding: 14px 28px;
    color: #1e3a5f !important;
    font-size: 14px !important;
    font-weight: 600;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sos-exit-popup-decline:hover {
    background: #1e3a5f !important;
    color: #ffffff !important;
}

/* Responsividade */
@media (max-width: 600px) {
    .sos-exit-popup-overlay {
        padding: 10px;
        align-items: flex-end;
    }
    
    .sos-exit-popup-modal {
        border-radius: 16px 16px 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .sos-exit-popup-content {
        padding: 24px 20px;
    }
    
    .sos-exit-popup-title {
        font-size: 20px;
    }
    
    .sos-exit-popup-coupon-discount {
        font-size: 28px;
    }
    
    .sos-exit-popup-code {
        font-size: 16px;
        padding: 8px 16px;
    }
    
    .sos-exit-popup-product {
        flex-direction: column;
        text-align: center;
    }
    
    .sos-exit-popup-form {
        flex-direction: column;
    }
    
    .sos-exit-popup-cta {
        padding: 14px 24px;
        font-size: 14px;
    }
}



