/* ---------------- Utility Overrides ---------------- */
/* Hide legacy ZIP input & filters/dropdown */
#zipInput,
#filters,
#categorySelect {
  display: none !important;
}

/* Ensure content never hides under header */
#storeResultsContainer,
#mapContainer {
  scroll-margin-top: 100px;
}

/* ---------------- Base & Layout ---------------- */
body {
  margin: 0;
  padding: 0;
  background: #111 url('bg.png') center/cover no-repeat fixed;
  color: #fff;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* ---------------- Controls & Hero ---------------- */
#controls {
  width: 100%;
  padding: 1rem;
  text-align: center;
}
#controls h1 {
  margin: 0;
  font-size: 5rem;
  font-family: 'Lobster', cursive;  /* switched from Lobster */
  letter-spacing: 3px;
  text-shadow: 4px 4px 20px #ffae00, -4px -4px 20px #00ffee;
}
#controls p {
  margin: 0.5rem 0 1rem;
  font-family: 'Baloo 2', cursive;
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffefef;
  text-shadow: 1px 1px 5px #000;
}

/* ---------------- Button Row ---------------- */
.button-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.button-row button {
  font-family: 'Righteous', cursive;
  font-size: 1.2rem;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* — icon inside the button — */
.button-row button .btn-icon {
  /* bump the size a bit */
  width: 1.5em;
  height: 1.5em;
  /* give it a matching pill‑shape & stroke */
  border-radius: 50%;
  /* a little padding so the icon doesn’t touch the stroke */
  padding: 0.25em;
  /* spacing from the label */
  margin-right: 0.5em;
  vertical-align: middle;
  background-color: rgba(255,255,255,0.1);
  pointer-events: none;
}

#smokeBtn {
  background: linear-gradient(45deg, rgba(79,172,254,0.8), rgba(0,242,254,0.8));
}
#weedBtn {
  background: linear-gradient(45deg, rgba(76,175,80,0.8), rgba(129,199,132,0.8));
}
#cigarBtn {
  background: linear-gradient(45deg, rgba(117,76,36,0.8), rgba(195,155,119,0.8));
}
.button-row button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

/* ---------------- Spinner ---------------- */
#spinner {
  display: none;
  margin-bottom: 1rem;
}

/* ---------------- Map Container ---------------- */
#mapContainer {
  width: 90%;
  max-width: 1000px;
  margin: 2rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  display: none;
}
#map {
  width: 100%;
  height: 400px;
}

/* ---------------- Results Table ---------------- */
#storeResultsContainer {
  width: 90%;
  max-width: 1000px;
  margin: 2rem auto;
}
#storeTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: transparent;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
}
#storeTable thead {
  background-color: rgba(255,255,255,0.15);
  backdrop-filter: blur(2px);
}
#storeTable,
#storeTable th,
#storeTable td {
  font-family: 'Baloo 2', cursive;
}
#storeTable th {
  padding: 10px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 1.2rem;
  color: #f7f8fa;
  border-bottom: 2px solid #004CE2;
}
#storeTable td {
  padding: 10px;
  font-size: 1rem;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  word-break: break-word;
}
.store-row-cigarettes {
  background: rgba(79, 172, 254, 0.5) !important;
  color: #333;
}
.store-row-cannabis {
  background: rgba(76,175,80,0.5);
  color: #fff;
}
.store-row-cigars {
  background: rgba(117,76,36,0.5);
  color: #f5f0e6;
}

/* ---------------- Pagination ---------------- */
#pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}
#pagination button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(45deg, rgba(79,172,254,0.8), rgba(0,242,254,0.8));
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
#pagination button.active {
  background: #c00;
}
#pagination button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
/* default (blue) already in place */
/* now override per category */

/* Cigarettes (blue) pagination */
#pagination.cigarettes button {
  background: linear-gradient(45deg, rgba(79,172,254,0.8), rgba(0,242,254,0.8));
}
#pagination.cigarettes button.active {
  background: rgb(26, 132, 225); /* full‑strength blue */
}

/* Cannabis (green) pagination */
#pagination.cannabis button {
  background: linear-gradient(45deg, rgba(76,175,80,0.8), rgba(129,199,132,0.8));
}
#pagination.cannabis button.active {
  background: rgb(33, 102, 35); /* full‑strength green */
}

/* Cigars (brown) pagination */
#pagination.cigars button {
  background: linear-gradient(45deg, rgba(117,76,36,0.8), rgba(195,155,119,0.8));
}
#pagination.cigars button.active {
  background: rgba(117,76,36,1); /* full‑strength brown */
}

/* ---------------- InfoWindow Fix ---------------- */
.gm-style .gm-style-iw * {
  text-shadow: none !important;
}

/* ---------------- Responsive Tweaks ---------------- */
@media screen and (max-width: 600px) {
  #storeTable th,
  #storeTable td {
    font-size: 0.85rem;
    padding: 8px 6px;
  }
  #map {
    height: 300px;
  }
  .button-row {
    flex-direction: column;
  }
}
/* ─── Store Name Links White ─── */
#storeTable td:first-child a {
  color: #fff !important;
}

/* ─── Center Phone & Distance Columns ─── */
#storeTable td:nth-child(3),
#storeTable td:nth-child(4) {
  text-align: center;
}
/* Highlight the selected button */
.button-row button.active {
  /* for example: a white outline + a slight inset shadow */
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.9),
    0 4px 12px rgba(0,0,0,0.4);
  transform: translateY(1px);  /* subtle “pressed” look */
}
/* ------------- Mobile Overrides ------------- */
@media (max-width: 600px) {
  /* Shrink the “Just Smokers” hero */
  #controls h1 {
    font-size: 3rem;           /* down from 5rem */
    text-shadow: 3px 3px 12px #000;
  }
  #controls p {
    font-size: 1.5rem;         /* down from 2.5rem */
    margin-bottom: 0.75rem;
  }

  /* Button row stacks & tighter pills */
  .button-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  .button-row button {
    font-size: 1rem;           /* down from 1.2rem */
    padding: 0.5rem 1rem;      /* less vertical padding */
    /* ensure the icon stays proportional */
  }
  .button-row button .btn-icon {
    width: 1.2em;
    height: 1.2em;
    padding: 0.15em;
    margin-right: 0.4em;
  }

  /* Table tweaks */
  #storeTable th,
  #storeTable td {
    font-size: 0.8rem;
    padding: 6px 4px;
  }

  /* Map height a bit shorter */
  #map {
    height: 300px;
  }
}
