/* ============================================================
 * LESKOV — R19 PWA install / update / offline banners
 * ============================================================ */

:root {
    --leskov-pwa-banner-bg: rgba(13, 16, 28, 0.96);
    --leskov-pwa-banner-border: rgba(255, 255, 255, 0.1);
    --leskov-pwa-banner-text: #e8eaef;
    --leskov-pwa-banner-hint: rgba(255, 255, 255, 0.65);
    --leskov-pwa-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ---------- Install banner (bottom sheet) ---------- */

.leskov-pwa-install-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--leskov-pwa-banner-bg);
    border: 1px solid var(--leskov-pwa-banner-border);
    border-radius: 14px;
    color: var(--leskov-pwa-banner-text);
    box-shadow: var(--leskov-pwa-shadow);
    animation: leskov-pwa-slide-up 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 640px;
    margin: 0 auto;
}
.leskov-pwa-install-banner[hidden] { display: none; }
.leskov-pwa-install-banner__icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4f8bff, #7c5cff);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.leskov-pwa-install-banner__copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.leskov-pwa-install-banner__copy strong {
    font-size: 14px;
    font-weight: 700;
}
.leskov-pwa-install-banner__hint {
    font-size: 12px;
    color: var(--leskov-pwa-banner-hint);
    line-height: 1.4;
}
.leskov-pwa-install-banner__actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

@keyframes leskov-pwa-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ---------- Update banner (top bar) ---------- */

.leskov-pwa-update-banner {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--leskov-pwa-banner-bg);
    border: 1px solid rgba(79, 139, 255, 0.4);
    border-radius: 12px;
    color: var(--leskov-pwa-banner-text);
    box-shadow: var(--leskov-pwa-shadow);
    animation: leskov-pwa-slide-down 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 540px;
    width: calc(100% - 24px);
}
.leskov-pwa-update-banner[hidden] { display: none; }
.leskov-pwa-update-banner__icon {
    font-size: 22px;
    flex-shrink: 0;
}
.leskov-pwa-update-banner__copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.leskov-pwa-update-banner__copy strong {
    font-size: 14px;
    font-weight: 700;
}
.leskov-pwa-update-banner__hint {
    font-size: 12px;
    color: var(--leskov-pwa-banner-hint);
    line-height: 1.4;
}
.leskov-pwa-update-banner__actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

@keyframes leskov-pwa-slide-down {
    from { transform: translate(-50%, -20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* ---------- Offline toast ---------- */

.leskov-pwa-offline-toast {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9997;
    padding: 8px 16px;
    background: rgba(220, 80, 80, 0.95);
    color: #fff;
    border-radius: 999px;
    font-size: 13px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    animation: leskov-pwa-fade-in 0.3s ease;
}
.leskov-pwa-offline-toast[hidden] { display: none; }

@keyframes leskov-pwa-fade-in {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Mobile adjustments ---------- */

@media (max-width: 600px) {
    .leskov-pwa-install-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 10px 12px;
    }
    .leskov-pwa-install-banner__icon { width: 36px; height: 36px; font-size: 20px; }
    .leskov-pwa-install-banner__actions .site-btn { padding: 6px 12px; font-size: 13px; }
    .leskov-pwa-update-banner { top: 8px; width: calc(100% - 16px); padding: 8px 12px; }
}

/* ---------- Light-mode ---------- */

@media (prefers-color-scheme: light) {
    :root {
        --leskov-pwa-banner-bg: rgba(255, 255, 255, 0.96);
        --leskov-pwa-banner-border: rgba(0, 0, 0, 0.1);
        --leskov-pwa-banner-text: #111;
        --leskov-pwa-banner-hint: rgba(0, 0, 0, 0.6);
        --leskov-pwa-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }
}
