/* =========================================================
   HOOCH PICKLE CO. — STORE LOCATOR STYLES
   -----------------------------------------------------------
   Everything you'd want to re-brand later lives in :root below.
   Change a hex code or font name here and it updates everywhere.
   See "CUSTOMIZING LATER" in SETUP-GUIDE.md for details.
   ========================================================= */

:root {
  /* ---- Brand colors (sampled from Hooch Pickle Co. logo/branding) ---- */
  --brine-dark:    #47503C;  /* deep olive green — wordmark, header, primary text */
  --brine:         #5C6B4A;  /* mid olive green — secondary buttons/accents */
  --rust:          #B0573A;  /* signature terracotta — primary CTA */
  --rust-dark:     #8F4530;  /* rust hover/active */
  --gold:          #C98A2E;  /* warm mustard-gold — badges, "Not So Hot" */
  --gold-dark:     #A66F20;
  --cream:         #DEDBC0;  /* khaki parchment — page background */
  --card-bg:       #F8F5E9;  /* lighter parchment — cards/panels */
  --ink:           #33392A;  /* body text */
  --ink-soft:      #6E7260;  /* secondary text */
  --line:          #C9C4A0;  /* muted borders on parchment */

  /* Flavor key colors */
  --flavor-muddy:    #6B4A2F;
  --flavor-classic:  #47503C;
  --flavor-notsohot: #C98A2E;
  --flavor-hotkiss:  #9C3323;

  /* ---- Type ----
     Rye: bold vintage western display face, echoes the arched HOOCH wordmark.
     Caveat: hand-lettered script, echoes the "Where Cucumbers Become Legends" tagline.
     Libre Franklin: workhorse body/label face with confident bold weights. */
  --font-display: 'Rye', Georgia, serif;
  --font-script: 'Caveat', cursive;
  --font-body: 'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ---- Shape / motion ---- */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 18px rgba(30, 26, 16, 0.16);
  --ease: cubic-bezier(.22,.85,.35,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-text-size-adjust: 100%;
}

body {
  /* Respect iPhone notch / home indicator when embedded full-bleed */
  padding-bottom: env(safe-area-inset-bottom);
  /* subtle woven-parchment texture, kept faint so it never fights content */
  background-image:
    radial-gradient(rgba(71,80,60,0.05) 1px, transparent 1px);
  background-size: 5px 5px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

a { color: var(--rust); }

.app {
  max-width: 1180px;
  margin: 0 auto;
}

/* ================= HEADER ================= */
.hh-header {
  background: var(--brine-dark);
  padding: 22px 16px 28px;
  /* Launched from the home screen the status bar is translucent and overlays
     the page, so lift the header content clear of it. No-op in a browser tab. */
  padding-top: calc(22px + env(safe-area-inset-top, 0px));
  position: relative;
}
.hh-header__inner {
  position: relative;
  z-index: 1;
}

/* The "label panel" is the signature move: a parchment tag set into the
   dark olive header, mirroring how the Hooch logo itself sits on a cream
   card inside a dark green frame in the brand's own artwork. */
.hh-panel {
  max-width: 440px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 3px solid var(--rust);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  text-align: center;
  box-shadow: 0 8px 0 rgba(0,0,0,0.12);
}

.hh-tagline {
  font-family: var(--font-script);
  font-size: clamp(17px, 4.2vw, 20px);
  font-weight: 700;
  font-style: italic;
  color: var(--brine-dark);
  margin: 0 0 2px;
  line-height: 1.1;
}

.hh-logo {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto 6px;
}

.hh-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 7.5vw, 40px);
  line-height: 1.05;
  margin: 4px 0 4px;
  letter-spacing: 0.01em;
  color: var(--brine-dark);
}

.hh-subtitle {
  font-family: var(--font-script);
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 700;
  color: var(--rust);
  margin: 0;
  line-height: 1;
}

/* ================= CONTROLS ================= */
.hh-controls {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--cream);
}
.hh-search {
  display: flex;
  gap: 8px;
}
#search-input {
  flex: 1;
  min-width: 0;
  padding: 13px 14px;
  font-size: 16px; /* prevents iOS auto-zoom on focus */
  font-family: var(--font-body);
  font-weight: 500;
  border: 2px solid var(--brine-dark);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--ink);
}
#search-input::placeholder { color: var(--ink-soft); opacity: 0.85; }
#search-input:focus {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--rust);
}

.btn {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  cursor: pointer;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .12s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.btn--search {
  background: var(--brine-dark);
  color: var(--card-bg);
  border-color: var(--brine-dark);
}
.btn--search:hover { background: var(--brine); }

.btn--locate {
  background: var(--rust);
  color: #fff;
  border-color: var(--rust);
  width: 100%;
  box-shadow: var(--shadow);
}
.btn--locate:hover { background: var(--rust-dark); }
.btn--locate:disabled { opacity: 0.6; cursor: progress; }

.hh-status {
  min-height: 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0;
  text-align: center;
  font-weight: 500;
}
.hh-status--error { color: #8A2E1F; font-weight: 700; }

/* ================= MAP + LIST LAYOUT ================= */
.hh-main {
  display: flex;
  flex-direction: column;
  padding: 0 16px 16px;
  gap: 14px;
}

.hh-map {
  width: 100%;
  height: 46vh;
  min-height: 280px;
  max-height: 420px;
  border-radius: var(--radius);
  border: 3px solid var(--brine-dark);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #cfc9a8;
}

/* Brand the Leaflet zoom control to match rather than default Leaflet blue/white */
.leaflet-control-zoom {
  border: 2px solid var(--brine-dark) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
  box-shadow: var(--shadow) !important;
}
.leaflet-control-zoom a {
  background: var(--card-bg) !important;
  color: var(--brine-dark) !important;
  font-family: var(--font-body) !important;
  font-weight: 800 !important;
}
.leaflet-control-zoom a:hover {
  background: var(--gold) !important;
  color: #fff !important;
}
.leaflet-control-attribution {
  background: rgba(248,245,233,0.85) !important;
  font-family: var(--font-body);
  font-size: 10.5px !important;
}

.hh-list-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hh-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 10px;
  flex-wrap: wrap;
}
#results-count {
  font-weight: 800;
  font-size: 13px;
  color: var(--brine-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hh-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hh-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}
.hh-legend__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.hh-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- Store card: vintage tag / stamped-label look ---- */
.hh-card {
  background: var(--card-bg);
  border: 2px solid var(--brine-dark);
  border-top: 6px solid var(--rust);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  position: relative;
  box-shadow: var(--shadow);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
  scroll-margin-top: 12px;
}
.hh-card.is-active {
  border-color: var(--rust);
  border-top-color: var(--gold);
}
.hh-card:hover { transform: translateY(-1px); }

.hh-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.hh-card__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  margin: 0 0 3px;
  color: var(--brine-dark);
  line-height: 1.15;
}
.hh-card__address {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0 0 6px;
  font-weight: 500;
}
.hh-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.hh-card__partner {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--gold);
  padding: 3px 9px;
  border-radius: 999px;
}

/* "Coming Soon" — same pill shape as the partner badge, but muted so an open
   store always reads as the stronger signal in a mixed A–Z list. */
.hh-card__soon {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--brine-dark);
  background: transparent;
  border: 2px dashed var(--brine);
  padding: 1px 8px;
  border-radius: 999px;
}
/* Dashed top border reads as "not stocked yet" at a glance while scrolling. */
.hh-card--soon {
  border-top-style: dashed;
  border-top-color: var(--brine);
}

/* Stands in for the actions row on venues with no public storefront. */
.hh-card__note {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  font-style: italic;
  color: var(--ink-soft);
}

.hh-card__distance {
  flex-shrink: 0;
  background: var(--brine-dark);
  color: var(--card-bg);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.hh-card__flavors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}
.hh-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.hh-tag__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
}

.hh-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.btn--directions {
  background: var(--brine-dark);
  color: var(--card-bg);
  border-color: var(--brine-dark);
  font-size: 13px;
  padding: 10px 16px;
  text-decoration: none;
}
.btn--directions:hover { background: var(--brine); }
.hh-card__phone {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--rust);
  text-decoration: none;
}
.hh-card__phone:hover { text-decoration: underline; }

.hh-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* Leaflet popup branding */
.leaflet-popup-content-wrapper {
  border-radius: 10px;
  border: 2px solid var(--brine-dark);
  font-family: var(--font-body);
  background: var(--card-bg);
}
.leaflet-popup-content { margin: 10px 12px; font-size: 13px; color: var(--ink); }
.leaflet-popup-tip { background: var(--card-bg); border: 2px solid var(--brine-dark); border-top: none; border-left: none; }
.hh-popup__name { font-family: var(--font-display); font-weight: 400; font-size: 16px; color: var(--rust); }
.hh-popup__note { margin-top: 4px; font-size: 12px; font-style: italic; color: var(--ink-soft); }

/* ================= FOOTER ================= */
.hh-footer {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 16px 16px 28px;
  font-weight: 500;
}
.hh-footer a { font-weight: 700; }

/* ================= RESPONSIVE: TABLET / DESKTOP ================= */
@media (min-width: 900px) {
  .hh-header { padding: 34px 24px 40px; }
  .hh-panel { max-width: 520px; padding: 26px 30px 28px; }

  .hh-controls {
    flex-direction: row;
    align-items: center;
    padding: 22px 24px;
    max-width: 900px;
    margin: 0 auto;
  }
  .hh-search { flex: 1; }
  .btn--locate { width: auto; }
  .hh-status { flex-basis: 100%; }

  .hh-main {
    flex-direction: row;
    align-items: flex-start;
    padding: 0 24px 24px;
    height: 640px;
  }
  .hh-map {
    flex: 1.3;
    height: 100%;
    max-height: none;
    position: sticky;
    top: 20px;
  }
  .hh-list-wrap {
    flex: 1;
    height: 100%;
  }
  .hh-list {
    overflow-y: auto;
    padding-right: 6px;
    height: 100%;
  }
}

@media (min-width: 1180px) {
  .hh-map { flex: 1.6; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
