/* ============================================
   RESPONSIVE STYLES - App View + Web View
   ============================================ */

/* Prevent zoom on mobile */
input, select, textarea, button {
    font-size: 16px !important;
}
* {
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

/* ===== MOBILE APP VIEW (max-width: 768px) ===== */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
        background: #f5f7fa;
    }
    
    /* App Header */
    .app-header {
        display: block !important;
        background: white;
        padding: 6px 16px 10px;
        position: sticky;
        top: 0;
        z-index: 100;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    }
    
    /* Bottom Navigation */
    .bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 6px 0 10px;
        box-shadow: 0 -2px 20px rgba(0,0,0,0.06);
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom, 10px);
    }
    
    .bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #999;
        font-size: 9px;
        font-weight: 500;
        padding: 2px 8px;
        position: relative;
        border: none;
        background: none;
        transition: color 0.2s;
    }
    
    .bottom-nav .nav-item.active {
        color: #667eea;
    }
    
    .bottom-nav .nav-item i {
        font-size: 20px;
        margin-bottom: 1px;
    }
    
    .bottom-nav .nav-item .nav-badge {
        position: absolute;
        top: -4px;
        right: 2px;
        background: #ef4444;
        color: white;
        font-size: 8px;
        font-weight: 700;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid white;
    }
    
    .bottom-nav .nav-item .nav-label {
        font-size: 9px;
    }
    
    /* Mobile Search */
    .search-bar-mobile {
        background: white;
        border-radius: 12px;
        padding: 10px 14px;
        display: flex;
        align-items: center;
        gap: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    
    .search-bar-mobile input {
        border: none;
        outline: none;
        flex: 1;
        font-size: 15px !important;
        background: transparent;
    }
    
    /* Food Cards - Mobile */
    .food-card {
        transition: transform 0.2s;
    }
    
    .food-card:active {
        transform: scale(0.97);
    }
    
    .food-card img {
        height: 120px !important;
    }
    
    /* Category items - Mobile */
    .category-item {
        flex: 0 0 60px !important;
    }
    
    .category-item .icon-wrap {
        width: 48px !important;
        height: 48px !important;
        font-size: 18px !important;
    }
    
    /* Banner - Mobile */
    .banner-slider {
        height: 130px !important;
    }
    
    .banner-slider .slide h3 {
        font-size: 17px !important;
    }
    
    .banner-slider .slide .banner-emoji {
        font-size: 40px !important;
    }
}

/* ===== DESKTOP WEB VIEW (min-width: 769px) ===== */
@media (min-width: 769px) {
    body {
        padding-bottom: 0;
        background: #f8f9fa;
    }
    
    .app-header {
        display: none !important;
    }
    
    .bottom-nav {
        display: none !important;
    }
    
    .web-header {
        display: block !important;
    }
    
    .web-footer {
        display: block !important;
    }
    
    /* Desktop Food Cards */
    .food-card {
        transition: transform 0.3s, box-shadow 0.3s;
        cursor: pointer;
    }
    
    .food-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    }
    
    /* Desktop Category */
    .category-item {
        transition: transform 0.3s;
        cursor: pointer;
    }
    
    .category-item:hover {
        transform: translateY(-3px);
    }
    
    /* Desktop Banner */
    .banner-slider {
        height: 200px !important;
        border-radius: 20px !important;
    }
    
    .banner-slider .slide {
        padding: 30px 40px !important;
    }
    
    .banner-slider .slide h3 {
        font-size: 26px !important;
    }
}

/* ===== COMMON STYLES ===== */
/* Category scroll hide scrollbar */
.categories-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar {
    display: none;
}

/* Toast notifications */
.toast-container {
    z-index: 9999;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Touch-friendly buttons */
.btn, .nav-item, .category-item, .food-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .app-header {
        background: #1a1a2e !important;
    }
    .app-header .logo {
        color: white !important;
    }
    .app-header .header-actions a {
        color: white !important;
    }
    .app-header .location {
        color: #aaa !important;
    }
    .bottom-nav {
        background: #1a1a2e !important;
    }
    .bottom-nav .nav-item {
        color: #777 !important;
    }
    .bottom-nav .nav-item.active {
        color: #667eea !important;
    }
    .menu-drawer {
        background: #1a1a2e !important;
    }
    .menu-drawer .drawer-menu a {
        color: #ddd !important;
    }
    .menu-drawer .drawer-menu a:active {
        background: #2d2d44 !important;
    }
    .food-card {
        background: #1a1a2e !important;
    }
    .food-card .food-name {
        color: white !important;
    }
    .food-card .food-price {
        color: white !important;
    }
    .search-bar-mobile {
        background: #1a1a2e !important;
    }
    .search-bar-mobile input {
        color: white !important;
    }
    .search-bar-mobile input::placeholder {
        color: #666 !important;
    }
    .web-header {
        background: #1a1a2e !important;
    }
    .web-header .logo {
        color: white !important;
    }
    .web-header .nav-links a {
        color: #aaa !important;
    }
    .web-header .nav-links a:hover,
    .web-header .nav-links a.active {
        color: #667eea !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .bottom-nav, .app-header, .web-header, .web-footer {
        display: none !important;
    }
    body {
        padding: 0 !important;
        background: white !important;
    }
}