/* ==========================================================================
   WD Abandoned Cart — Exit Intent Popup (Frontend)
   ========================================================================== */

.wdac-exit-popup {
    --wdac-accent: #4f46e5;
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.wdac-exit-popup--hidden { display: none; }

/* Overlay */
.wdac-exit-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    cursor: pointer;
    animation: wdac-fade-in 0.25s ease;
}

/* Box */
.wdac-exit-popup__box {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: wdac-popup-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

/* Close button */
.wdac-exit-popup__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    padding: 0;
}
.wdac-exit-popup__close:hover { color: #374151; background: #f3f4f6; }

/* Icon */
.wdac-exit-popup__icon {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 14px;
}

/* Headline */
.wdac-exit-popup__headline {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
    line-height: 1.25;
}

/* Body text */
.wdac-exit-popup__body {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 20px;
}

/* Coupon block */
.wdac-exit-popup__coupon {
    background: #f9fafb;
    border: 2px dashed var(--wdac-accent);
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 20px;
}
.wdac-exit-popup__coupon-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9ca3af;
    font-weight: 600;
    margin-bottom: 6px;
}
.wdac-exit-popup__coupon-code {
    display: block;
    font-size: 24px;
    font-weight: 800;
    font-family: 'Courier New', Consolas, monospace;
    color: var(--wdac-accent);
    letter-spacing: 4px;
    margin-bottom: 8px;
}
.wdac-exit-popup__copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--wdac-accent);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.wdac-exit-popup__copy-btn:hover { filter: brightness(0.9); }
.wdac-exit-popup__copy-btn.is-copied { background: #16a34a; }

/* CTA Button */
.wdac-exit-popup__cta {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border-radius: 8px;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: filter 0.15s, transform 0.1s;
    letter-spacing: -0.2px;
}
.wdac-exit-popup__cta:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
}
.wdac-exit-popup__cta:active { transform: translateY(0); }

/* Animations */
@keyframes wdac-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes wdac-popup-in {
    from { opacity: 0; transform: scale(0.88) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Mobile */
@media (max-width: 480px) {
    .wdac-exit-popup__box { padding: 28px 20px 24px; }
    .wdac-exit-popup__headline { font-size: 18px; }
    .wdac-exit-popup__coupon-code { font-size: 20px; }
}
