/* News Bangla Today — PWA install / notification prompt UI.
   Bottom-sheet on mobile, compact floating card on desktop. Respects the
   OS-level prefers-color-scheme so it never looks broken in dark mode. */

#nbt-install-prompt, #nbt-notif-prompt {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    padding: 0;
    animation: nbtSlideUp .28s ease-out;
}

.nbt-install-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 24px rgba(0,0,0,.18);
    padding: 18px 20px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

.nbt-install-icon {
    flex: 0 0 auto;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    border-radius: 12px;
    overflow: hidden;
    background: #f2f4f7;
}
.nbt-install-icon img { width: 100%; height: 100%; object-fit: cover; }

.nbt-install-text { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.nbt-install-text strong { font-size: 15px; }
.nbt-install-text span { font-size: 12.5px; color: #666; line-height: 1.4; }

.nbt-install-actions { flex: 1 1 100%; display: flex; gap: 10px; margin-top: 4px; }

.nbt-btn {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s ease;
}
.nbt-btn:hover { opacity: .9; }
.nbt-btn:focus-visible { outline: 2px solid #0b5ed7; outline-offset: 2px; }

.nbt-btn-primary { background: #0b5ed7; color: #fff; }
.nbt-btn-secondary { background: #f2f4f7; color: #333; }

.nbt-install-close {
    position: absolute;
    top: 8px; right: 10px;
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px;
}
.nbt-install-close:focus-visible { outline: 2px solid #0b5ed7; }

@keyframes nbtSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* Desktop: a compact floating card, not a full-width sheet. */
@media (min-width: 768px) {
    #nbt-install-prompt, #nbt-notif-prompt {
        left: auto; right: 24px; bottom: 24px;
        justify-content: flex-end;
    }
    .nbt-install-card {
        max-width: 360px;
        border-radius: 16px;
        box-shadow: 0 8px 28px rgba(0,0,0,.16);
    }
}

@media (prefers-color-scheme: dark) {
    .nbt-install-card { background: #1e1f22; color: #eee; }
    .nbt-install-text span { color: #aaa; }
    .nbt-install-icon { background: #2a2b2f; }
    .nbt-btn-secondary { background: #2a2b2f; color: #ddd; }
    .nbt-install-close { color: #888; }
}

@media (prefers-reduced-motion: reduce) {
    #nbt-install-prompt, #nbt-notif-prompt { animation: none; }
}
