/* NitroPlayer installable app (PWA) UI: install buttons, install card, iOS how-to, standalone back button, window controls overlay */
.np-pwa-hdr { flex: none; }
.np-pwa-hdr .ico { width: 20px; height: 20px; }
/* "Get the app" links (header menu + footer) */
.site-footer .footer-col a.np-app-link { color: var(--volt); font-weight: 700; }
@media (max-width: 760px) { .np-pwa-hdr { display: none; } }

.np-pwa-card {
    position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 6300;
    width: min(380px, calc(100vw - 32px)); background: var(--bg-card); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--r-lg, 20px); box-shadow: var(--shadow-3); padding: 16px 16px 14px;
    animation: npPwaIn .28s var(--ease, ease) both;
}
@keyframes npPwaIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.np-pwa-row { display: flex; gap: 12px; align-items: flex-start; }
.np-pwa-row img { flex: none; width: 44px; height: 44px; border-radius: 12px; }
.np-pwa-t { font: 800 17px/1.25 var(--font-display); padding-right: 24px; margin-bottom: 4px; }
.np-pwa-card p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--text-dim); }
.np-pwa-k { display: inline; font-weight: 700; color: var(--text); white-space: nowrap; }
.np-pwa-k svg { vertical-align: -3px; color: var(--sky, #2f9bff); }
.np-pwa-b { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.np-pwa-b .btn .ico { width: 16px; height: 16px; }
.np-pwa-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--text-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.np-pwa-x:hover { background: var(--bg-panel); color: var(--text); }
@media (max-width: 600px) { .np-pwa-card { left: 12px; right: 12px; width: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); } }

/* inside the game's result box, right after a win */
.np-pwa-win { position: relative; margin-top: 14px; padding: 14px 14px 12px; border-radius: 14px; background: var(--bg-panel); border: 1px solid var(--border); text-align: left; color: var(--text); }
.np-pwa-win .np-pwa-row img { width: 38px; height: 38px; border-radius: 10px; }
.np-pwa-win .np-pwa-t { font-size: 15.5px; }
.np-pwa-win p { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--text-dim); }
.np-pwa-win .np-pwa-b { margin-top: 10px; flex-wrap: wrap; }

/* installed app */
.np-standalone .np-pwa-btn, .np-standalone #np-pwa-card, .np-standalone .np-pwa-win, .np-standalone .np-app-link { display: none !important; }
.np-pwa-back { flex: none; margin-left: -8px; }
.np-pwa-back .ico { width: 22px; height: 22px; }

/* desktop app with the title bar hidden (window controls overlay): keep the header clear of the window buttons and draggable */
@media (display-mode: window-controls-overlay) {
    .site-header {
        padding-left: env(titlebar-area-x, 0px);
        padding-right: calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw));
        -webkit-app-region: drag; app-region: drag;
    }
    .site-header a, .site-header button, .site-header input, .site-header select, .site-header form, .site-header .hud, .site-header .search-pop, .site-header .mobile-nav {
        -webkit-app-region: no-drag; app-region: no-drag;
    }
}
