/**
 * GT BOGO Engine — Deal Reveal UI
 * All values via CSS tokens — zero hardcoded sizes. Luxury store compliant.
 *
 * @since 3.18.5
 */

/* ── Shared overlay backdrop ── */
.gtbogo-reveal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99997;
    opacity: 0;
    transition: opacity var(--gtbogo-sp-duration-subtle,350ms) var(--gtbogo-sp-ease-subtle,ease);
    pointer-events: none;
}
.gtbogo-reveal-backdrop.is-visible { opacity: 1; pointer-events: auto; }

/* ── Base panel shared by modal + drawer ── */
.gtbogo-reveal-panel {
    position: fixed;
    z-index: 99998;
    background: var(--gtbogo-sp-surface, #fff);
    color: var(--gtbogo-sp-text, inherit);
    font-family: inherit;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    border-radius: var(--gtbogo-sp-radius, 8px);
    padding: var(--gtbogo-sp-pad-v, 24px) var(--gtbogo-sp-pad-h, 28px);
    max-width: 420px;
    width: calc(100% - 32px);
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity var(--gtbogo-sp-duration-subtle, 350ms) var(--gtbogo-sp-ease-subtle, ease),
        transform var(--gtbogo-sp-duration-subtle, 350ms) var(--gtbogo-sp-ease-subtle, ease);
    pointer-events: none;
}
.gtbogo-reveal-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Toast (bottom-right corner) ── */
.gtbogo-reveal-toast {
    bottom: 24px;
    right: 24px;
    left: auto;
    top: auto;
    transform: translateX(16px);
    border-left: 3px solid currentColor;
}
.gtbogo-reveal-toast.is-visible { transform: translateX(0); }

/* ── Modal (centered) ── */
.gtbogo-reveal-modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    text-align: center;
}
.gtbogo-reveal-modal.is-visible { transform: translate(-50%, -50%); }

/* ── Sticky bar (full-width top) ── */
.gtbogo-reveal-sticky {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    max-width: 100%;
    width: 100%;
    border-radius: 0;
    padding: var(--gtbogo-sp-pad-v, 12px) var(--gtbogo-sp-pad-h, 24px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gtbogo-sp-gap, 16px);
    transform: translateY(-100%);
    border-bottom: var(--gtbogo-sp-border-w, 1px) solid var(--gtbogo-sp-accent-border, currentColor);
}
.gtbogo-reveal-sticky.is-visible { transform: translateY(0); }

/* ── Mobile drawer (bottom sheet) ── */
.gtbogo-reveal-drawer {
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    max-width: 100%;
    width: 100%;
    border-radius: var(--gtbogo-sp-radius, 12px) var(--gtbogo-sp-radius, 12px) 0 0;
    transform: translateY(100%);
    padding-bottom: max(var(--gtbogo-sp-pad-v, 24px), env(safe-area-inset-bottom));
}
.gtbogo-reveal-drawer.is-visible { transform: translateY(0); }

/* ── Inner content ── */
.gtbogo-reveal-headline {
    font-size: var(--gtbogo-sp-fs-heading, 1.1em);
    font-weight: var(--gtbogo-sp-fw-ui, 700);
    line-height: var(--gtbogo-sp-lh-ui, 1.3);
    margin: 0 0 var(--gtbogo-sp-gap, 8px);
    color: inherit;
}
.gtbogo-reveal-sub {
    font-size: var(--gtbogo-sp-fs-base, 0.87em);
    opacity: var(--gtbogo-sp-opacity-secondary, 0.72);
    margin: 0 0 var(--gtbogo-sp-gap, 16px);
    line-height: var(--gtbogo-sp-lh-ui, 1.5);
}
.gtbogo-reveal-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gtbogo-sp-gap, 8px);
    padding: var(--gtbogo-sp-pad-v, 10px) var(--gtbogo-sp-pad-h, 22px);
    background: var(--gtbogo-sp-accent, currentColor);
    color: var(--gtbogo-sp-accent-text, #fff);
    border: none;
    border-radius: var(--gtbogo-sp-radius, 4px);
    font-size: var(--gtbogo-sp-fs-base, 0.87em);
    font-weight: var(--gtbogo-sp-fw-ui, 600);
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    min-height: var(--gtbogo-sp-touch-target, 44px);
    transition: opacity var(--gtbogo-sp-duration-subtle, 200ms) ease;
    letter-spacing: var(--gtbogo-sp-tracking, 0.02em);
}
.gtbogo-reveal-cta:hover { opacity: 0.88; }
.gtbogo-reveal-dismiss {
    position: absolute;
    top: var(--gtbogo-sp-pad-v, 12px);
    right: var(--gtbogo-sp-pad-h, 14px);
    background: none;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    opacity: var(--gtbogo-sp-opacity-secondary, 0.5);
    color: inherit;
    padding: var(--gtbogo-sp-pad-xs, 4px);
    line-height: 1;
    min-height: var(--gtbogo-sp-touch-target, 44px);
    min-width: var(--gtbogo-sp-touch-target, 44px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.gtbogo-reveal-dismiss:hover { opacity: 1; }
.gtbogo-reveal-tier {
    font-size: var(--gtbogo-sp-fs-base, 0.78em);
    opacity: var(--gtbogo-sp-opacity-secondary, 0.55);
    margin-top: var(--gtbogo-sp-gap, 8px);
    font-style: italic;
}

/* ── Sticky bar compact layout ── */
.gtbogo-reveal-sticky .gtbogo-reveal-headline { margin: 0; font-size: var(--gtbogo-sp-fs-base, 0.95em); }
.gtbogo-reveal-sticky .gtbogo-reveal-sub { display: none; }
.gtbogo-reveal-sticky .gtbogo-reveal-cta { padding: var(--gtbogo-sp-pad-xs, 6px) var(--gtbogo-sp-pad-sm-h, 16px); }

/* ── Responsive ── */
@media (max-width: 480px) {
    .gtbogo-reveal-toast {
        bottom: 12px;
        right: 12px;
        left: 12px;
        max-width: 100%;
    }
    .gtbogo-reveal-modal {
        max-width: calc(100% - 24px);
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .gtbogo-reveal-panel,
    .gtbogo-reveal-backdrop {
        transition: none !important;
        animation: none !important;
    }
}

/* ── Countdown timer ── */
.gtbogo-reveal-countdown {
    font-size: var(--gtbogo-sp-fs-base, 0.78em);
    opacity: var(--gtbogo-sp-opacity-secondary, 0.65);
    margin: var(--gtbogo-sp-gap, 4px) 0 var(--gtbogo-sp-gap, 10px);
    font-variant-numeric: tabular-nums;
    letter-spacing: var(--gtbogo-sp-tracking, 0.02em);
}
.gtbogo-reveal-escalated {
    color: var(--gtbogo-sp-accent, inherit);
    font-size: var(--gtbogo-sp-fs-base, 0.78em);
    font-weight: var(--gtbogo-sp-fw-ui, 600);
    margin: var(--gtbogo-sp-gap, 4px) 0;
}
