/* Find us section. Copy with find-us.js and lib/leaflet/. */

.find-us {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 56rem) {
  .find-us { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: stretch; }
  .find-us .map { aspect-ratio: auto; min-height: 28rem; }   /* as tall as the details beside it */
}

.find-us h2 { font: 700 clamp(2rem, 4vw, 2.6rem)/1.1 var(--slab, Georgia, serif); margin: 0 0 1.25rem; }
.find-us h3 { font: 700 1.25rem/1.2 var(--slab, Georgia, serif); margin: 2.25rem 0 .75rem; }
.find-us address { font-style: normal; font-size: 1.15rem; line-height: 1.5; }
.phone { margin: .5rem 0 0; }
.phone a { font-size: 1.15rem; }

.directions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.button {
  display: inline-flex; align-items: center; min-height: 44px; padding: .7rem 1.2rem;
  border-radius: 999px; text-decoration: none; font-weight: 600;
  background: var(--turmeric, #f2b134); color: #1b1b1b;
}
.button:hover { background: #ffc85a; }
.button-quiet { background: transparent; color: var(--ink, inherit); box-shadow: inset 0 0 0 2px currentColor; }
.button-quiet:hover { background: rgba(255, 255, 255, .08); }

/* Open-now badge: hidden in the HTML, shown by find-us.js. Without JS
   the hours table alone is still correct. */
.open-status {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1rem;
  padding: .35rem .8rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  background: rgba(255, 255, 255, .08);
}
.open-status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; }
.open-status[data-state="open"]   { color: #8fe0a8; }
.open-status[data-state="soon"]   { color: var(--turmeric, #f2b134); }
.open-status[data-state="closed"] { color: #f2a493; }
.open-status[hidden] { display: none; }

.hours { border-collapse: collapse; width: 100%; max-width: 24rem; }
.hours th, .hours td { text-align: left; padding: .4rem 0; border-bottom: 1px solid var(--line, #ccc); font-weight: 400; }
.hours th { padding-right: 1.5rem; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; }
.hours tr.is-today th::after { content: " (today)"; font-weight: 400; color: var(--ink-soft, inherit); }
.hours-note { color: var(--ink-soft, inherit); font-size: .95rem; margin: .75rem 0 0; }

/* The map box. isolation:isolate keeps Leaflet's own z-indexes (up to 1000
   on its controls) inside this box, so they cannot slide over a sticky
   header as the page scrolls. */
.map {
  position: relative; isolation: isolate;
  /* No min-height alongside aspect-ratio here: on a 390px phone a 288px
     min-height forces the box 384px WIDE, past the gutter, and the whole
     page scrolls sideways. The tall desktop version sets aspect-ratio:auto. */
  aspect-ratio: 4 / 3;
  border-radius: 10px; overflow: hidden;
  background: var(--ground-2, #e8e8e8);
}
.map-canvas { position: absolute; inset: 0; }
.map-fallback {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-content: center; gap: .5rem; text-align: center; padding: 1.5rem;
  background:
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(255, 255, 255, .035) 18px 36px),
    var(--ground-2, #e8e8e8);
}
.map-fallback p { margin: 0; font-size: 1.1rem; }
.map.map-ready .map-fallback { display: none; }
.map.map-failed .map-fallback { display: grid; }
/* Leaflet's pin and controls (z-index 600–1000) would sit on top of the
   failure message, the pin right across its text. Hide the dead map. */
.map.map-failed .map-canvas { visibility: hidden; }
.map.map-failed .map-fallback::before { content: "The map could not load. The address and directions links still work."; color: var(--ink-soft, inherit); font-size: .95rem; }

/* Leaflet gives divIcons a white box and border by default. The custom
   className replaces it; this makes sure nothing paints behind the pin. */
.map-pin { background: none; border: 0; --pin: var(--chilli, #c0392b); }
.map-pin svg { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
