/**
 * Ohio Beer Path - Mobile Optimizations
 * 
 * This file contains mobile-specific styles and optimizations
 */

/* Mobile-first approach for base elements */
body {
    font-size: 16px;
    line-height: 1.5;
}

/* Improved touch targets for mobile */
.btn, 
.nav-link,
.form-control,
.card-link,
select,
input[type="checkbox"],
input[type="radio"] {
    min-height: 44px; /* Minimum recommended touch target size */
}

/* Adjust button padding for better touch targets */
.btn {
    padding: 0.5rem 1rem;
}

/* Make sure small buttons are still accessible */
.btn-sm {
    min-height: 38px;
    padding: 0.4rem 0.8rem;
}

/* Improve form controls for touch */
.form-control, 
.form-select {
    padding: 0.75rem;
    font-size: 1rem;
}

/* Adjust spacing for mobile */
@media (max-width: 767.98px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Increase vertical spacing on mobile */
    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
    
    .my-4 {
        margin-top: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Adjust card layouts for mobile */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Adjust hero section for mobile */
    .hero-section {
        padding: 2rem 0 !important;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    /* Improve filter section on mobile */
    #amenityFilters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #amenityFilters .form-check {
        margin-bottom: 0.5rem;
    }
    
    /* Ensure map is usable on mobile */
    #map {
        height: 350px !important;
    }
    
    /* Improve brewery cards on mobile */
    .brewery-card .card-img-top {
        height: 150px !important;
    }
    
    /* Adjust footer for mobile */
    footer .col-md-4 {
        margin-bottom: 1.5rem;
    }
}

/* Improve modal display on mobile */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

/* Optimize navigation for mobile */
@media (max-width: 991.98px) {
    .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Improve touch feedback */
.btn:active,
.nav-link:active,
.card:active {
    transform: scale(0.98);
}

/* Improve mobile search experience */
.search-container {
    position: sticky;
    top: 56px; /* Height of navbar */
    z-index: 100;
    background: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Optimize image display for mobile */
.img-fluid {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Improve mobile scrolling */
.scroll-container {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
}

/* Mobile-friendly drag handle */
.drag-handle {
    cursor: move;
    padding: 10px;
    color: #aaa;
}

/* ===== Mobile Bottom Navigation (Enhanced) ===== */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 767.98px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: var(--spacing-xs) 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--spacing-sm) var(--spacing-xs);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--text-xs);
    font-weight: 500;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: color var(--transition-fast), transform var(--transition-fast);
    min-height: 56px;
    position: relative;
  }

  .mobile-bottom-nav a:active,
  .mobile-bottom-nav button:active {
    transform: scale(0.95);
  }

  .mobile-bottom-nav a.active {
    color: var(--color-primary);
  }

  .mobile-bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  .mobile-bottom-nav i {
    font-size: 1.4rem;
    margin-bottom: 2px;
  }

  .mobile-bottom-nav .badge {
    position: absolute;
    top: 6px;
    right: 50%;
    transform: translateX(12px);
    background: var(--color-accent);
    color: white;
    border-radius: var(--radius-full);
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
  }

  /* Add padding to body for fixed bottom nav */
  body {
    padding-bottom: 70px;
  }

}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 56px;
  z-index: 1050;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.65rem;
  gap: 2px;
  min-width: 56px;
  min-height: 44px;
  transition: color 0.2s;
}

.bottom-nav-item i {
  font-size: 1.2rem;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: #d97706;
}

.bottom-nav-item.active i {
  color: #fbbf24;
}
