/* ==========================================================================
   Janki Steno — PWA install affordances
   The button styles are self-contained so they look right in the public
   header, the student header and the admin topbar alike.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Install button
   -------------------------------------------------------------------------- */

.js-install {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .95rem;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: .6rem;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

    .js-install:hover,
    .js-install:focus-visible {
        background: rgba(255, 255, 255, .18);
        border-color: rgba(255, 255, 255, .45);
        color: #fff;
    }

    .js-install:active {
        transform: translateY(1px);
    }

    .js-install svg {
        flex: none;
        width: 1.05em;
        height: 1.05em;
    }

@media (hover: none) and (pointer: coarse) {
    .js-install,
    .js-install-fab {
        min-height: 42px;
    }
}

/* Light surfaces (admin topbar is dark, but page bodies are not) */
.js-install--light {
    border-color: #dce8fb;
    background: #f0f5fe;
    color: #1d448f;
}

    .js-install--light:hover,
    .js-install--light:focus-visible {
        background: #e2ecfd;
        border-color: #b9d2f7;
        color: #17346f;
    }

/* Solid accent variant, used in the home-page hero */
.js-install--accent {
    padding: .8rem 1.5rem;
    border: 0;
    border-radius: .75rem;
    background: linear-gradient(135deg, #f0a020 0%, #e08a10 100%);
    color: #12233f;
    font-size: .95rem;
    box-shadow: 0 8px 20px -6px rgba(240, 160, 32, .6);
}

    .js-install--accent:hover,
    .js-install--accent:focus-visible {
        background: linear-gradient(135deg, #f5ac36 0%, #ec9718 100%);
        color: #12233f;
    }

/* --------------------------------------------------------------------------
   Floating install pill (home page, small screens)
   -------------------------------------------------------------------------- */

.js-install-fab {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 1035;
    display: none; /* enabled per-breakpoint below */
    padding: .7rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: #0f2350;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: 0 10px 24px -8px rgba(15, 35, 80, .7);
}

    .js-install-fab:hover,
    .js-install-fab:focus-visible {
        background: #17346f;
        color: #fff;
    }

@media (max-width: 991.98px) {
    .js-install-fab:not([hidden]) {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
    }
}

/* --------------------------------------------------------------------------
   Home page "install the app" band
   -------------------------------------------------------------------------- */

.js-appband {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    padding: clamp(1.5rem, 3.5vw, 2.75rem);
    border-radius: var(--js-radius-lg, 1rem);
    background:
        radial-gradient(700px 320px at 88% -30%, rgba(240, 160, 32, .22), transparent 68%),
        linear-gradient(135deg, #0f2350 0%, #08152f 100%);
    color: rgba(255, 255, 255, .82);
    box-shadow: 0 20px 44px -18px rgba(8, 21, 47, .65);
}

.js-appband__icon img {
    display: block;
    width: clamp(76px, 9vw, 108px);
    height: auto;
    border-radius: 1.35rem;
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .6);
}

.js-appband__copy .js-kicker {
    color: var(--js-accent, #f0a020);
}

.js-appband__copy h2 {
    margin: .5rem 0 .65rem;
    color: #fff;
    font-size: clamp(1.3rem, 2.4vw, 1.85rem);
}

.js-appband__copy p {
    margin: 0 0 1rem;
    max-width: 46rem;
    font-size: .95rem;
    line-height: 1.75;
}

.js-appband__points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: .35rem 1.5rem;
    margin: 0 0 1.4rem;
    padding: 0;
    list-style: none;
    font-size: .9rem;
}

    .js-appband__points li {
        display: flex;
        align-items: flex-start;
        gap: .5rem;
    }

    .js-appband__points i {
        margin-top: .18rem;
        color: var(--js-accent, #f0a020);
    }

.js-appband__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1.15rem;
}

.js-appband__note {
    font-size: .82rem;
    color: rgba(255, 255, 255, .6);
}

@media (max-width: 767.98px) {
    .js-appband {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .js-appband__points {
        text-align: left;
        justify-items: start;
        max-width: 22rem;
        margin-inline: auto;
    }

    .js-appband__actions {
        justify-content: center;
    }

    .js-install--accent {
        width: 100%;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   "How to add" sheet, shown when the browser has no install prompt
   -------------------------------------------------------------------------- */

.pwa-sheet {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.pwa-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 21, 47, .62);
    backdrop-filter: blur(2px);
}

.pwa-sheet-card {
    position: relative;
    width: 100%;
    max-width: 25rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: 1rem;
    background: #fff;
    color: #475467;
    font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    text-align: center;
    box-shadow: 0 24px 60px -12px rgba(8, 21, 47, .5);
}

.pwa-sheet-x {
    position: absolute;
    top: .5rem;
    right: .65rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: #667085;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

    .pwa-sheet-x:hover {
        background: #f2f4f7;
        color: #101828;
    }

.pwa-sheet-logo {
    width: 56px;
    height: 56px;
    border-radius: .9rem;
}

.pwa-sheet-title {
    margin: .85rem 0 1rem;
    color: #101828;
    font-size: 1.15rem;
    font-weight: 600;
}

.pwa-sheet-steps {
    margin: 0 0 1.35rem;
    padding-left: 1.15rem;
    text-align: left;
    font-size: .9rem;
    line-height: 1.7;
}

    .pwa-sheet-steps li + li {
        margin-top: .4rem;
    }

    .pwa-sheet-steps strong {
        color: #101828;
    }

.pwa-sheet-ok {
    width: 100%;
    padding: .7rem 1rem;
    border: 0;
    border-radius: .65rem;
    background: #0f2350;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

    .pwa-sheet-ok:hover {
        background: #17346f;
    }

/* Nothing PWA-related should ever print. */
@media print {
    .js-install,
    .js-install-fab,
    .pwa-sheet {
        display: none !important;
    }
}
