/* =====================================================================
   Distillery Finder: distillery pages (/distilleries/<slug>)
   Builds on styles.css (palette) and page.css (.page, .page--wide).
   ===================================================================== */
.page--wide.dist { max-width: 76rem; }
.dist h1 { margin-bottom: 6px; }
.page p.dist-sub { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; color: var(--muted); font-size: 16px; }
.dist .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

/* ---- Previous / All / Next ---- */
.dist-pager {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  margin: 0 0 18px; font-size: 14px;
}
.dist-pager a, .dist-pager span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page .dist-pager a { color: var(--primary); text-decoration: none; }
.page .dist-pager a:hover { text-decoration: underline; text-decoration-color: var(--whisky); }
.dist-pager__dir { display: block; font-size: 12px; color: var(--muted); }
.dist-pager__name { display: block; overflow: hidden; text-overflow: ellipsis; }
.dist-pager__prev .dist-pager__name::before { content: "← "; }
.dist-pager__next { text-align: right; }
.dist-pager__next .dist-pager__name::after { content: " →"; }
.dist-pager .is-off { visibility: hidden; }
.page .dist-pager .dist-pager__all { justify-self: center; font-weight: 600; }

/* ---- Card: facts beside the map, nearby strip below ---- */
.dist-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.dist-main { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; }
.dist-facts { padding: 18px 28px 24px; }
.dist-facts dl { margin: 0; }
.fact { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.fact:first-child { padding-top: 4px; }
.fact dt { font-size: 13px; line-height: 1.5; color: var(--muted); }
.fact dd { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.region { display: inline-flex; align-items: center; gap: 8px; }

.dist-tags { padding-top: 12px; }
.page .dist-tags h2, .page .dist-nearby h2 { margin: 0 0 8px; font: 700 16px var(--display); }
.dist .tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.dist .tags li { padding: 5px 10px; border-radius: 999px; background: var(--mist); color: var(--ink); font: 600 13px/1.2 var(--body); }
.dist .tags li.warn { background: var(--warn-bg); color: var(--warn-text); }

.dist-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.page .dist-actions .btn {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 8px 10px; border-radius: 10px;
  text-decoration: none; font: 600 15px var(--body);
}
.page .dist-actions .btn.primary { background: var(--whisky-btn); color: var(--on-primary); border: 1px solid var(--whisky-btn); }
.page .dist-actions .btn.secondary { background: var(--surface); color: var(--primary); border: 1px solid var(--primary); }
.dist-actions .btn.wide { grid-column: 1 / -1; }
.dist-actions .nosite.wide { grid-column: 1 / -1; text-align: center; padding: 6px 0 0; }
.dist-actions .btn:focus-visible { outline: 2px solid var(--whisky); outline-offset: 2px; }
@media (hover: hover) {
  .page .dist-actions .btn.primary:hover { background: var(--whisky-text); }
  .page .dist-actions .btn.secondary:hover { background: var(--mist); }
}
.page p.dist-note { margin: 12px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* ---- Map ---- */
.dist-mapbox { position: relative; min-height: 520px; border-left: 1px solid var(--border); background: var(--sea); }
#distMap { position: absolute; inset: 0; }
.page p.dist-nomap { margin: 0; padding: 24px; color: var(--muted); font-size: 15px; }
.dist-mapbox .gesture-hint {
  position: absolute; z-index: 999; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(37,45,41,.45); color: #fff; font: 600 16px var(--body); text-align: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.dist-mapbox .gesture-hint.show { opacity: 1; }
.still-pin svg { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
/* styles.css hides pin labels until the home map turns them on; this map has one pin, so always show it */
#distMap .pin-label {
  display: block; position: absolute; top: 14px; left: 29px; max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px;
  background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 3px rgba(37,45,41,.3);
  font: 600 13px/1.35 var(--body);
}

/* ---- Nearby ---- */
.dist-nearby { border-top: 1px solid var(--border); padding: 16px 28px 20px; }
.dist-nearby ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.page a.near-btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  min-height: 40px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--ink); text-decoration: none; font: 14px var(--body);
}
.near-btn .mi { color: var(--muted); font-size: 13px; }
.page a.near-btn:focus-visible { outline: 2px solid var(--whisky); outline-offset: 2px; }
@media (hover: hover) { .page a.near-btn:hover { border-color: var(--primary); background: var(--mist); color: var(--ink); } }

/* ---- Phones: facts, then map, then nearby ---- */
@media (max-width: 700px) {
  .dist-main { grid-template-columns: 1fr; }
  .dist-facts { padding: 8px 16px 16px; }
  .fact { grid-template-columns: 88px 1fr; }
  .dist-mapbox { min-height: 300px; border-left: 0; border-top: 1px solid var(--border); }
  .dist-nearby { padding: 12px 16px 14px; }
  /* Phones: one swipeable row */
  .dist-nearby ol { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 4px; }
  #distMap .pin-label { font-size: 12px; max-width: 150px; }
  .dist-pager { grid-template-columns: 1fr 1fr; }
  .page .dist-pager .dist-pager__all { display: none; }
}
@media (prefers-reduced-motion: reduce) { .dist-mapbox .gesture-hint { transition: none; } }
