/* ─────────────────────────────────────────────────────────────
   GoodMarket — shared "Install app" (PWA) banner styles.

   Used by the homepage (dark indigo canvas) and the wallet page (light
   "Soft Sunrise" canvas), so the palette is self-contained rather than
   depending on either page's theme variables. A deep indigo → violet card
   with a G$ gold action button reads clearly on BOTH surfaces, and the
   button uses dark text on gold so it passes WCAG AA (white on amber fails).

   Behaviour is driven by static/js/pwa-install.js:
     .gm-pwa-banner            → hidden by default, revealed with .show
     .gm-pwa-banner.show       → visible
   ───────────────────────────────────────────────────────────── */

.gm-pwa-banner {
    display: none;
    position: relative;
    align-items: center;
    gap: 0.85rem;
    margin: 0.6rem auto 0.2rem;
    max-width: 720px;
    padding: 0.95rem 1.05rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #1b1140 0%, #2a1a5e 55%, #3b2478 100%);
    border: 1px solid rgba(167, 139, 250, 0.42);
    box-shadow: 0 10px 26px rgba(11, 15, 42, 0.42);
    color: #f5f3ff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: left;
}

.gm-pwa-banner.show {
    display: flex;
    flex-wrap: wrap;
}

.gm-pwa-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.gm-pwa-body {
    flex: 1 1 220px;
    min-width: 0;
}

.gm-pwa-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.gm-pwa-copy {
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(245, 243, 255, 0.86);
}

.gm-pwa-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gm-pwa-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f1300;
    border: none;
    border-radius: 40px;
    padding: 0.62rem 1.25rem;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.gm-pwa-install-btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.gm-pwa-install-btn:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; }

.gm-pwa-dismiss-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #f5f3ff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.gm-pwa-dismiss-btn:hover { background: rgba(255, 255, 255, 0.24); }
.gm-pwa-dismiss-btn:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; }

.gm-pwa-status {
    flex: 1 1 100%;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #fcd34d;
    min-height: 0;
}

.gm-pwa-status:empty { display: none; }

@media (max-width: 560px) {
    .gm-pwa-banner { margin-left: 0.9rem; margin-right: 0.9rem; }
    .gm-pwa-actions { flex: 1 1 100%; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .gm-pwa-install-btn { transition: none; }
    .gm-pwa-install-btn:hover { transform: none; }
}

/* ── "New version available" toast (revives the old login-page banner) ── */
.gm-pwa-update-toast {
    position: fixed;
    left: 50%;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: min(92vw, 30rem);
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: #1a103d;
    color: #f5f3ff;
    border: 1px solid rgba(196, 181, 253, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    font-size: 0.85rem;
    line-height: 1.35;
}

.gm-pwa-update-toast button {
    flex: 0 0 auto;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f1300;
}

.gm-pwa-update-toast .gm-pwa-update-close {
    background: transparent;
    color: #c4b5fd;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0.2rem 0.5rem;
}

.gm-pwa-update-toast button:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; }

