/*
 * ═══════════════════════════════════════════════════════════════════════════════
 * Lavisa Destinations Theme — POPUPS POLISH (3.1.17)
 * ═══════════════════════════════════════════════════════════════════════════════
 *
 * @file        assets/css/ldt-enhanced-popups-polish.css
 * @package     Lavisa_Destinations_Theme
 * @since       3.1.17
 * @depends     ALL prior enhanced CSS (loads after deal-modal-polish at end)
 *
 * Targets the marketing popups rendered by the main plugin's
 * Dest_Mkt_Popup_Renderer (frontend/marketing/class-dest-mkt-popup-renderer.php)
 * which outputs into wp_footer with 6 popup types: modal, banner_top,
 * banner_bottom, slide_in, fullscreen, exit_intent.
 *
 * Two issues addressed:
 *
 *   1. BUG — title appears dark on dark blue (unreadable).
 *      Cause: ldt-main.css:158 sets `h1...h6 { color: var(--ldt-dark) }`
 *      theme-wide. Popup renderer sets `color: white` on the container
 *      expecting the h3 title to inherit, but the heading reset wins via
 *      higher specificity than inheritance. Fix: restore `color: inherit`
 *      on popup titles.
 *
 *   2. POLISH — popup chrome was bare-bones (basic close button, plain
 *      backdrop, tinted-but-flat inner panels). Brand-aligns to the
 *      modal pattern from 3.1.10-3.1.15: backdrop blur, multi-layer
 *      brand-blue shadow, white-glass close button with accent-rotate
 *      hover, gradient CTA pill with hover lift + arrow shift,
 *      polished newsletter form, smoother animations.
 *
 * Targets only `.wld-mkt-popup-*` selectors so theme components are
 * unaffected. PURE CSS LAYER — no PHP partial edited (the plugin's inline
 * <style> in the renderer is overridden via cascade specificity using
 * the `body` prefix).
 *
 * ═══════════════════════════════════════════════════════════════════════════════
 */


/* ═══════════════════════════════════════════════════════════════════════════════
 * 0. CRITICAL — restore color inheritance on popup elements
 *    Fixes the dark-on-dark title bug.
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-overlay,
body .wld-mkt-popup-overlay h1,
body .wld-mkt-popup-overlay h2,
body .wld-mkt-popup-overlay h3,
body .wld-mkt-popup-overlay h4,
body .wld-mkt-popup-overlay h5,
body .wld-mkt-popup-overlay h6,
body .wld-mkt-popup-overlay p {
    color: inherit !important;
    margin: 0 !important;
}

body .wld-mkt-popup-title {
    margin: 0 0 10px !important;
}

body .wld-mkt-popup-body {
    margin: 0 0 18px !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 1. OVERLAY — z-index reinforced + backdrop blur
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-overlay {
    z-index: 999999 !important;
}

body .wld-mkt-popup-backdrop {
    background: rgba(0, 12, 30, 0.62) !important;
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 2. INNER PANEL — multi-layer brand-blue shadow + premium feel
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-inner {
    box-shadow:
        0 24px 60px -16px rgba(0, 53, 128, 0.55),
        0 12px 24px rgba(0, 0, 0, 0.16),
        0 0 0 1px rgba(255, 255, 255, 0.18) inset !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 3. TITLE — bigger, tighter tracking, full opacity
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.20 !important;
    letter-spacing: -0.015em !important;
    /* color inherited from inner panel — see §0 */
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 4. BODY — comfortable readability, slight transparency
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-body {
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    opacity: 0.93 !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 5. CTA BUTTON — accent-gradient pill with hover lift
 *    The renderer sets inline `color:<bg>` on the CTA — we change the
 *    background to white→ off-white gradient and arrow trick.
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-cta {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 11px 26px !important;
    border-radius: 9999px !important;
    background: #ffffff !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    letter-spacing: -0.005em !important;
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.32) inset !important;
    transition:
        transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 320ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body .wld-mkt-popup-cta::after {
    content: " →";
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
    body .wld-mkt-popup-cta:hover {
        transform: translateY(-2px);
        box-shadow:
            0 12px 24px rgba(0, 0, 0, 0.30),
            0 0 0 1px rgba(255, 255, 255, 0.45) inset !important;
        filter: brightness(1.04);
    }
    body .wld-mkt-popup-cta:hover::after {
        transform: translateX(3px);
    }
    /* RTL — arrow flips direction */
    [dir="rtl"] body .wld-mkt-popup-cta:hover::after,
    .ldt-rtl body .wld-mkt-popup-cta:hover::after {
        transform: translateX(-3px);
    }
}

/* RTL — arrow becomes ← */
[dir="rtl"] body .wld-mkt-popup-cta::after,
.ldt-rtl body .wld-mkt-popup-cta::after {
    content: " ←";
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 6. CLOSE BUTTON — white-glass circle with accent-rotate hover (matches
 *    attraction/deal modals from 3.1.10-3.1.15)
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-close {
    width: 34px !important;
    height: 34px !important;
    top: 12px !important;
    right: 12px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: var(--ldt-primary, #003580) !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    border: 1px solid rgba(0, 53, 128, 0.16) !important;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.20),
        0 0 0 1px rgba(255, 255, 255, 0.40) inset !important;
    transition:
        background 220ms cubic-bezier(0.22, 1, 0.36, 1),
        color 220ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 220ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@media (hover: hover) and (pointer: fine) {
    body .wld-mkt-popup-close:hover {
        background: linear-gradient(135deg, #ff9d1a 0%, #ff8c00 100%) !important;
        color: #ffffff !important;
        border-color: transparent !important;
        transform: rotate(90deg);
    }
}

/* RTL — close button flips to left */
[dir="rtl"] body .wld-mkt-popup-close,
.ldt-rtl body .wld-mkt-popup-close {
    right: auto !important;
    left: 12px !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 7. MODAL TYPE — slightly bigger radius, more presence
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-modal .wld-mkt-popup-inner,
body .wld-mkt-popup-exit_intent .wld-mkt-popup-inner {
    max-width: 520px !important;
    width: 92% !important;
    border-radius: 1.25rem !important;
    padding: 36px 32px !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 8. BANNER TOP / BOTTOM — premium gradient strip
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-banner_top .wld-mkt-popup-inner,
body .wld-mkt-popup-banner_bottom .wld-mkt-popup-inner {
    padding: 12px 24px !important;
    box-shadow:
        0 6px 18px rgba(0, 53, 128, 0.30),
        0 0 0 1px rgba(255, 255, 255, 0.10) inset !important;
}

/* Banner CTAs are tighter to fit on one line */
body .wld-mkt-popup-banner_top .wld-mkt-popup-cta,
body .wld-mkt-popup-banner_bottom .wld-mkt-popup-cta {
    padding: 8px 18px !important;
    font-size: 13.5px !important;
}

body .wld-mkt-popup-banner_top .wld-mkt-popup-title,
body .wld-mkt-popup-banner_bottom .wld-mkt-popup-title {
    font-size: 16px !important;
    margin: 0 !important;
}

body .wld-mkt-popup-banner_top .wld-mkt-popup-body,
body .wld-mkt-popup-banner_bottom .wld-mkt-popup-body {
    font-size: 13.5px !important;
    margin: 0 !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 9. SLIDE-IN (bottom-right corner pill)
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-slide_in .wld-mkt-popup-inner {
    max-width: 380px !important;
    border-radius: 1.25rem !important;
    padding: 22px 24px 24px !important;
}

body .wld-mkt-popup-slide_in .wld-mkt-popup-title {
    font-size: 17px !important;
}

body .wld-mkt-popup-slide_in .wld-mkt-popup-body {
    font-size: 13.5px !important;
}

/* RTL — slide-in flips to bottom-LEFT */
[dir="rtl"] body .wld-mkt-popup-slide_in,
.ldt-rtl body .wld-mkt-popup-slide_in {
    right: auto !important;
    left: 20px !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 10. FULLSCREEN — large, immersive
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-fullscreen .wld-mkt-popup-inner {
    padding: 48px 32px !important;
    box-shadow: none !important;
}

body .wld-mkt-popup-fullscreen .wld-mkt-popup-title {
    font-size: 32px !important;
    margin: 0 0 16px !important;
}

body .wld-mkt-popup-fullscreen .wld-mkt-popup-body {
    font-size: 17px !important;
    max-width: 640px !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 11. INLINE NEWSLETTER FORM (when popup has newsletter_form=1)
 *     The renderer outputs an email input + Subscribe button with inline
 *     style="..." attributes. We override those via high-specificity body
 *     selector.
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .wld-mkt-popup-overlay input[type="email"] {
    padding: 10px 14px !important;
    border-radius: 9999px !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    background: rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    width: 220px !important;
    transition: border-color 220ms, background 220ms !important;
}

body .wld-mkt-popup-overlay input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.65) !important;
}

body .wld-mkt-popup-overlay input[type="email"]:focus {
    border-color: rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.22) !important;
    outline: none !important;
}

body .wld-mkt-popup-overlay input[type="email"] + button {
    padding: 10px 22px !important;
    border-radius: 9999px !important;
    background: linear-gradient(135deg, #ff9d1a 0%, #ff8c00 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow:
        0 6px 16px rgba(255, 140, 0, 0.40),
        0 0 0 1px rgba(255, 255, 255, 0.20) inset !important;
    transition:
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 220ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@media (hover: hover) and (pointer: fine) {
    body .wld-mkt-popup-overlay input[type="email"] + button:hover {
        transform: translateY(-1px);
        box-shadow:
            0 10px 22px rgba(255, 140, 0, 0.55),
            0 0 0 1px rgba(255, 255, 255, 0.30) inset !important;
        filter: brightness(1.06);
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 12. MOBILE — slightly tighter dimensions
 * ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    body .wld-mkt-popup-modal .wld-mkt-popup-inner,
    body .wld-mkt-popup-exit_intent .wld-mkt-popup-inner {
        padding: 28px 22px !important;
        border-radius: 1rem !important;
    }

    body .wld-mkt-popup-title {
        font-size: 19px !important;
    }

    body .wld-mkt-popup-body {
        font-size: 14px !important;
    }

    body .wld-mkt-popup-banner_top .wld-mkt-popup-inner,
    body .wld-mkt-popup-banner_bottom .wld-mkt-popup-inner {
        padding: 10px 16px !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    body .wld-mkt-popup-slide_in {
        bottom: 12px !important;
        right: 12px !important;
        left: 12px !important;
    }

    body .wld-mkt-popup-slide_in .wld-mkt-popup-inner {
        max-width: none !important;
        width: auto !important;
    }

    [dir="rtl"] body .wld-mkt-popup-slide_in,
    .ldt-rtl body .wld-mkt-popup-slide_in {
        right: 12px !important;
        left: 12px !important;
    }

    body .wld-mkt-popup-fullscreen .wld-mkt-popup-title {
        font-size: 26px !important;
    }

    body .wld-mkt-popup-overlay input[type="email"] {
        width: 100% !important;
    }

    body .wld-mkt-popup-overlay input[type="email"] + button {
        width: 100% !important;
        margin-top: 8px !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 13. REDUCED MOTION
 * ═══════════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    body .wld-mkt-popup-cta,
    body .wld-mkt-popup-cta::after,
    body .wld-mkt-popup-close,
    body .wld-mkt-popup-overlay input[type="email"],
    body .wld-mkt-popup-overlay input[type="email"] + button {
        transition: none !important;
    }

    body .wld-mkt-popup-cta:hover,
    body .wld-mkt-popup-close:hover,
    body .wld-mkt-popup-overlay input[type="email"] + button:hover {
        transform: none !important;
    }

    body .wld-mkt-popup-cta:hover::after {
        transform: none !important;
    }
}


/* ─── END OF ldt-enhanced-popups-polish.css ───────────────────────────────── */
