/* SMEKTA NOVA mobile bar + install UI. Standalone file (no build step needed).
 * Only active on phones (max-width: 767.98px) except the install dialog,
 * which can also open from the footer button on larger screens. */

:root {
    --nova-navy: #0c1d7a;
    --nova-blue: #1a3aa8;
    --nova-royal: #0a6ae8;
    --nova-gold: #f9c80e;
    --nova-surface: #fff;
    --nova-line: #e6e2d8;
    --nova-ink: #14183a;
    --nova-muted: #5a607f;
}

.nova-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--nova-line);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.nova-bottom-nav ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.nova-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 60px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    color: var(--nova-muted);
}

.nova-bottom-nav a:active {
    color: var(--nova-ink);
}

.nova-bottom-nav a[aria-current="page"] {
    color: var(--nova-royal);
}

.nova-bottom-nav .nova-bottom-nav-dot {
    width: 4px;
    height: 4px;
    border-radius: 9999px;
    background: transparent;
}

.nova-bottom-nav a[aria-current="page"] .nova-bottom-nav-dot {
    background: var(--nova-gold);
}

.nova-bottom-nav-safe {
    padding-bottom: env(safe-area-inset-bottom);
}

.nova-bottom-spacer {
    height: 68px;
}

.nova-install-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 40;
    border: 1px solid var(--nova-line);
    border-radius: 16px;
    background: var(--nova-surface);
    padding: 12px;
    box-shadow: 0 12px 32px rgba(12, 29, 122, 0.16);
}

.nova-install-banner-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nova-install-banner img {
    flex-shrink: 0;
}

.nova-install-banner p {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--nova-ink);
}

.nova-install-banner strong {
    color: var(--nova-navy);
}

.nova-install-banner small {
    color: var(--nova-muted);
}

.nova-icon-button {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--nova-muted);
    cursor: pointer;
}

.nova-icon-button:active {
    background: #faf8f3;
}

.nova-install-banner-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.nova-btn-primary,
.nova-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.nova-btn-primary {
    border: 0;
    background: var(--nova-royal);
    color: #fff;
}

.nova-btn-primary:active {
    background: var(--nova-blue);
}

.nova-btn-ghost {
    border: 1px solid var(--nova-line);
    background: var(--nova-surface);
    color: var(--nova-ink);
}

.nova-btn-ghost:active {
    background: #faf8f3;
}

.nova-install-dialog {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 16px;
}

.nova-install-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 29, 122, 0.5);
}

.nova-install-dialog-card {
    position: relative;
    width: 100%;
    max-width: 24rem;
    border-radius: 16px;
    background: var(--nova-surface);
    padding: 20px;
    box-shadow: 0 24px 64px rgba(12, 29, 122, 0.28);
}

.nova-install-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.nova-install-dialog-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--nova-navy);
}

.nova-install-dialog ol {
    margin: 12px 0 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--nova-ink);
}

.nova-install-dialog li + li {
    margin-top: 8px;
}

.nova-install-dialog .nova-btn-primary {
    width: 100%;
    margin-top: 16px;
}

.nova-footer-install {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid var(--nova-line);
    border-radius: 12px;
    background: transparent;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--nova-navy);
    cursor: pointer;
}

.nova-footer-install:active {
    border-color: var(--nova-royal);
    color: var(--nova-royal);
}

.nova-footer-install.is-on {
    border-color: var(--nova-royal);
    color: var(--nova-royal);
    background: rgba(10, 106, 232, 0.08);
}

.nova-footer-install:disabled {
    opacity: 0.6;
    cursor: wait;
}

@media (min-width: 768px) {
    .nova-mobile-only {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nova-install-banner,
    .nova-install-dialog-card {
        transition: none !important;
        animation: none !important;
    }
}
