/* PLUGG app features: install banner, how-to sheet, alerts prompt, offline toast. Self-contained (works on every page style). */
.pw-card, .pw-dlg, .pw-toast, .pw-page { --pw-bg: #0e1626; --pw-line: #24385a; --pw-ink: #e6eef8; --pw-dim: #9fb0c8; --pw-acc: #c8ff00; --pw-acc-ink: #0b1000; font-family: "Manrope", "Chakra Petch", system-ui, -apple-system, "Segoe UI", sans-serif; }

[data-pwa-install][hidden], .pw-card[hidden], .pw-toast[hidden] { display: none !important; }

/* Banner: sits above the phone bottom menu, bottom-left on computers */
.pw-card { position: fixed; z-index: 760; left: 12px; right: 12px; bottom: calc(98px + env(safe-area-inset-bottom, 0px)); max-width: 460px; margin-inline: auto;
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 12px 12px 14px;
  background: var(--pw-bg); color: var(--pw-ink); border: 1px solid var(--pw-line); border-radius: 16px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(200, 255, 0, .06);
  animation: pw-up .35s cubic-bezier(.2, .8, .2, 1) both; }
.pw-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #ff2bd6, #00e5ff); }
.pw-ic img { width: 30px; height: 30px; display: block; }
.pw-ic svg { width: 24px; height: 24px; color: #fff; }
.pw-txt b { display: block; font-size: .95rem; line-height: 1.25; }
.pw-txt span { display: block; margin-top: 2px; font-size: .8rem; line-height: 1.35; color: var(--pw-dim); }
.pw-act { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.pw-btn { min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--pw-acc); color: var(--pw-acc-ink); font: 800 .85rem "Manrope", system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.pw-btn:focus-visible, .pw-x:focus-visible, .pw-link:focus-visible { outline: 2px solid #00e5ff; outline-offset: 2px; }
.pw-x { min-height: 30px; padding: 0 8px; border: 0; background: none; color: var(--pw-dim); font: 600 .75rem "Manrope", system-ui, sans-serif; cursor: pointer; }
.pw-btn.is-loading { opacity: .6; pointer-events: none; }
@media (min-width: 761px) { .pw-card { left: 18px; right: auto; bottom: 18px; margin: 0; width: 420px; } }
@media (max-width: 380px) { .pw-card { grid-template-columns: auto 1fr; } .pw-act { grid-column: 1 / -1; flex-direction: row; } .pw-act .pw-btn { flex: 1; } }

/* How-to sheet */
.pw-dlg { width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--pw-line); border-radius: 20px; background: var(--pw-bg); color: var(--pw-ink); overflow: auto; }
.pw-dlg::backdrop { background: rgba(2, 4, 10, .72); backdrop-filter: blur(3px); }
.pw-dlg-in { padding: 22px 20px 20px; }
.pw-dlg h2 { margin: 0 0 4px; font-size: 1.25rem; line-height: 1.25; }
.pw-dlg .pw-sub { margin: 0 0 16px; color: var(--pw-dim); font-size: .9rem; line-height: 1.5; }
.pw-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; counter-reset: pw; }
.pw-steps li { counter-increment: pw; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--pw-line); border-radius: 12px; background: rgba(255, 255, 255, .03); font-size: .92rem; line-height: 1.4; }
.pw-steps li::before { content: counter(pw); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--pw-acc); color: var(--pw-acc-ink); font-weight: 800; font-size: .85rem; }
.pw-steps svg { width: 1.15em; height: 1.15em; vertical-align: -.2em; margin: 0 .1em; }
.pw-tabs { display: flex; gap: 6px; margin: 0 0 14px; flex-wrap: wrap; }
.pw-tab { min-height: 36px; padding: 0 14px; border: 1px solid var(--pw-line); border-radius: 999px; background: none; color: var(--pw-dim); font: 700 .8rem "Manrope", system-ui, sans-serif; cursor: pointer; }
.pw-tab[aria-selected="true"] { background: var(--pw-acc); color: var(--pw-acc-ink); border-color: var(--pw-acc); }
.pw-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(251, 191, 36, .1); color: #fcd9a0; font-size: .82rem; line-height: 1.45; }
.pw-foot { display: flex; gap: 8px; }
.pw-foot .pw-btn { flex: 1; }
.pw-foot .pw-btn.ghost { background: none; border: 1px solid var(--pw-line); color: var(--pw-ink); }
.pw-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* Offline / back online toast */
.pw-toast { position: fixed; z-index: 790; left: 50%; transform: translateX(-50%); top: calc(10px + env(safe-area-inset-top, 0px)); padding: 10px 16px; border-radius: 999px; background: #1b2540; color: var(--pw-ink); border: 1px solid var(--pw-line); font-size: .85rem; font-weight: 700; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .7); animation: pw-down .3s ease both; }
.pw-toast.ok { background: #10301f; border-color: #1e6b41; color: #b9f5d2; }

/* Install page */
.pw-page { max-width: 880px; }
.pw-hero { text-align: center; padding: 8px 0 18px; }
.pw-hero .pw-ic { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 14px; }
.pw-hero .pw-ic img { width: 48px; height: 48px; }
.pw-perks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 6px 0 22px; }
.pw-perks div { padding: 14px; border: 1px solid var(--pw-line, #24385a); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.pw-perks b { display: block; margin-bottom: 4px; }
.pw-perks span { font-size: .88rem; opacity: .8; line-height: 1.45; }
.pw-page .pw-steps li { background: rgba(255, 255, 255, .03); }

@keyframes pw-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pw-down { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .pw-card, .pw-toast { animation: none; } }
@media print { .pw-card, .pw-toast { display: none !important; } }
