/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-bottom: 1px solid #dee2e6;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-content {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(46, 80, 22, 0.1);
}

.logo:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(46, 80, 22, 0.15);
  background: rgba(255,255,255,0.95);
}

.logo-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
  transform: scale(1.1);
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  color: #2d5016;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.location-indicator {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-left: 8px;
  padding: 4px 8px;
  background: rgba(74, 85, 104, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.location-indicator::before {
  content: "📍";
  font-size: 11px;
}

.location-indicator:hover {
  background: rgba(74, 85, 104, 0.15);
  color: #2d3748;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #4a5568;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-buttons.guest-only {
  display: flex;
}

.auth-buttons.guest-only.hidden {
  display: none;
}

.header-nav {
  display: flex;
  gap: 4px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  background: rgba(248, 249, 250, 0.8);
  border: 1px solid rgba(233, 236, 239, 0.5);
}

.nav-btn:hover {
  background: rgba(233, 236, 239, 0.9);
  transform: translateY(-1px);
}

.nav-btn.active {
  background: #28a745;
  border-color: #28a745;
}

.nav-btn-icon {
  font-size: 16px;
  color: #6c757d;
}

.nav-btn.active .nav-btn-icon {
  color: white;
}

/* Floating Search Overlay */
.floating-search-overlay {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: none;
  width: calc(100% - 40px);
  max-width: 500px;
}

.floating-search-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(233, 236, 239, 0.3);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  pointer-events: all;
  width: 100%;
}

.search-input-container {
  display: flex;
  align-items: center;
  background: rgba(248, 249, 250, 0.8);
  border: 1px solid rgba(233, 236, 239, 0.5);
  border-radius: 12px;
  padding: 12px 16px;
  gap: 12px;
  margin-bottom: 12px;
}

.search-icon {
  font-size: 16px;
  color: #6c757d;
}

#search-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px;
  outline: none;
  color: #333;
}

#search-input::placeholder {
  color: #6c757d;
}

.search-clear-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: #6c757d;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
}

.search-clear-btn:hover {
  background: #e9ecef;
  color: #495057;
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.search-results {
  padding: 8px 0;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f8f9fa;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.highlighted {
  background: #f8f9fa;
}

.search-result-icon {
  font-size: 16px;
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.search-result-content {
  flex: 1;
}

.search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 2px;
}

.search-result-subtitle {
  font-size: 12px;
  color: #6c757d;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

/* Search Area Button */
.search-area-container {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.search-area-btn {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(233, 236, 239, 0.5);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-area-btn:hover {
  background: white;
  border-color: #28a745;
  color: #28a745;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Filter Pills */
.filter-pills {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0;
  width: 100%;
}

.filter-pill {
  background: rgba(248, 249, 250, 0.9);
  border: 1px solid rgba(233, 236, 239, 0.5);
  border-radius: 20px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  backdrop-filter: blur(5px);
  flex: 1;
  text-align: center;
  min-width: 0;
}

.filter-pill:hover {
  background: rgba(233, 236, 239, 0.8);
}

.filter-pill.active {
  background: #28a745;
  color: white;
  border-color: #28a745;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Map Container */
.map-container {
  height: calc(100vh - 140px);
  min-height: 400px;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.location-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1000;
  transition: all 0.2s;
}

.location-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Bottom Toolbar */
.bottom-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(233, 236, 239, 0.3);
  z-index: 1000;
  padding: 8px 0;
}

.toolbar-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 20px;
}

.toolbar-item {
  flex: 1;
  display: flex;
  flex-direction: column !important;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  text-decoration: none;
  color: #6c757d;
  transition: all 0.2s;
  border-radius: 8px;
  max-width: 80px;
}

.toolbar-item:hover {
  background: rgba(248, 249, 250, 0.8);
  color: #495057;
}

.toolbar-item.active {
  color: #28a745;
  background: rgba(40, 167, 69, 0.1);
}

.toolbar-icon {
  font-size: 18px;
  display: block;
  line-height: 1;
}

.toolbar-label {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  display: block;
  white-space: nowrap;
}

.vendor-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e9ecef;
  overflow: hidden;
}

.vendor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.vendor-card-images {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.vendor-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.vendor-card:hover .vendor-main-image {
  transform: scale(1.05);
}

.image-count {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.vendor-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 16px 16px 0;
}

.vendor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: white;
}

.vendor-avatar.bozo-headstash { background: #8e44ad; }
.vendor-avatar.gumbo { background: #e74c3c; }
.vendor-avatar.deep-fried { background: #f39c12; }
.vendor-avatar.high-tolerance { background: #3498db; }
.vendor-avatar.other { background: #95a5a6; }

.vendor-info h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.vendor-location {
  font-size: 14px;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 4px;
}

.vendor-card-body {
  margin-bottom: 12px;
  padding: 0 16px;
}

.vendor-title {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.vendor-description {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.4;
}

.vendor-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px 16px;
}

.vendor-price {
  font-size: 16px;
  font-weight: 600;
  color: #28a745;
}

.vendor-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vendor-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #6c757d;
}

.vendor-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.vendor-status.in-stock {
  background: #d4edda;
  color: #155724;
}

.vendor-status.verified {
  background: #d1ecf1;
  color: #0c5460;
}

.vendor-status.low-stock {
  background: #fff3cd;
  color: #856404;
}

.message-btn {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.message-btn:hover {
  background: #218838;
}

/* Vendor Modal */
.vendor-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: none;
  align-items: flex-end;
  animation: fadeIn 0.3s ease;
}

.vendor-modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 16px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
}

.close-btn {
  background: #f8f9fa;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 20px;
}


/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Loading States */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: #6c757d;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e9ecef;
  border-top: 2px solid #28a745;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (min-width: 768px) {
  .map-container {
    height: calc(100vh - 140px);
  }
  
  .floating-search-overlay {
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 380px;
    max-width: 380px;
  }
  
  .bottom-toolbar {
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(233, 236, 239, 0.3);
    border-bottom: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  }
  
  .toolbar-nav {
    padding: 0 16px;
  }
  
  .vendor-modal {
    align-items: center;
    justify-content: center;
  }
  
  .modal-content {
    border-radius: 12px;
    max-width: 500px;
    max-height: 600px;
  }
}

@media (min-width: 1024px) {
  .bottom-toolbar {
    max-width: 400px;
  }
}

/* Custom Map Markers */
.custom-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: transform 0.2s;
}

.custom-marker:hover {
  transform: scale(1.1);
}

.custom-marker.bozo-headstash { background: #8e44ad; }
.custom-marker.gumbo { background: #e74c3c; }
.custom-marker.deep-fried { background: #f39c12; }
.custom-marker.high-tolerance { background: #3498db; }
.custom-marker.other { background: #95a5a6; }