/* ============================================================
   DrugsGeneral — Exit Intent Popup
   File: assets/css/exit-intent.css
   Since: 55.0
   ============================================================ */

/* ── Overlay ── */
.dgco-ei-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .52);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);

    /* animation */
    opacity: 0;
    transition: opacity .22s ease;
}

.dgco-ei-overlay[hidden] {
    display: none !important;
}

.dgco-ei-overlay.dgco-ei-visible {
    opacity: 1;
}

/* ── Box ── */
.dgco-ei-box {
    position: relative;
    background: var(--white, #fff);
    border-radius: 14px;
    width: 100%;
    max-width: 380px;
    padding: 32px 28px 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
    transform: translateY(18px) scale(.96);
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .22s ease;
    opacity: 0;
}

.dgco-ei-overlay.dgco-ei-visible .dgco-ei-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ── Close button ── */
.dgco-ei-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: var(--muted, #8F9191);
    padding: 4px 8px;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.dgco-ei-close:hover {
    color: var(--ink, #0F1111);
    background: var(--bg2, #EAEDED);
}

/* ── Heart icon ── */
.dgco-ei-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--teal-light, #FFF8E0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: var(--amber, #E77600);
}

/* ── Copy ── */
.dgco-ei-headline {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink, #0F1111);
    margin: 0 0 8px;
    line-height: 1.25;
}

.dgco-ei-subtext {
    font-size: .84rem;
    color: var(--slate, #565959);
    margin: 0 0 18px;
    line-height: 1.5;
}

/* ── Coupon badge row ── */
.dgco-ei-coupon-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.dgco-ei-coupon-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--navy, #008296);
    background: var(--bg, #F7F8F8);
    border: 2px dashed var(--navy, #008296);
    border-radius: 8px;
    padding: 6px 14px;
    display: inline-block;
    user-select: all;
}

.dgco-ei-copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg2, #EAEDED);
    border: 1px solid var(--border, #D5D9D9);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--slate, #565959);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.dgco-ei-copy-btn:hover {
    background: var(--navy, #008296);
    color: #fff;
    border-color: var(--navy, #008296);
}
.dgco-ei-copy-btn.dgco-ei-copied {
    background: var(--green, #067D62);
    color: #fff;
    border-color: var(--green, #067D62);
}

/* ── Feedback line ── */
.dgco-ei-feedback {
    font-size: .8rem;
    min-height: 1.2em;
    margin: 0 0 14px;
    color: var(--green, #067D62);
    font-weight: 600;
}
.dgco-ei-feedback.dgco-ei-error {
    color: var(--red, #CC0C39);
}

/* ── CTA button ── */
.dgco-ei-cta-btn {
    display: block;
    width: 100%;
    background: var(--teal, #FFB800);
    color: var(--ink, #0F1111) !important;
    font-size: .92rem;
    font-weight: 800;
    text-align: center;
    padding: 13px 20px;
    border-radius: 9px;
    text-decoration: none !important;
    margin-bottom: 12px;
    transition: background .15s, transform .1s;
    border: none;
    cursor: pointer;
}
.dgco-ei-cta-btn:hover {
    background: #e0a500;
    transform: translateY(-1px);
}
.dgco-ei-cta-btn:active {
    transform: translateY(0);
}

/* ── WhatsApp help row ── */
.dgco-ei-help {
    margin: 2px 0 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border, #D5D9D9);
}

.dgco-ei-help-text {
    display: block;
    font-size: .76rem;
    color: var(--slate, #565959);
    margin-bottom: 8px;
}

.dgco-ei-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #25D366;
    color: #fff !important;
    font-size: .82rem;
    font-weight: 700;
    text-align: center;
    padding: 9px 16px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background .15s, transform .1s;
}
.dgco-ei-whatsapp-btn:hover {
    background: #1ebd5a;
    transform: translateY(-1px);
}
.dgco-ei-whatsapp-btn:active {
    transform: translateY(0);
}

/* ── Dismiss link ── */
.dgco-ei-dismiss {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .78rem;
    color: var(--muted, #8F9191);
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
}
.dgco-ei-dismiss:hover {
    color: var(--slate, #565959);
}

/* ── Mobile adjustments ── */
@media (max-width: 480px) {
    .dgco-ei-box {
        padding: 28px 20px 20px;
        border-radius: 12px;
    }
    .dgco-ei-headline { font-size: 1.05rem; }
    .dgco-ei-coupon-code { font-size: 1.1rem; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .dgco-ei-overlay,
    .dgco-ei-box {
        transition: none;
    }
}
