/* Android Specific Fixes for Mobile Bottom Navigation */

/* Fix for Android Chrome address bar issues */
@supports (-webkit-touch-callout: none) {
    .mobile-bottom-nav {
        /* Use viewport units that account for address bar */
        bottom: env(safe-area-inset-bottom, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    
    .main-content {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
}

/* Android specific touch improvements */
@media (hover: none) and (pointer: coarse) {
    .nav-item {
        /* Larger touch targets for Android */
        min-height: 48px;
        min-width: 48px;
        padding: 12px 8px;
    }
    
    .nav-item:active {
        transform: scale(0.95);
        background: rgba(59, 130, 246, 0.15);
    }
    
    .center-menu-btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .center-menu-btn:active {
        transform: scale(0.95) translateY(-2px);
    }
}

/* Fix for Android WebView rendering issues */
.mobile-bottom-nav {
    /* Force hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

.nav-item {
    /* Prevent text selection on Android */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Improve touch responsiveness */
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    touch-action: manipulation;
}

/* Fix for Android status bar overlap */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

/* Android specific backdrop filter fallback */
@supports not (backdrop-filter: blur(20px)) {
    .mobile-bottom-nav {
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid #e5e7eb;
    }
    
    .dark .mobile-bottom-nav {
        background: rgba(31, 41, 55, 0.98);
        border-top: 1px solid #374151;
    }
}

/* Fix for Android Chrome 88+ address bar */
@media screen and (max-height: 600px) {
    .mobile-bottom-nav {
        bottom: 0;
    }
}

/* Android specific animation optimizations */
@media (prefers-reduced-motion: no-preference) {
    .nav-item {
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .nav-item:active {
        transition: all 0.1s ease;
    }
}

/* Fix for Android keyboard issues */
@media screen and (max-height: 500px) {
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        transform: none;
    }
}

/* Android specific icon sizing */
@media screen and (max-width: 480px) {
    .mobile-app-icon {
        width: 24px;
        height: 24px;
    }
    
    .nav-item svg {
        width: 20px;
        height: 20px;
    }
}

/* Fix for Android text rendering */
.nav-item span {
    /* Improve text rendering on Android */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
}

/* Android specific gradient fixes */
.nav-item.active {
    /* Fallback for older Android browsers */
    background: #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

/* Fix for Android Chrome address bar hiding */
@media screen and (max-height: 700px) {
    .mobile-bottom-nav {
        bottom: 0;
        position: fixed;
    }
}

/* Android specific shadow fixes */
.mobile-bottom-nav {
    /* Better shadow for Android */
    /* No shadow */
}

.dark .mobile-bottom-nav {
    /* No shadow */
}
