/* App Navbar - Shared styles for Upload, History, Plan tabs */
/* Matches analysis.html dark theme aesthetic */

/* Ensure consistent body styles across all navbar pages */
body.has-navbar {
    background: linear-gradient(180deg, #000000 0%, #05101e 100%);
    min-height: 100vh;
}

/* Bottom Navigation Bar */
.app-bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    /* PWA safe area support for notched devices */
    padding: 0.6rem 0;
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
    /* Ensure consistent positioning across pages */
    box-sizing: border-box;
    margin: 0;
}

.app-bottom-navbar .nav-container {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 1rem;
    box-sizing: border-box;
}

.app-bottom-navbar .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.45);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: color 0.2s ease, transform 0.15s ease;
    min-width: 60px;
    position: relative;
}

.app-bottom-navbar .nav-item:hover {
    color: rgba(255, 255, 255, 0.75);
}

.app-bottom-navbar .nav-item:active {
    transform: scale(0.95);
}

/* Active state - gold indicator */
.app-bottom-navbar .nav-item.active {
    color: #dfa400;
}

.app-bottom-navbar .nav-item.active::before {
    content: '';
    position: absolute;
    top: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, #b8860b, #dfa400, #ffd700);
    border-radius: 0 0 3px 3px;
}

/* Nav icon - SVG icons */
.app-bottom-navbar .nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-bottom-navbar .nav-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.app-bottom-navbar .nav-item:hover .nav-icon svg {
    transform: scale(1.1);
}

.app-bottom-navbar .nav-item.active .nav-icon svg {
    filter: drop-shadow(0 0 4px rgba(223, 164, 0, 0.4));
}

/* Nav label */
.app-bottom-navbar .nav-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: 'Alef', sans-serif;
}

/* Ensure page content doesn't get hidden behind navbar */
.has-navbar {
    padding-bottom: 80px !important;
}

/* Mobile adjustments */
@media (max-width: 400px) {
    .app-bottom-navbar .nav-item {
        padding: 0.5rem 1rem;
        min-width: 60px;
    }
    
    .app-bottom-navbar .nav-icon {
        width: 22px;
        height: 22px;
    }
    
    .app-bottom-navbar .nav-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .app-bottom-navbar .nav-label {
        font-size: 0.6rem;
        letter-spacing: 0.5px;
    }
}

/* PWA standalone mode - extra bottom padding for home indicator */
@media (display-mode: standalone) {
    .app-bottom-navbar {
        padding-bottom: max(0.8rem, env(safe-area-inset-bottom));
    }
}
