/* ==========================================================================
   NEXUS installable app: the "Install app" entries, the manual install guide
   and the offline notice. Driven by static/js/nexus-pwa.js; loaded by base.html
   and the landing page, which does not extend it.
   ========================================================================== */

/* The menu entry stands out from the account links around it, since it is the
   one that does something other than navigate. */
[data-pwa-install] i { color: #22c4ff; }

/* --- Manual install guide (a SweetAlert popup) --------------------------- */

.pwa-guide .pwa-guide-lead {
    margin: 0 0 16px;
    color: #9aa0a6;
    font-size: 0.95rem;
}

.pwa-guide .pwa-guide-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.pwa-guide .pwa-guide-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.92rem;
    line-height: 1.45;
}

.pwa-guide .pwa-guide-steps li + li { margin-top: 8px; }

.pwa-guide .pwa-guide-steps i {
    flex: 0 0 18px;
    margin-top: 3px;
    text-align: center;
    color: #22c4ff;
}

.pwa-guide .pwa-guide-steps strong { color: #fff; font-weight: 600; }

/* --- Offline notice -------------------------------------------------------- */

.pwa-offline-pill {
    position: fixed;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 10px 16px;
    border: 1px solid rgba(231, 76, 60, 0.45);
    border-radius: 999px;
    background: rgba(22, 22, 24, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 0.88rem;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.pwa-offline-pill.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pwa-offline-pill i { color: #e74c3c; }

@media (prefers-reduced-motion: reduce) {
    .pwa-offline-pill { transition: none; }
}
