/* ─────────────────────────────────────────────────────
   Discount Popup — Front-end Styles
───────────────────────────────────────────────────── */

/* Overlay — hidden by default; JS adds .dpp-visible to show */
.dpp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 24, 22, 0.65);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* JS adds this class to show the overlay */
.dpp-overlay.dpp-visible {
    display: flex;
    animation: dppFadeIn .25s ease;
}

/* JS adds this class to hide with animation */
.dpp-overlay.dpp-hiding {
    display: flex;
    animation: dppFadeOut .2s ease forwards;
}

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

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

/* Popup card */
.dpp-popup {
    background: var(--dpp-bg, #0d3d38);
    color: var(--dpp-text, #e8f5f3);
    border-radius: 18px;
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow:
        0 4px 6px rgba(0,0,0,.07),
        0 20px 60px rgba(0,0,0,.25),
        0 0 0 1px rgba(255,255,255,.06) inset;
    animation: dppSlideUp .3s cubic-bezier(.34,1.56,.64,1);
}

@keyframes dppSlideUp {
    from { transform: translateY(28px) scale(.97); opacity: 0; }
    to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

/* Close button */
.dpp-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.12);
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, transform .15s;
    padding: 0;
    line-height: 0;
}

.dpp-close:hover {
    background: rgba(255,255,255,.22);
    transform: scale(1.08);
}

.dpp-close:focus-visible {
    outline: 2px solid rgba(255,255,255,.6);
    outline-offset: 2px;
}

/* Tag pill */
.dpp-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: rgba(255,255,255,.14);
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
    opacity: .9;
}

/* Headline */
.dpp-headline {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 10px;
    color: inherit;
}

/* Body */
.dpp-body {
    font-size: 14px;
    line-height: 1.6;
    opacity: .85;
    margin: 0 0 20px;
}

.dpp-body a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: .9;
}

.dpp-body a:hover { opacity: 1; }

/* Code box */
.dpp-code-box {
    background: var(--dpp-accent, #1a7a6e);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
}

.dpp-code-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .7;
    margin-bottom: 6px;
}

.dpp-code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dpp-code-value {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: .18em;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    line-height: 1;
    color: inherit;
}

/* Copy button */
.dpp-copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.18);
    border: none;
    border-radius: 8px;
    color: inherit;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 12px;
    transition: background .15s;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.dpp-copy-btn:hover  { background: rgba(255,255,255,.28); }
.dpp-copy-btn.copied { background: rgba(255,255,255,.35); }

/* CTA button */
.dpp-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.15);
    color: inherit;
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: 10px;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s, border-color .15s, transform .1s;
    margin-top: 4px;
}

.dpp-cta:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.5);
    transform: translateY(-1px);
    color: inherit;
    text-decoration: none;
}

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

/* Mobile */
@media (max-width: 480px) {
    .dpp-popup {
        padding: 32px 22px 26px;
        border-radius: 16px;
    }
    .dpp-headline { font-size: 19px; }
    .dpp-code-value { font-size: 20px; letter-spacing: .12em; }
}
