/*
 * fh-booking.css — FareHarbor live booking widget styles.
 * Tide Chart design tokens: ink #000, paper #fff, ocean #155d89, sky #a5c3d0.
 * Fonts Fraunces (display) / Archivo (text) are loaded by the host site.
 * Mobile-first, scoped .fhb-* class names, no horizontal overflow.
 */

.fhb {
  --fhb-ink: #000;
  --fhb-paper: #fff;
  --fhb-ocean: #155d89;
  --fhb-sky: #a5c3d0;
  --fhb-line: rgba(0, 0, 0, 0.12);
  --fhb-muted: rgba(0, 0, 0, 0.55);
  --fhb-radius: 10px;

  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--fhb-ink);
  -webkit-text-size-adjust: 100%;

  /* Never let the widget dictate its own width — it must fit whatever grid/flex
     column it is dropped into. The date strip scrolls internally instead. */
  min-width: 0;
  max-width: 100%;
}

/* Neutralize the default `min-width:auto` on the grid/flex ITEM that wraps the
   widget; otherwise the non-wrapping date strip's min-content blows the column
   out (collapsing sibling columns to one-word-per-line). Reusable + parent-agnostic. */
:where(*):has(> .fhb) {
  min-width: 0;
}
.fhb-dates,
.fhb-dates-scroll {
  min-width: 0;
  max-width: 100%;
}

/* When JS enhances, the static fallback is collapsed but its book link stays reachable. */
.fhb-fallback--enhanced {
  display: none;
}

/* ---- live shell ---- */
.fhb-live {
  border: 1px solid var(--fhb-line);
  border-radius: var(--fhb-radius);
  padding: 16px;
  background: var(--fhb-paper);
}

.fhb-price {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.2;
  margin-bottom: 14px;
}
.fhb-price-amt {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--fhb-ink);
}
.fhb-price-note {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--fhb-muted);
}

.fhb-dates-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fhb-muted);
  margin-bottom: 8px;
}

/* ---- date strip (horizontal scroll, never overflows the page) ---- */
.fhb-dates {
  margin-bottom: 14px;
}
.fhb-dates-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.fhb-dates-scroll::-webkit-scrollbar { height: 6px; }
.fhb-dates-scroll::-webkit-scrollbar-thumb { background: var(--fhb-sky); border-radius: 3px; }

.fhb-date {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 76px;
  padding: 8px 10px;
  border: 1px solid var(--fhb-line);
  border-radius: 8px;
  background: var(--fhb-paper);
  color: var(--fhb-ink);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.fhb-date:hover:not(:disabled) {
  border-color: var(--fhb-ocean);
}
.fhb-date--active {
  background: var(--fhb-ocean);
  border-color: var(--fhb-ocean);
  color: var(--fhb-paper);
}
.fhb-date--soldout,
.fhb-date:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.fhb-date-day { font-weight: 600; white-space: nowrap; }
.fhb-date-tag {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fhb-muted);
}

/* ---- slots ---- */
.fhb-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fhb-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--fhb-line);
  border-radius: 8px;
  background: var(--fhb-paper);
}
.fhb-slot--unavail {
  opacity: 0.6;
}
.fhb-slot-info {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.fhb-slot-time {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.02rem;
  font-weight: 600;
}
.fhb-slot-status {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.fhb-slot-open { color: var(--fhb-ocean); }
.fhb-slot-closed { color: var(--fhb-muted); }
.fhb-slot-phone { color: var(--fhb-ink); }
.fhb-slot-approx {
  font-size: 0.7rem;
  color: var(--fhb-muted);
}
.fhb-slot-empty {
  font-size: 0.85rem;
  color: var(--fhb-muted);
  padding: 8px 2px;
}

/* ---- book button ---- */
.fhb-book {
  flex: 0 0 auto;
  display: inline-block;
  padding: 8px 16px;
  background: var(--fhb-ocean);
  color: var(--fhb-paper);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.12s;
}
.fhb-book:hover { filter: brightness(1.08); }
.fhb-book:focus-visible { outline: 2px solid var(--fhb-ink); outline-offset: 2px; }

/* ---- status / loading line ---- */
.fhb-status {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--fhb-muted);
}
.fhb-status:empty { display: none; }

/* ---- slightly roomier on larger screens ---- */
@media (min-width: 640px) {
  .fhb-live { padding: 20px; }
  .fhb-price-amt { font-size: 1.85rem; }
}
