/**
 * Site Bottom Navigation Toolbar Stylesheet (public/css/bottom-toolbar.css)
 * 100% Pure Native Vanilla CSS with Glassmorphism, Dark Mode & Safe-Area support.
 */

/* Prevent page content from being hidden behind fixed toolbar (Mobile only) */
body.has-bottom-toolbar {
    padding-bottom: 0 !important;
}

@media (max-width: 768px) {
    body.has-bottom-toolbar {
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    }
    body.has-bottom-toolbar #image-zoom-container {
        padding-bottom: calc(135px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

.site-bottom-toolbar {
    display: none !important; /* Hidden on desktop view */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999 !important;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(185%) blur(20px);
    -webkit-backdrop-filter: saturate(185%) blur(20px);
    border-top: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.07);
    padding: 0 0 env(safe-area-inset-bottom, 0px) 0;
    margin: 0;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    -webkit-touch-callout: none;
}

@media (max-width: 768px) {
    .site-bottom-toolbar {
        display: block !important; /* Visible on mobile view only */
    }
}

html.dark .site-bottom-toolbar {
    background: rgba(15, 23, 42, 0.88);
    border-top-color: rgba(51, 65, 85, 0.82);
    box-shadow: 0 -6px 26px rgba(0, 0, 0, 0.42);
}

.site-bottom-toolbar-inner {
    max-width: 580px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 62px;
    padding: 4px 6px;
    box-sizing: border-box;
    gap: 2px;
}

.site-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #64748b;
    padding: 4px 4px;
    min-height: 48px;
    border-radius: 14px;
    flex: 1;
    min-width: 0;
    position: relative;
    transition: color 0.18s ease, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.site-bottom-nav-item:active {
    transform: scale(0.92);
}

.site-bottom-nav-item:hover {
    color: #4338ca;
}

html.dark .site-bottom-nav-item {
    color: #94a3b8;
}

html.dark .site-bottom-nav-item:hover {
    color: #a5b4fc;
}

.site-bottom-nav-item.active {
    color: #4338ca;
}

html.dark .site-bottom-nav-item.active {
    color: #a5b4fc;
}

/* Native Android Material 3 / iOS Tab Capsule behind Icon */
.site-bottom-nav-icon {
    width: 48px;
    height: 28px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.site-bottom-nav-item:active .site-bottom-nav-icon {
    background: rgba(79, 70, 229, 0.08);
}

.site-bottom-nav-item.active .site-bottom-nav-icon {
    background: rgba(79, 70, 229, 0.12);
    transform: translateY(-1px) scale(1.03);
}

html.dark .site-bottom-nav-item.active .site-bottom-nav-icon {
    background: rgba(129, 140, 248, 0.18);
}

.site-bottom-nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke-width 0.18s ease;
}

.site-bottom-nav-item.active .site-bottom-nav-icon svg {
    stroke-width: 2.35;
}

/* Pulsing Live Dot for Live TV */
.site-bottom-live-dot {
    position: absolute;
    top: 3px;
    right: 11px;
    width: 7px;
    height: 7px;
    background-color: #ef4444;
    border: 1.5px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
    animation: livePulse 1.8s infinite ease-in-out;
}

html.dark .site-bottom-live-dot {
    border-color: #0f172a;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.site-bottom-nav-label {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.1px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-bottom-nav-item.active .site-bottom-nav-label {
    font-weight: 900;
}

@media (max-width: 374px) {
    .site-bottom-nav-icon {
        width: 42px;
        height: 26px;
    }
    .site-bottom-nav-label {
        font-size: 10px;
        font-weight: 900;
    }
}

/* App Pull-to-Refresh Indicator */
.app-pull-refresh-indicator {
    position: fixed;
    top: max(16px, env(safe-area-inset-top, 16px));
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}
.app-pull-refresh-indicator.visible {
    transform: translateX(-50%) translateY(0);
}
.app-pull-spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid #e2e8f0;
    border-top-color: #1e3a8a;
    border-radius: 50%;
    animation: appSpin 0.75s linear infinite;
}
@keyframes appSpin {
    to { transform: rotate(360deg); }
}


