/* SIDDHANATH PWA UI SYSTEM */

:root {
    --pwa-nav-height: 70px;
    --pwa-glass: rgba(255, 255, 255, 0.8);
    --pwa-blur: 15px;
}

/* Bottom Navigation Bar */
.pwa-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--pwa-nav-height);
    background: var(--pwa-nav-bg, var(--pwa-glass));
    backdrop-filter: blur(var(--pwa-blur));
    -webkit-backdrop-filter: blur(var(--pwa-blur));
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 10000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.03);
}

.pwa-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888;
    position: relative;
    width: 25%;
    transition: all 0.3s ease;
}

.pwa-nav-item .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pwa-nav-item span:not(.dashicons) {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pwa-nav-item.active {
    color: var(--pwa-nav-active, #39b54a);
}

.pwa-nav-item.active .dashicons {
    transform: translateY(-5px);
}

/* Badges */
.cart-count-badge {
    position: absolute;
    top: -5px;
    right: 20%;
    background: #ff3b30;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(255, 59, 48, 0.3);
}

/* ═══════════════════════════════════════════
   ELITE ADDONS: TRANSITIONS & WAKE LOCK
   ═══════════════════════════════════════════ */
body {
    transition: opacity 0.5s ease;
}

body.is-ready {
    opacity: 1 !important;
}

.wake-lock-active-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #39b54a;
    border-radius: 50%;
    z-index: 10001;
    box-shadow: 0 0 10px rgba(57, 181, 74, 0.8);
    display: none;
}

/* 1. MOBILE BOTTOM NAVIGATION */
#pwa-install-banner {
    position: fixed;
    bottom: 90px;
    left: 20px;
    right: 20px;
    background: rgba(25, 25, 25, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10001;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transform: translateY(150%);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#pwa-install-banner.show {
    transform: translateY(0);
}

.pwa-banner-icon img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
}

.pwa-banner-text h4 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
}

.pwa-banner-text p {
    margin: 2px 0 0;
    font-size: 12px;
    opacity: 0.7;
}

.pwa-banner-action {
    margin-left: auto;
}

.pwa-install-btn {
    background: var(--pwa-nav-active, #39b54a);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
}

/* Pull to Refresh Indicator */
#ptr-indicator {
    position: fixed;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10002;
    transition: transform 0.1s linear;
}

/* Offline Indicator */
#offline-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff3b30;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 800;
    z-index: 10003;
    display: none;
}

/* Adjust App Shell for Bottom Nav */
body.pwa-active-nav {
    padding-bottom: var(--pwa-nav-height);
}

@media (min-width: 768px) {
    .pwa-bottom-nav { display: none; }
}
