/*
 * SCHOOL_PWA_APP_READY_V1_20260905
 * Shared PWA/runtime presentation.
 */

html[data-school-app-mode="standalone"] {
    min-height: 100%;
}

.app-network-status {
    position: fixed;
    right: 16px;
    bottom: calc(
        16px
        + env(safe-area-inset-bottom)
    );
    z-index: 2147483000;
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: min(390px, calc(100vw - 32px));
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    background: #101828;
    color: #fff;
    box-shadow:
        0 14px 38px rgba(15,23,42,.24);
    font:
        700 12px/1.4
        Inter,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition:
        opacity .18s ease,
        transform .18s ease,
        visibility .18s ease;
    pointer-events: none;
}

.app-network-status::before {
    content: "";
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow:
        0 0 0 4px
        rgba(245,158,11,.14);
}

html.is-offline
.app-network-status {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* Standalone offline fallback screen. */

.app-offline-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: grid;
    place-items: center;
    padding:
        max(24px, env(safe-area-inset-top))
        20px
        max(24px, env(safe-area-inset-bottom));
    background:
        radial-gradient(
            circle at top right,
            rgba(37,99,235,.13),
            transparent 32%
        ),
        #f3f6fb;
    color: #101828;
    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}

.app-offline-card {
    width: min(440px, 100%);
    padding: 30px;
    border: 1px solid #e4e7ec;
    border-radius: 22px;
    background: #fff;
    box-shadow:
        0 20px 56px
        rgba(16,24,40,.12);
    text-align: center;
}

.app-offline-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    border-radius: 20px;
    background: #101828;
    color: #fff;
    font-size: 30px;
}

.app-offline-card h1 {
    margin: 0;
    font-size: 27px;
    line-height: 1.15;
}

.app-offline-card p {
    margin: 12px 0 24px;
    color: #667085;
    line-height: 1.6;
}

.app-offline-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 18px;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 600px) {
    .app-network-status {
        left: 12px;
        right: 12px;
        bottom: calc(
            12px
            + env(safe-area-inset-bottom)
        );
        max-width: none;
    }

    .app-offline-card {
        padding: 25px 20px;
    }
}
