/* ============================================================
   Samarth eGov · "Install app" card (PWA)
   Built by js/pwa.js; shown on phones/tablets only, on both shells.
   Sits above the back-to-top ring (1035) and below the mega menu (1070)
   and command palette (1080). Below md it clears the bottom bar.
   ============================================================ */
.g-pwa {
    position: fixed;
    z-index: 1036;
    left: clamp(1rem, 3vw, 2rem);
    bottom: calc(clamp(1rem, 3vw, 2rem) + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    width: min(24rem, calc(100% - 2rem));
    padding: 1rem 2.5rem 1rem 1rem;
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-lg);
    background: var(--g-surface);
    color: var(--g-text);
    box-shadow: var(--g-shadow-lg);
    opacity: 0;
    transform: translateY(.75rem);
    transition: opacity .2s ease, transform .2s ease;
}
.g-pwa.is-shown { opacity: 1; transform: none; }
@media (max-width: 767.98px) {
    .g-pwa {
        right: 1rem;
        left: 1rem;
        width: auto;
        bottom: calc(var(--g-bbar-h, 0px) + .75rem + env(safe-area-inset-bottom, 0px));
    }
}
@media (prefers-reduced-motion: reduce) {
    .g-pwa { transition: none; transform: none; }
}
.g-pwa__icon { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; }
.g-pwa__body { min-width: 0; }
.g-pwa__title { margin: 0 0 .2rem; font-size: .95rem; font-weight: 650; line-height: 1.35; }
.g-pwa__text { margin: 0; font-size: .85rem; line-height: 1.5; color: var(--g-text-muted); }
.g-pwa__text .bi { color: var(--g-accent); }
.g-pwa__text strong { color: var(--g-text); font-weight: 600; }
/* Screenshot strip (app-store style): scrolls sideways, snaps per shot, and
   the next shot peeks in so it reads as more to see. Wider card on a computer
   so a desktop shot is large enough to read. */
.g-pwa--shots { width: min(28rem, calc(100% - 2rem)); }
.g-pwa__shots {
    display: flex;
    gap: .6rem;
    margin: .8rem 0 0;
    padding: 0 0 .4rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.g-pwa__shots:focus-visible { outline: 3px solid color-mix(in srgb, var(--g-accent) 45%, transparent); outline-offset: 2px; border-radius: var(--g-r-md); }
.g-pwa__shot {
    flex: none;
    width: auto;
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-md);
    background: var(--g-surface-2);
    scroll-snap-align: start;
}
.g-pwa__shots--narrow .g-pwa__shot { height: 13rem; aspect-ratio: 780 / 1688; }
.g-pwa__shots--wide .g-pwa__shot { height: 9.5rem; aspect-ratio: 1280 / 800; }
@media (max-height: 640px) {
    .g-pwa__shots--narrow .g-pwa__shot { height: 9.5rem; }
}
.g-pwa__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.g-pwa__btn {
    min-height: 2.25rem;
    padding: 0 1rem;
    border: 1px solid var(--g-border-strong);
    border-radius: var(--g-r-md);
    background: transparent;
    color: var(--g-text);
    font-size: .85rem;
    font-weight: 600;
}
.g-pwa__btn:hover { background: var(--g-surface-2); }
.g-pwa__btn--primary {
    border-color: var(--g-accent);
    background: var(--g-accent);
    color: #fff; /* text on accent, as primary buttons: lint-allow-raw-colour */
}
.g-pwa__btn--primary:hover { background: var(--g-accent-strong); border-color: var(--g-accent-strong); }
.g-pwa__btn:focus-visible,
.g-pwa__close:focus-visible { outline: 3px solid color-mix(in srgb, var(--g-accent) 45%, transparent); outline-offset: 2px; }
.g-pwa__close {
    position: absolute;
    top: .5rem;
    right: .5rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--g-text-muted);
}
.g-pwa__close:hover { background: var(--g-surface-2); color: var(--g-text); }
