/* Evogb Push — estilos del cliente (prefijo evp-). Hereda las variables del sitio con fallback. */
#evp-root {
    --evp-cyan: var(--cyan-primary, #00e5ff); --evp-bg: var(--bg-surface, #0d1018); --evp-text: var(--text-main, #f8fafc);
    --evp-muted: var(--text-muted, #94a3b8); --evp-border: rgba(148, 163, 184, .16); --evp-ok: var(--success, #10b981); --evp-danger: var(--danger, #ef4444);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--evp-text);
}
#evp-root *, #evp-root *::before, #evp-root *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
#evp-root button { font-family: inherit; cursor: pointer; border: 0; }

/* ── Campana flotante ── */
.evp-bell {
    position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 9000; width: 48px; height: 48px; border-radius: 16px;
    display: grid; place-items: center; font-size: 23px; color: var(--evp-cyan);
    background: linear-gradient(145deg, rgba(20, 26, 40, .92), rgba(10, 13, 22, .92)); border: 1px solid rgba(0, 229, 255, .28);
    box-shadow: 0 8px 26px rgba(0, 0, 0, .45), 0 0 0 0 rgba(0, 229, 255, .35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.evp-bell:hover { transform: translateY(-3px); border-color: rgba(0, 229, 255, .6); }
.evp-bell:active { transform: scale(.94); }
.evp-bell[data-state="off"] { animation: evp-pulse 2.8s ease-out 3; }
.evp-bell[data-state="on"] { color: var(--evp-ok); border-color: rgba(16, 185, 129, .4); }
.evp-bell[data-state="denied"], .evp-bell[data-state="unsupported"] { color: var(--evp-muted); border-color: var(--evp-border); }
.evp-bell-dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--evp-cyan); border: 2px solid #0d1018; display: none; }
.evp-bell[data-state="off"] .evp-bell-dot { display: block; }
.evp-bell[data-state="on"] i { animation: evp-ring 2.4s ease 1; transform-origin: 50% 20%; }
@keyframes evp-pulse { 0% { box-shadow: 0 8px 26px rgba(0,0,0,.45), 0 0 0 0 rgba(0,229,255,.4); } 70%, 100% { box-shadow: 0 8px 26px rgba(0,0,0,.45), 0 0 0 16px rgba(0,229,255,0); } }
@keyframes evp-ring { 0%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(14deg); } 20%, 40%, 60% { transform: rotate(-14deg); } 70% { transform: rotate(0); } }

/* ── Botones ── */
.evp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px 18px; border-radius: 13px; font-size: 14.5px; font-weight: 600; transition: transform .15s, filter .15s, background .2s; }
.evp-btn:active { transform: scale(.97); }
.evp-btn[disabled] { opacity: .65; pointer-events: none; }
.evp-btn-primary { color: #04121a; background: linear-gradient(135deg, #00e5ff, #3b82f6); box-shadow: 0 6px 20px rgba(0, 190, 255, .28); }
.evp-btn-primary:hover { filter: brightness(1.08); }
.evp-btn-ghost { color: var(--evp-text); background: rgba(148, 163, 184, .12); border: 1px solid var(--evp-border); }
.evp-btn-ghost:hover { background: rgba(148, 163, 184, .2); }
.evp-btn-danger { color: #fca5a5; background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .28); }
.evp-btn-danger:hover { background: rgba(239, 68, 68, .2); }
.evp-sm { padding: 10px 16px; font-size: 13.5px; width: auto; }

/* ── Soft prompt ── */
.evp-prompt {
    position: fixed; left: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 9001; width: min(380px, calc(100vw - 32px));
    display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; padding: 16px; border-radius: 20px; background: rgba(13, 16, 24, .94);
    border: 1px solid rgba(0, 229, 255, .25); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .35s, transform .35s cubic-bezier(.2, .9, .3, 1.2);
}
.evp-prompt.show { opacity: 1; transform: none; }
.evp-prompt-ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--evp-cyan); background: rgba(0, 229, 255, .12); flex: none; overflow: hidden; }
.evp-prompt-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.evp-prompt-tx b { font-size: 14.5px; } .evp-prompt-tx span { font-size: 12.5px; line-height: 1.45; color: var(--evp-muted); }
.evp-prompt-btns { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }

/* ── Sheet de ajustes ── */
.evp-overlay { position: fixed; inset: 0; z-index: 9100; background: rgba(2, 4, 8, .6); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.evp-overlay.show { opacity: 1; pointer-events: auto; }
.evp-sheet {
    position: fixed; z-index: 9101; left: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); width: min(400px, calc(100vw - 32px)); max-height: 80vh; max-height: 80dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: 22px 20px 20px; border-radius: 24px; background: linear-gradient(180deg, #121826, #0d1018); border: 1px solid rgba(0, 229, 255, .2); box-shadow: 0 24px 70px rgba(0, 0, 0, .65);
    opacity: 0; visibility: hidden; transform: translateY(16px) scale(.98); transform-origin: bottom left; transition: opacity .28s, transform .3s cubic-bezier(.2, .9, .3, 1.1), visibility .3s;
}
.evp-sheet.show { opacity: 1; visibility: visible; transform: none; }
.evp-grab { display: none; }
.evp-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 11px; font-size: 20px; color: var(--evp-muted); background: rgba(148, 163, 184, .1); display: grid; place-items: center; }
.evp-x:hover { color: var(--evp-text); background: rgba(148, 163, 184, .2); }
.evp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.evp-head h3 { margin: 0 0 5px; font-size: 18px; font-weight: 700; }
.evp-head-ic { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--evp-cyan); background: transparent; border: none; box-shadow: none; flex: none; }
.evp-head-img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; display: block; background: transparent; }
.evp-chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.evp-chip-ok { color: #6ee7b7; background: rgba(16, 185, 129, .15); } .evp-chip-off { color: var(--evp-muted); background: rgba(148, 163, 184, .14); }
.evp-chip-err { color: #fca5a5; background: rgba(239, 68, 68, .15); } .evp-chip-warn { color: #fcd34d; background: rgba(245, 158, 11, .15); }
.evp-lead { margin: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: #cbd5e1; } .evp-lead b { color: var(--evp-text); }
.evp-perks { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.evp-perks li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--evp-muted); } .evp-perks i { font-size: 18px; color: var(--evp-cyan); }
.evp-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 13.5px; line-height: 1.5; color: #cbd5e1; } .evp-steps i { vertical-align: middle; color: var(--evp-cyan); }
.evp-topics { display: grid; gap: 8px; margin-bottom: 16px; }
.evp-topic { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 15px; background: rgba(148, 163, 184, .07); border: 1px solid var(--evp-border); cursor: pointer; transition: border-color .2s, background .2s; }
.evp-topic:hover { border-color: rgba(0, 229, 255, .3); }
.evp-topic-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; color: var(--evp-cyan); background: rgba(0, 229, 255, .1); flex: none; }
.evp-topic-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .evp-topic-tx b { font-size: 13.5px; } .evp-topic-tx small { font-size: 11.5px; color: var(--evp-muted); }
.evp-topic input { position: absolute; opacity: 0; pointer-events: none; }
.evp-switch { position: relative; width: 42px; height: 24px; border-radius: 99px; background: rgba(148, 163, 184, .28); flex: none; transition: background .25s; }
.evp-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 2px 5px rgba(0,0,0,.35); }
.evp-topic input:checked ~ .evp-switch { background: linear-gradient(135deg, #00e5ff, #3b82f6); } .evp-topic input:checked ~ .evp-switch::after { transform: translateX(18px); }
.evp-topic input:focus-visible ~ .evp-switch { outline: 2px solid var(--evp-cyan); outline-offset: 2px; }
.evp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── Toast en primer plano ── */
.evp-toasts { position: fixed; top: calc(16px + env(safe-area-inset-top)); right: 16px; z-index: 10000; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.evp-toast { position: relative; overflow: hidden; pointer-events: auto; border-radius: 18px; background: rgba(15, 19, 30, .96); border: 1px solid rgba(0, 229, 255, .22); box-shadow: 0 16px 44px rgba(0, 0, 0, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; transform: translateX(30px) scale(.97); transition: opacity .3s, transform .35s cubic-bezier(.2, .9, .3, 1.15); }
.evp-toast.show { opacity: 1; transform: none; }
.evp-toast-err { border-color: rgba(239, 68, 68, .4); }
.evp-toast-img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; cursor: pointer; background: #0a0d14; }
.evp-toast-main { display: flex; align-items: flex-start; gap: 12px; padding: 13px 40px 13px 13px; cursor: pointer; }
.evp-toast-ic { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex: none; }
.evp-toast-ic-def { display: grid; place-items: center; font-size: 21px; color: var(--evp-cyan); background: rgba(0, 229, 255, .12); }
.evp-toast-err .evp-toast-ic-def { color: #fca5a5; background: rgba(239, 68, 68, .14); }
.evp-toast-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .evp-toast-tx b { font-size: 14px; line-height: 1.3; } .evp-toast-tx span { font-size: 12.5px; line-height: 1.45; color: #b6c2d4; word-break: break-word; }
.evp-toast-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 9px; font-size: 18px; color: var(--evp-muted); background: transparent; display: grid; place-items: center; z-index: 2; }
.evp-toast-img ~ .evp-toast-main .evp-toast-x, .evp-toast:has(.evp-toast-img) .evp-toast-x { background: rgba(0, 0, 0, .55); color: #fff; }
.evp-toast-acts { display: flex; gap: 8px; padding: 0 13px 13px; }
.evp-toast-acts button { flex: 1; padding: 9px 10px; border-radius: 11px; font-size: 12.5px; font-weight: 600; color: #04121a; background: linear-gradient(135deg, #00e5ff, #3b82f6); }
.evp-toast-acts button.sec { color: var(--evp-text); background: rgba(148, 163, 184, .14); }
.evp-toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, #00e5ff, #3b82f6); transform-origin: left; animation: evp-bar 9s linear forwards; }
.evp-toast.paused .evp-toast-bar { animation-play-state: paused; }
@keyframes evp-bar { to { transform: scaleX(0); } }

/* ── Móvil: sheet inferior suave, sin contorno celeste, toast arriba a ancho completo ── */
@media (max-width: 640px) {
    .evp-bell { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 15px; }
    .evp-prompt { left: 12px; right: 12px; width: auto; bottom: calc(70px + env(safe-area-inset-bottom)); }
    .evp-sheet {
        left: 0; right: 0; bottom: 0; width: 100%; max-height: 88vh; max-height: 88dvh;
        border-radius: 26px 26px 0 0;
        padding: 14px 18px calc(24px + env(safe-area-inset-bottom));
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.75);
        transform: translateY(100%);
        transform-origin: bottom center;
        transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, visibility 0.42s;
        will-change: transform, opacity;
    }
    .evp-sheet.show { transform: translateY(0); opacity: 1; visibility: visible; }
    .evp-grab { display: block; width: 42px; height: 4px; border-radius: 4px; background: rgba(148, 163, 184, .35); margin: 0 auto 14px; }
    .evp-x { top: 20px; }
    .evp-toasts { top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; width: auto; }
    .evp-toast { transform: translateY(-24px) scale(.98); }
}
@media (prefers-reduced-motion: reduce) { #evp-root * { animation: none !important; transition-duration: .01ms !important; } }