/* Mobile Bottom Navigation - Similar to main platform */

.mobile-bottom-nav {
    display: none;
    position: fixed !important; /* Винаги fixed за да е винаги видимо */
    /* Отчитаме навигационния бар на браузъра */
    bottom: max(env(safe-area-inset-bottom), 0px) !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--bg-color, #ffffff);
    border-top: 2px solid var(--border-color, #e0e0e0);
    padding: 12px 8px;
    padding-bottom: max(12px, calc(env(safe-area-inset-bottom) + 12px));
    z-index: 1000 !important; /* Над всичко */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    /* Уверете се, че менюто е винаги видимо в viewport-а */
    transform: translateZ(0); /* Hardware acceleration */
    -webkit-transform: translateZ(0);
    /* Отчитаме височината на навигационния бар на браузъра */
    margin-bottom: 0;
}

.mobile-bottom-nav .nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-secondary, #666);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 10px;
    min-width: 60px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.mobile-nav-item:active {
    background: var(--bg-light, #f5f5f5);
    transform: scale(0.95);
}

.mobile-nav-item.active {
    color: var(--primary-color, #1e40af);
    font-weight: 600;
}

.mobile-nav-item .nav-icon {
    font-size: 24px;
    line-height: 1;
}

.mobile-nav-item .nav-label {
    font-size: 11px;
    white-space: nowrap;
}

/* Show mobile nav on mobile devices */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
    }
    
    /* Add padding to main content for bottom nav and horizontal menu */
    .main-content {
        padding-bottom: calc(80px + 70px + 1rem) !important; /* Bottom nav (80px) + horizontal menu (70px) + spacing */
        margin-bottom: 0 !important;
    }
    
    /* Horizontal submenu stays at top - no change needed */
}

/* Desktop: Show hamburger menu in header, hide bottom nav */
@media (min-width: 769px) {
    .mobile-menu-btn,
    .mobile-library-btn {
        display: flex !important;
    }
    
    .mobile-bottom-nav {
        display: none;
    }
    
    /* Ensure horizontal submenu is visible on desktop */
    .horizontal-submenu {
        display: flex !important;
    }
}
