/* Ambridge.biz — reusable components.
   Each block below is one component. Use .class names, not IDs.
   Every screen composes from these. */

/* ============================================================
   Wordmark
   ============================================================ */
.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: inherit;
}
.wordmark .biz {
  background: var(--accent);
  color: var(--ink);
  padding: 0 4px;
  margin-left: 2px;
}

/* ============================================================
   Eyebrow tag (small uppercase label, often above headlines)
   ============================================================ */
.eyebrow {
  display: inline-block;
  background: var(--ink);
  color: var(--accent);
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  font-weight: 700;
}
.eyebrow.on-accent { background: var(--accent); color: var(--ink); }
.eyebrow.on-red { background: var(--accent-2); color: var(--bg); }

/* ============================================================
   Section header (H2 + underline)
   ============================================================ */
.section-header {
  border-bottom: var(--border-thick) solid var(--ink);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-3);
}
.section-header h2 { font-size: var(--text-2xl); }
.section-header .meta {
  color: var(--ink-3);
  font-size: 13px;
  margin-top: 2px;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--paper);
  border: var(--border-thin) solid var(--ink);
  padding: var(--space-5);
}
.card-link { color: inherit; display: block; }
.card-link:hover { color: inherit; background: rgba(230,180,35,0.06); }

/* ============================================================
   Business card (used in Open Now grid and search results)
   ============================================================ */
.biz-card { padding: var(--space-4); }
.biz-card__top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--space-2);
}
.biz-card__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-xl); line-height: var(--leading-tight);
  margin-bottom: var(--space-1);
}
.biz-card__meta {
  display: flex; gap: var(--space-2); align-items: center;
  font-size: 12px; color: var(--ink-3); margin-bottom: var(--space-3);
}
.biz-card__blurb {
  font-size: 13px; color: var(--ink-2); line-height: 1.45;
}

/* ============================================================
   Status pill: "Open now · closes 4p"
   ============================================================ */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
}
.status-pill.open { color: var(--open); }
.status-pill.closed { color: var(--ink-3); }
.status-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: inline-block;
}

/* ============================================================
   Category tag inline in card meta
   ============================================================ */
.category-tag {
  color: var(--ink); font-weight: 700;
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  font-size: var(--text-xs);
}

/* ============================================================
   Verified date label
   ============================================================ */
.verified-label { font-size: var(--text-xs); color: var(--ink-3); }

/* ============================================================
   Buttons (three tiers)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  padding: 11px 18px;
  font-weight: 700; font-size: 13px;
  min-height: var(--tap-min);
  border: var(--border-thin) solid var(--ink);
  cursor: pointer; text-decoration: none;
  transition: transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover { background: #000; color: white; }
.btn-secondary { background: var(--accent); color: var(--ink); }
.btn-secondary:hover { background: #d4a419; color: var(--ink); }
.btn-tertiary { background: var(--paper); color: var(--ink); }
.btn-tertiary:hover { background: var(--edge); color: var(--ink); }
.btn-large { padding: 14px; font-size: 15px; min-height: 52px; }

/* ============================================================
   Chip (pill-shaped filter/toggle button)
   ============================================================ */
.chip {
  background: transparent; color: var(--ink);
  border: var(--border-thin) solid var(--ink);
  padding: 9px 14px;
  font-weight: 700; font-size: 12px;
  min-height: 40px;
  white-space: nowrap; flex-shrink: 0;
  cursor: pointer;
}
.chip.is-active { background: var(--ink); color: white; }
.chip-row {
  display: flex; gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chip-row::-webkit-scrollbar { display: none; }

/* ============================================================
   Toggle (segmented control: List | Map)
   ============================================================ */
.toggle {
  display: inline-flex;
  border: var(--border-thin) solid var(--ink);
  padding: 2px;
  background: var(--paper);
}
.toggle button {
  background: transparent; color: var(--ink-2);
  border: 0; padding: 6px 12px;
  font: 700 12px var(--font-body);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.toggle button.is-active { background: var(--ink); color: white; }

/* ============================================================
   Icon button (icon-only tap target)
   ============================================================ */
.icon-btn {
  background: transparent;
  border: var(--border-thin) solid var(--ink);
  border-radius: var(--radius-sm);
  width: var(--tap-min); height: var(--tap-min);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ============================================================
   Verified strip (dashed card on business detail)
   ============================================================ */
.verified-strip {
  border: var(--border-thin) dashed var(--ink);
  padding: var(--space-4) 18px;
}

/* ============================================================
   Collection tile (for the discovery grid)
   ============================================================ */
.collection-tile {
  padding: var(--space-6) 22px;
  border: var(--border-thin) solid var(--ink);
  display: block; color: inherit;
}
.collection-tile__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-2xl); line-height: var(--leading-tight);
  margin-bottom: var(--space-2);
  text-wrap: balance;
}
.collection-tile__blurb {
  font-size: 13px; line-height: var(--leading-normal);
  opacity: 0.85; margin-bottom: var(--space-3);
}
.collection-tile__count {
  font-size: 12px; opacity: 0.85; font-weight: 600;
}

/* ============================================================
   Empty / error states
   ============================================================ */
.empty-state {
  padding: var(--space-8) var(--space-5);
  text-align: center;
  color: var(--ink-2);
  border: var(--border-thin) dashed var(--edge-dark);
}
.empty-state h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

/* ============================================================
   Business detail page
   ============================================================ */
.detail {
  padding: var(--space-6) var(--space-5) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.detail-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.detail-name {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  text-wrap: balance;
}
.detail-verified {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.detail-verified__icon {
  display: inline-flex;
  align-items: center;
}
.detail-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.detail-status__meta {
  font-size: var(--text-sm);
  color: var(--ink-3);
}
.detail-blurb {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}

/* Contact row: call / directions / website / facebook */
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.contact-btn {
  flex: 1 1 140px;
  min-width: 140px;
  min-height: var(--tap-min);
  gap: var(--space-2);
}
.contact-btn__icon {
  display: inline-flex;
  align-items: center;
}
.contact-btn__body {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}
.contact-btn__label {
  font-weight: 700;
  font-size: 13px;
}
.contact-btn__sub {
  font-weight: 500;
  font-size: 11px;
  opacity: 0.85;
}

/* Hours block */
.hours-list {
  display: flex;
  flex-direction: column;
}
.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-top: var(--border-thin) solid var(--edge);
  font-size: var(--text-base);
}
.hours-row:first-child {
  border-top: 0;
}
.hours-row__day {
  font-weight: 600;
  color: var(--ink);
}
.hours-row__time {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.hours-row--today {
  background: var(--accent);
  color: var(--ink);
  border-top-color: var(--ink);
}
.hours-row--today + .hours-row {
  border-top-color: var(--ink);
}
.hours-row--today .hours-row__day,
.hours-row--today .hours-row__time {
  color: var(--ink);
}

/* Specials block */
.specials-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.specials-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--paper);
  border: var(--border-thin) solid var(--edge);
  border-left: 4px solid var(--accent-2);
}
.specials-item__text {
  font-size: var(--text-base);
  color: var(--ink);
}
.day-chip {
  display: inline-block;
  background: var(--ink);
  color: var(--accent);
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  font-weight: 700;
}

.detail-footer {
  padding-top: var(--space-4);
  border-top: var(--border-thin) solid var(--edge);
}
.report-link {
  width: 100%;
}

/* ============================================================
   Collection page (discovery detail)
   ============================================================ */
.collection-header {
  padding: 28px var(--space-5);
}
.collection-header .eyebrow {
  margin-bottom: var(--space-3);
}
.collection-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-3);
  text-wrap: balance;
  color: inherit;
}
.collection-blurb {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  max-width: 60ch;
  margin: 0 0 var(--space-3);
}
.collection-meta {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
}
.collection-members {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space-5);
}

/* ============================================================
   Map view (Phase 5)
   ============================================================ */
.map-toolbar {
  position: sticky;
  top: 0;
  z-index: 810;
  background: var(--bg);
  border-bottom: var(--border-thick) solid var(--ink);
  padding: 8px var(--space-4);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.map-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 160px);
  height: calc(100dvh - 160px);
}
#map-canvas {
  height: 100%;
  width: 100%;
  background: var(--edge);
}
.map-pin-wrap { /* Leaflet divIcon wrapper — no styling. */ }
.map-pin {
  width: 32px;
  height: 32px;
  background: var(--ink);
  border: 3px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.map-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: var(--paper);
  border-top: var(--border-thick) solid var(--ink);
  padding: var(--space-4);
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  z-index: 800;
}
.map-sheet__close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.map-sheet__body {
  max-height: calc(70vh - 60px);
  overflow-y: auto;
}

/* Keep OSM attribution visible above the sheet (tile policy compliance) */
.leaflet-control-attribution {
  z-index: 810;
}

/* Not-found state (bad shop slug) */
.not-found {
  padding: var(--space-12) var(--space-5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.not-found h1 {
  font-size: var(--text-2xl);
  text-wrap: balance;
}
.not-found p {
  color: var(--ink-2);
  max-width: 32ch;
  margin: 0;
}
