* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    gap: 2rem;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.3);
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
}

header-left h1 {
    font-size: 2rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center; /* ensures vertical alignment with image */
}

.header-left .header-truck {
    width: 50px;          /* adjust to match h1 height */
    height: 50px;
    vertical-align: middle; /* fallback for inline alignment */
}

.header-right a.powered-by {
    padding: 3px 3px 3px 3px;
    border-radius: 5px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: black;
     font-family: 'Poppins', 'Segoe UI', sans-serif; /* nicer font */
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-align: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-right a.powered-by img {
    width: 100px; /* adjust size as needed */
    margin-top: 0.25rem;
     border-radius: 5px;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
}

body.map-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.container {
  display: flex;
  height: calc(100vh - 80px);
  flex-direction: row;
  position: relative;
  flex: 1;
}

footer {
  background: #1f2937;
  color: white;
  padding: 2rem 0 1rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer-section p {
  color: #d1d5db;
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.footer-logo {
  display: inline-block;
}

.footer-logo-link {
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s;
}

.footer-logo-link:hover {
  transform: translateY(-2px);
}

.footer-brand {
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
  margin: 0.25rem 0 0.5rem 0;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 1rem 2rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

.sidebar {
  width: 350px;
  background: white;
  overflow-y: auto;
  border-right: 1px solid #e5e7eb;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}



.sidebar.collapsed {
  width: 0;
  padding: 0;
  border-right: none;
  overflow: hidden;
}
.sidebar.collapsed + .sidebar-toggle {
  left: 8px;
}

.sidebar-toggle {
  position: absolute;
  top: 0;
  right: 100px;
  width: 50px;
  height: 50px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: left 0.3s ease;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
}

.sidebar-toggle:hover {
  background: #f9fafb;
}

/* Make sidebar full width on mobile and allow scrolling */
@media (max-width: 768px) {
  /* Header mobile styles */
  header {
    padding: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
  }

  header h1 {
    font-size: 1.25rem;
  }

  .header-left .header-truck {
    width: 35px;
    height: 35px;
  }

  .main-nav {
    gap: 0.5rem;
    width: 100%;
    justify-content: space-between;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    flex: 1;
    text-align: center;
  }

  .header-right a.powered-by {
    font-size: 0.625rem;
    padding: 2px;
  }

  .header-right a.powered-by img {
    width: 70px;
  }

  /* Footer mobile styles */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .footer-bottom {
    padding: 1rem;
  }

  .container {
    position: relative;
    flex-direction: column; /* stack sidebar and map */
  }

  .sidebar {

    width: 100%;
    height: 50%; /* take half the screen by default */
    max-height: 40vh; /* optional */
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .sidebar.collapsed {
    height: 0;
    padding: 0;
    border-bottom: none;
  }

  .sidebar-toggle {
    position: absolute;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    width: 50px;
    height: 50px;
  }

  .sidebar.collapsed + .sidebar-toggle {
    left: 0;
  }

  #map {
    flex: 1;
    height: 50%; /* rest of the screen */
  }

  .truck-card {
    font-size: 0.9rem; /* slightly smaller text for mobile */
  }

  .truck-cuisine {
    font-size: 0.6rem; /* adjust badges */
  }
}

.truck-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.truck-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* Grouped vendor styles */
.vendor-group {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.vendor-group:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #d1d5db;
}

.vendor-header {
  padding: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: background-color 0.2s;
  background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
  border-bottom: 1px solid #f3f4f6;
}

.vendor-header:hover {
  background: linear-gradient(to bottom, #f9fafb 0%, #f3f4f6 100%);
}

.vendor-info {
  flex: 1;
  min-width: 0;
}

.vendor-cuisines {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.location-count {
  background: #667eea;
  color: white;
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.expand-icon {
  font-size: 0.75rem;
  color: #6b7280;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.vendor-header.expanded .expand-icon {
  transform: rotate(180deg);
}

.vendor-events {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.vendor-events.collapsed {
  max-height: 0;
  opacity: 0;
}

.event-item {
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.event-item:hover {
  background-color: #f9fafb;
  padding-left: 1.25rem;
  border-left: 3px solid #667eea;
}

.event-item:first-child {
  border-top: none;
}

.truck-hours {
    font-size: 0.8rem;
    color: #374151;
    margin-top: 0.5rem;
    font-weight: 500;
}

.truck-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.truck-cuisine {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.55rem;
  margin-bottom: 0.5rem;
}

.truck-description {
  color: #6b7280;
  font-size: 0.875rem;
}

.truck-location {
  color: #6b7280;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
}

#map {
  flex: 1;
  height: 100%;
}

.info-window {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.info-window h3 {
  margin: 0 0 0.5rem 0;
  color: #1f2937;
}

.info-window p {
  margin: 0.25rem 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.info-window a {
    text-decoration: none;
    color: #667eea; /* optional: match your theme */
    font-weight: 500;
}

.info-window a:hover {
    text-decoration: underline; /* optional: add back on hover */
}

.info-window a:focus,
.info-window a:focus-visible,
.info-window a:active {
    outline: none;
    border: none;
    box-shadow: none;
}
