/* ==========================================================================
   PWA Install Banner
   Shared across all client shells (auth / dashboard / landing)
   Shows only on mobile (≤ 768 px). Hidden by default; JS adds .pwa-bar--visible.
   ========================================================================== */

#pwa-install-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.10);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 12px 16px;
    /* honour safe-area on iPhone X+ */
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

#pwa-install-bar.pwa-bar--visible {
    transform: translateY(0);
}

.pwa-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.pwa-bar-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    background: #3B82F6;
}

.pwa-bar-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pwa-bar-body {
    flex: 1;
    min-width: 0;
}

.pwa-bar-title {
    font-weight: 700;
    font-size: 13px;
    color: #1e293b;
    line-height: 1.3;
    display: block;
}

.pwa-bar-sub {
    font-size: 11px;
    color: #64748b;
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-bar-cta {
    flex-shrink: 0;
    background: #3B82F6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    line-height: 1;
}

.pwa-bar-cta:hover,
.pwa-bar-cta:focus-visible {
    background: #2563EB;
    outline: none;
}

.pwa-bar-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}

.pwa-bar-close:hover,
.pwa-bar-close:focus-visible {
    background: #f1f5f9;
    color: #475569;
    outline: none;
}

/* Desktop: never show */
@media (min-width: 769px) {
    #pwa-install-bar {
        display: none !important;
    }
}
