/*
 * NanoNear PWA — inline install card + offline bar, shared by all three apps
 * (CRM, Nano Sign, Nano E-Marketing). Self-contained: no Tailwind needed.
 */

/* ------------------------------------------------------------------ */
/* Installed app (PWA, standalone window)                              */
/* ------------------------------------------------------------------ */

@media (display-mode: standalone), (display-mode: fullscreen) {
    html,
    body {
        overscroll-behavior-y: none;
    }

    /* Room for the iPhone home indicator. */
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Inline "Install app" card on login pages (filled by public/pwa/pwa.js) */
.nn-install-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    color: #111827;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
}

.nn-install-card[hidden],
.nn-install-card [hidden] {
    display: none !important;
}

.dark .nn-install-card {
    border-color: #1f2937;
    background: #111827;
    color: #f3f4f6;
}

.nn-install-card img {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 10px;
}

.nn-install-card .nn-install-text {
    flex: 1 1 auto;
    min-width: 0;
}

.nn-install-card .nn-install-text strong {
    display: block;
    font-weight: 600;
}

.nn-install-card .nn-install-text span {
    display: block;
    color: #6b7280;
    font-size: 12px;
}

.nn-install-card .nn-install-yes {
    flex: 0 0 auto;
    padding: 9px 16px;
    border: 0;
    border-radius: 8px;
    background: #0e90d9;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.nn-install-card .nn-install-yes:hover {
    background: #0b7bbb;
}

/* Offline notice (shown by public/pwa/pwa.js) */
.nn-offline-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10003;
    padding: calc(6px + env(safe-area-inset-top)) 12px 6px;
    background: #111827;
    color: #fff;
    font-size: 13px;
    text-align: center;
}
