/**
 * Unified Popups CSS - Style Compact Exit-Intent v8.3.0
 * ==============================================================================
 * Style de reference: exit-intent-popup.php
 * Caracteristiques:
 * - max-width: 280px (compact)
 * - border-radius: 8px
 * - padding compact
 * - Badge colore avec gradient vert
 * - Input avec border: 1.5px solid #cbd5e1
 * - Bouton vert #10b981
 * - Checkbox stylisee
 * - Animations subtiles
 *
 * @package Forever_BE_Premium
 * @since 8.3.0
 */

/* =============================================================================
   BASE OVERLAY & MODAL STRUCTURE
   ============================================================================= */

.unified-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .75rem;
    animation: unifiedFade .2s ease;
    backdrop-filter: blur(2px);
}

@keyframes unifiedFade {
    from { opacity: 0; }
}

.unified-popup-modal {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 280px;
    position: relative;
    animation: unifiedSlide .25s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, .15);
}

@keyframes unifiedSlide {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

/* =============================================================================
   CLOSE BUTTON
   ============================================================================= */

.unified-popup-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all .15s;
    z-index: 10;
}

.unified-popup-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

/* =============================================================================
   BODY CONTENT
   ============================================================================= */

.unified-popup-body {
    padding: 1rem 1rem .75rem;
    text-align: center;
}

/* =============================================================================
   BADGE - Style gradient vert
   ============================================================================= */

.unified-popup-badge {
    display: inline-block;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .2rem .6rem;
    border-radius: 12px;
    margin-bottom: .4rem;
}

/* =============================================================================
   TITLE & DESCRIPTION
   ============================================================================= */

.unified-popup-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 .15rem;
    line-height: 1.2;
}

.unified-popup-desc {
    font-size: .8rem;
    color: #334155;
    margin: 0 0 .6rem;
    font-weight: 500;
}

/* =============================================================================
   FORM ELEMENTS
   ============================================================================= */

.unified-popup-form {
    margin: 0;
}

/* Input field */
.unified-popup-input {
    width: 100%;
    padding: .5rem .65rem;
    font-size: .8rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    color: #1e293b;
    transition: all .15s;
    font-weight: 500;
    margin-bottom: .5rem;
}

.unified-popup-input::placeholder {
    color: #64748b;
}

.unified-popup-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, .1);
}

/* =============================================================================
   CHECKBOX - Style compact et elegant
   ============================================================================= */

.unified-popup-checkbox {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    cursor: pointer;
    margin-bottom: .5rem;
    text-align: left;
}

.unified-popup-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.unified-popup-checkmark {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 3px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    margin-top: 1px;
}

.unified-popup-checkbox input:checked ~ .unified-popup-checkmark {
    background: #10b981;
    border-color: #10b981;
}

.unified-popup-checkbox input:checked ~ .unified-popup-checkmark::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.unified-popup-checkbox-text {
    font-size: .7rem;
    color: #475569;
    line-height: 1.3;
}

/* =============================================================================
   BUTTON - Vert #10b981
   ============================================================================= */

.unified-popup-btn {
    width: 100%;
    padding: .5rem .75rem;
    font-size: .8rem;
    font-weight: 600;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
}

.unified-popup-btn:hover {
    background: #059669;
}

.unified-popup-btn:active {
    transform: scale(.98);
}

.unified-popup-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.unified-popup-btn-loader {
    animation: unifiedSpin .8s linear infinite;
}

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

/* =============================================================================
   SKIP LINK
   ============================================================================= */

.unified-popup-skip {
    display: block;
    text-align: center;
    padding: .4rem;
    font-size: .65rem;
    color: #94a3b8;
    text-decoration: none;
    border-top: 1px solid #f1f5f9;
    transition: color .15s;
}

.unified-popup-skip:hover {
    color: #64748b;
}

/* =============================================================================
   SUCCESS MESSAGE
   ============================================================================= */

.unified-popup-success {
    padding: .5rem 0;
    text-align: center;
}

.unified-popup-success svg {
    margin-bottom: .25rem;
}

.unified-popup-success-msg {
    font-size: .8rem;
    color: #10b981;
    font-weight: 600;
    margin: 0 0 .25rem;
}

.unified-popup-code {
    display: inline-block;
    background: #f0fdf4;
    color: #059669;
    font-size: .85rem;
    font-weight: 700;
    padding: .25rem .6rem;
    border-radius: 4px;
    letter-spacing: .03em;
}

/* =============================================================================
   RESPONSIVE - Mobile
   ============================================================================= */

@media (max-width: 360px) {
    .unified-popup-modal {
        max-width: calc(100% - .5rem);
    }

    .unified-popup-body {
        padding: .75rem .75rem .5rem;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .unified-popup-overlay,
    .unified-popup-modal {
        animation: none;
    }
}

/* =============================================================================
   WOOAFFILIATION POPUP - Application du style unifie
   ============================================================================= */

/* Overlay */
.wa-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .75rem;
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all .2s ease;
}

.wa-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Container - Style compact */
.wa-popup-container {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 280px;
    position: relative;
    transform: translateY(12px);
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, .15);
    overflow: visible;
}

.wa-popup-overlay.active .wa-popup-container {
    transform: translateY(0);
}

/* Close button */
.wa-popup-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all .15s;
    z-index: 10;
    font-size: 20px;
    line-height: 1;
}

.wa-popup-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

/* Content - Padding compact */
.wa-popup-content {
    padding: 1rem 1rem .75rem;
}

/* Header - Style compact */
.wa-popup-header {
    text-align: center;
    margin-bottom: .6rem;
}

.wa-popup-icon {
    margin-bottom: .4rem;
}

.wa-popup-icon svg {
    width: 32px;
    height: 32px;
}

/* Title - Style compact - Couleur foncée pour meilleure visibilité */
.wa-popup-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 .15rem;
    line-height: 1.2;
}

/* Subtitle - Style compact - Couleur plus foncée pour meilleure lisibilité */
.wa-popup-subtitle {
    font-size: .8rem;
    color: #334155;
    margin: 0 0 .6rem;
    font-weight: 500;
    line-height: 1.3;
}

/* Form */
.wa-popup-form {
    margin: 0;
}

.wa-form-group {
    margin-bottom: .5rem;
}

/* Input - Style unifie */
.wa-email-input-simple,
.wa-form-group input[type="email"],
.wa-form-group input[type="text"] {
    width: 100%;
    padding: .5rem .65rem;
    font-size: .8rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    color: #1e293b;
    transition: all .15s;
    font-weight: 500;
    text-align: center;
}

.wa-email-input-simple::placeholder,
.wa-form-group input::placeholder {
    color: #64748b;
}

.wa-email-input-simple:focus,
.wa-form-group input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, .1);
}

/* Button - Vert unifie */
.wa-submit-btn,
.wa-submit-btn-simple {
    width: 100%;
    padding: .5rem .75rem;
    font-size: .8rem;
    font-weight: 600;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
}

.wa-submit-btn:hover,
.wa-submit-btn-simple:hover {
    background: #059669;
    transform: translateY(0);
    box-shadow: none;
}

.wa-submit-btn:active,
.wa-submit-btn-simple:active {
    transform: scale(.98);
}

/* Legal text - Style compact - Couleur plus visible */
.wa-legal-simple,
.wa-privacy-text {
    margin-top: .4rem;
    font-size: .65rem;
    color: #64748b;
    text-align: center;
    line-height: 1.3;
}

.wa-legal-simple a {
    color: #10b981;
    text-decoration: underline;
}

.wa-form-footer {
    margin-top: .5rem;
}

/* Success message */
.wa-success-message {
    text-align: center;
    padding: .5rem 0;
}

.wa-success-icon {
    margin-bottom: .25rem;
}

.wa-success-icon svg {
    width: 32px;
    height: 32px;
}

.wa-success-title {
    font-size: .8rem;
    color: #10b981;
    font-weight: 600;
    margin: 0 0 .25rem;
}

.wa-success-text {
    font-size: .7rem;
    color: #64748b;
    margin: 0;
}

/* Mobile - WooAffiliation */
@media (max-width: 480px) {
    .wa-popup-container {
        max-width: calc(100% - .5rem);
    }

    .wa-popup-content {
        padding: .75rem .75rem .5rem;
    }
}

/* =============================================================================
   HERO CAROUSEL BUTTONS - Application du style modal compact
   ============================================================================= */

/* Les boutons hero ouvrent des modals - style coherent */
.btn-hero-primary[data-modal],
.btn-hero-secondary[data-modal] {
    font-size: .875rem;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    transition: all .15s ease;
}

.btn-hero-primary[data-modal]:hover {
    transform: translateY(-2px);
}

/* =============================================================================
   CTA SECTION BUTTONS - Application du style modal compact
   ============================================================================= */

.btn-cta-premium[data-modal] {
    border-radius: 8px;
    transition: all .15s ease;
}

.btn-cta-premium[data-modal]:hover {
    transform: translateY(-2px);
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.unified-popup-hidden {
    display: none;
}

.unified-popup-visible {
    display: block;
}
