/* ============================================================
   style.css — Tidewater component styles
   ============================================================ */

/* ---- Hero -------------------------------------------------- */
.hero {
  position: relative;
  text-align: center;
  padding: var(--space-9) var(--space-6) var(--space-7);
  max-width: 780px;
  margin: 0 auto;
  transition: opacity var(--dur-slow) var(--ease-tide),
              max-height var(--dur-slow) var(--ease-tide),
              padding var(--dur-slow) var(--ease-tide);
}

.hero-title,
.hero-sub { position: relative; z-index: 1; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: var(--fw-semi);
  font-variation-settings: "SOFT" 30, "opsz" 120, "WONK" 0;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: var(--space-4);
}

.hero-sub {
  font-family: var(--font-body);
  font-size: var(--t-body-lg);
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 560px;
  margin: 0 auto;
  letter-spacing: -0.005em;
}

.hero-sub strong {
  color: var(--text);
  font-weight: var(--fw-bold);
}

.hero.compact {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ---- Search hints ------------------------------------------ */
.search-hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-6);
  margin-bottom: var(--space-7);
  transition: opacity var(--dur-med) var(--ease-standard),
              max-height var(--dur-med) var(--ease-standard);
}

.search-hints.hidden {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0;
  pointer-events: none;
  display: flex !important;
}

.search-hint-chip {
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
}

.search-hint-chip:hover {
  background: var(--primary-tint);
  color: var(--primary);
  border-color: var(--primary-tint);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ---- Search sticky ----------------------------------------- */
.search-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
  transition: padding var(--dur-med) var(--ease-standard),
              background-color var(--dur-slow) var(--ease-standard),
              box-shadow var(--dur-slow) var(--ease-standard);
}

.search-sticky.active {
  padding: var(--space-4) 0 var(--space-3);
}

.search-sticky.pinned {
  background: var(--pinned-bg);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

@media (max-width: 640px) {
  .search-sticky {
    position: static;
  }
  .search-sticky.pinned {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }
  .search-hints {
    display: none;
  }
}

.search-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: var(--fw-semi);
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  align-self: flex-start;
  padding: 8px 16px 8px 12px;
  border-radius: var(--radius-pill);
  transition: background-color var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard);
  white-space: nowrap;
  min-height: 38px;
  box-shadow: var(--shadow-sm);
}

.home-brand:hover {
  background: var(--primary-tint);
  transform: translateX(-2px);
}

/* ---- Search card ------------------------------------------ */
.search-form-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.search-card {
  background: var(--surface);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 6px;
  transition: box-shadow var(--dur-med) var(--ease-standard),
              border-color var(--dur-med) var(--ease-standard),
              transform var(--dur-med) var(--ease-standard);
}

.search-card:focus-within {
  box-shadow: var(--shadow-lg), var(--ring-primary);
  border-color: var(--accent);
}

.search-sticky.active .search-card {
  padding: 5px;
  border-radius: var(--radius-xl);
}

.search-dual {
  display: flex;
  align-items: stretch;
  background: transparent;
  overflow: visible;
  border-radius: var(--radius-xl);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  padding: 12px 18px;
  min-width: 0;
  min-height: 64px;
  border-radius: var(--radius-xl);
}

.search-sticky.active .search-field {
  min-height: 52px;
  padding: 8px 16px;
}

.search-divider {
  width: 1px;
  background: var(--border-strong);
  margin: 14px 0;
  flex-shrink: 0;
}

.search-field-icon {
  flex-shrink: 0;
  margin-right: 14px;
  width: 22px;
  height: 22px;
}

.search-field-icon--what,
.search-field-icon--where { color: var(--text-muted); }

.search-field:focus-within .search-field-icon { color: var(--primary); }

.search-field-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.search-field-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--fw-semi);
  color: var(--text-dim);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
  margin-bottom: 4px;
}

.search-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--t-body-lg);
  font-weight: var(--fw-semi);
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  color: var(--text);
  min-width: 0;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: var(--fw-regular);
  opacity: 1;
}

.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---- Geo button (icon-only) ----------------------------- */
.geo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-dim);
  border: none;
  flex-shrink: 0;
  margin-left: 8px;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard);
}

.geo-btn-label { display: none; }

.geo-btn:hover {
  background: var(--primary-tint);
  color: var(--primary);
}

.geo-btn.loading svg { animation: spin 1s linear infinite; }

/* ---- Combobox dropdown ----------------------------------- */
.combobox-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 8px;
  margin: 0;
  max-height: 360px;
  overflow-y: auto;
  z-index: 200;
  animation: fadeUp 220ms var(--ease-entrance);
}

.combobox-dropdown[hidden] { display: none; }

.combobox-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  gap: 10px;
  min-height: 46px;
  transition: background-color var(--dur-fast) var(--ease-standard);
}

.combobox-option:hover,
.combobox-option--active { background: var(--primary-tint); }

.combobox-option-label {
  font-family: var(--font-body);
  font-size: var(--t-body-lg);
  font-weight: var(--fw-medium);
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.combobox-option-meta {
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  color: var(--text-muted);
  flex-shrink: 0;
}

.combobox-option-type {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.combobox-option-type--profession {
  color: var(--accent-plum);
  background: var(--accent-plum-tint);
}

.combobox-option-type--service {
  color: var(--primary);
  background: var(--primary-tint);
}

.combobox-empty-hint {
  padding: 16px;
  font-family: var(--font-body);
  font-size: var(--t-meta);
  color: var(--text-muted);
}

/* ---- Field clear button ---------------------------------- */
.field-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard);
}

.field-clear:hover { background: var(--surface-3); color: var(--text); }
.field-clear.hidden { display: none; }

.search-field--where .field-clear { right: 58px; }

/* Safety net: never show the clear affordance when the input is empty,
   even if JS hasn't yet re-synced state after a programmatic value set. */
.search-field:has(.search-input:placeholder-shown) .field-clear {
  display: none;
}

/* ---- Primary search button ------------------------------- */
.search-btn {
  position: relative;
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.005em;
  padding: 0 28px;
  background: var(--cta);
  color: var(--cta-ink);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px -2px rgba(255, 122, 89, 0.35);
  transition: background-color var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
}

.search-btn:hover:not(:disabled) {
  background: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -4px rgba(255, 122, 89, 0.5);
}

.search-btn:active:not(:disabled) {
  transform: translateY(0);
}

.search-btn:disabled {
  background: var(--surface-3);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

/* ---- Search hint microcopy ------------------------------ */
.search-hint {
  font-family: var(--font-body);
  font-size: var(--t-micro);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  text-align: center;
  margin-top: 6px;
  letter-spacing: 0.01em;
}

.search-sticky.active .search-hint { display: none; }

/* ---- Toolbar status pill --------------------------------- */
.toolbar {
  max-width: 920px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-6) 0;
  display: flex;
  justify-content: center;
}

.toolbar.hidden { display: none; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: var(--fw-medium);
  text-align: center;
  line-height: 1.4;
  flex-wrap: wrap;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.status-pill strong {
  color: var(--text);
  font-weight: var(--fw-bold);
}

.status-pill mark {
  background: var(--primary-tint);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semi);
}

[data-theme="dark"] .status-pill mark { color: var(--text); }

.status-pill--warn {
  background: var(--warn-tint);
  border-color: transparent;
  color: var(--text);
}

.status-pill-clear {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: var(--t-micro);
  font-weight: var(--fw-bold);
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background-color var(--dur-fast) var(--ease-standard);
}

.status-pill-clear:hover { background: var(--primary-hover); }

/* ---- Results area --------------------------------------- */
.results-area {
  max-width: 920px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-6) var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ============================================================
   RESULT CARD — slim teaser
   Shows only: name, location, primary service tag, Call + View
   ============================================================ */
.provider-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5) var(--space-6);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "head"
    "tag";
  row-gap: 14px;
  align-items: center;
  overflow: hidden;
  animation: fadeUp var(--dur-slow) var(--ease-entrance) backwards;
  animation-delay: var(--delay, 0s);
  transition: box-shadow var(--dur-med) var(--ease-standard),
              transform var(--dur-med) var(--ease-standard),
              border-color var(--dur-med) var(--ease-standard);
}

.provider-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-tint);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .provider-card:hover { transform: none; }
}

.card-head {
  grid-area: head;
  min-width: 0;
}

.provider-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: var(--fw-semi);
  font-variation-settings: "SOFT" 50, "opsz" 120;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 6px;
  transition: color var(--dur-fast) var(--ease-standard);
}

a.provider-name:hover {
  color: var(--primary);
}

/* Stretched-link pattern: the provider-name anchor's ::after covers the
   entire card, making the whole surface a tap target to the detail page. */
a.provider-name::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.provider-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-family: var(--font-body);
  font-size: var(--t-meta);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}

.provider-meta-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-dim);
  font-weight: var(--fw-semi);
}

.provider-meta-location svg {
  color: var(--accent);
  flex-shrink: 0;
}

.provider-meta-sep {
  color: var(--border-strong);
  font-weight: var(--fw-regular);
}

.card-tag {
  grid-area: tag;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.service-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 12px 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary-tint);
  color: var(--primary-ink);
  font-family: var(--font-body);
  font-size: var(--t-micro);
  font-weight: var(--fw-bold);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

[data-theme="dark"] .service-tag { color: var(--text); }

.service-tag-more {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--fw-semi);
  color: var(--text-muted);
  white-space: nowrap;
}

/* Result-card responsive (mobile-first refinements) */
@media (max-width: 640px) {
  .provider-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "tag";
    padding: var(--space-4) var(--space-5);
    row-gap: 10px;
  }
  .provider-name { font-size: 19px; }
}

/* ============================================================
   PROVIDER DETAIL PAGE — full profile view
   ============================================================ */

.provider-page .provider-card {
  display: block;
  grid-template-columns: none;
  grid-template-areas: none;
  padding: var(--space-9) var(--space-8);
  animation: none;
  transform: none;
  transition: none;
}

.provider-page .provider-card::after { display: none; }

.provider-page .provider-card:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

/* Two-column layout on desktop — profile on the left, locations on the right.
   Collapses to single column below 880px. */
@media (min-width: 880px) {
  .provider-page .provider-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    column-gap: var(--space-9);
    row-gap: 0;
    align-items: start;
  }
  .provider-page .provider-card > .provider-main { min-width: 0; }
  .provider-page .provider-card > .outlets-section {
    margin-top: 0;
    position: sticky;
    top: var(--space-6);
  }
}

.card-header {
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.provider-page h1.provider-name {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: var(--fw-semi);
  font-variation-settings: "SOFT" 40, "opsz" 120;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
}

.provider-page .provider-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-family: var(--font-body);
  font-size: var(--t-meta);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
  margin-top: var(--space-2);
}

.provider-meta-abn {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.02em;
  color: var(--text-muted);
  font-feature-settings: "tnum" 1;
}

.provider-meta-sep { color: var(--border-strong); }

/* ---- Detail action bar ---------------------------------- */
/* Single brand-primary CTA, two flat outlines. Orange is reserved for the
   site-wide CTA system (search, top-of-funnel); on a detail page the primary
   action reads as "contact this provider", which is quieter and more trusted
   in a directory context. */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-7);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: var(--fw-semi);
  text-decoration: none;
  cursor: pointer;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
}

.action-btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 42, 60, 0.12);
}

.action-btn--primary:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -4px rgba(11, 42, 60, 0.28);
}

[data-theme="dark"] .action-btn--primary {
  color: var(--primary-ink);
}

[data-theme="dark"] .action-btn--primary:hover {
  color: var(--primary-ink);
}

.action-btn--outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.action-btn--outline:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

[data-theme="dark"] .action-btn--outline { background: transparent; }
[data-theme="dark"] .action-btn--outline:hover { background: var(--surface-2); }

.action-btn svg { opacity: 0.75; }

/* ---- Detail sections ------------------------------------ */
.card-section {
  margin-top: var(--space-6);
}

.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: var(--fw-bold);
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

/* Larger, non-uppercase heading for the locations column — signals a major
   content block rather than a chip-group label. Uses the display serif so it
   ties back to the page title. */
.section-heading {
  font-family: var(--font-display);
  font-size: var(--t-display-md);
  font-weight: var(--fw-semi);
  font-variation-settings: "SOFT" 40, "opsz" 120;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 var(--space-4);
  line-height: 1.15;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.service-pill[hidden],
.profession-pill[hidden] { display: none; }

/* Taxonomy pills — non-match is a quiet outlined chip so matched pills (below)
   read clearly as the differentiated state. Services and professions share
   one visual style; the group is identified by its label above. */
.service-pill,
.profession-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: var(--fw-medium);
  letter-spacing: -0.005em;
  line-height: 1.3;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: background-color var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard);
}

[data-theme="dark"] .service-pill,
[data-theme="dark"] .profession-pill {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}

/* Match highlight — filled tint, primary accent border, leading check glyph.
   The check + fill + border shift together make matches unambiguous at a
   glance, even when colour contrast is reduced or monochrome. */
.service-pill--match,
.profession-pill--match {
  background: var(--primary-tint);
  color: var(--primary-ink);
  border-color: var(--primary);
  font-weight: var(--fw-semi);
}

.service-pill--match::before,
.profession-pill--match::before {
  content: "";
  width: 12px;
  height: 12px;
  margin-right: 6px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l5 5L20 7'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l5 5L20 7'/></svg>") center / contain no-repeat;
}

[data-theme="dark"] .service-pill--match,
[data-theme="dark"] .profession-pill--match {
  background: var(--primary-tint);
  color: var(--primary);
  border-color: var(--primary);
}

/* "Show N more" — demoted from a dashed-border pill to an inline text link.
   Prevents the row from reading as another chip and removes the "disabled"
   appearance the dashed border suggested. */
.pill-more-btn {
  flex: 0 0 100%;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: var(--fw-semi);
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  letter-spacing: -0.005em;
  line-height: 1.3;
  transition: color var(--dur-fast) var(--ease-standard);
}

.pill-more-btn:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.outlet-more-btn {
  align-self: flex-start;
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: var(--fw-semi);
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-3) 0 0;
  letter-spacing: -0.005em;
  transition: color var(--dur-fast) var(--ease-standard);
}

.outlet-more-btn:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Detail outlets list -------------------------------- */
.outlets-section {
  margin-top: var(--space-8);
}

.outlet-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Outlet items — a divider list, not nested cards. Each entry is separated
   by a hairline, so the "locations" column reads as a clean directory stack
   rather than a pile of tinted panels. */
.outlet-item {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border);
  position: relative;
  transition: box-shadow var(--dur-med) var(--ease-standard);
}

/* Active outlet — the pin it owns is the one currently showing on the map.
   Ink wash bleeds in from the left (paper-soaked highlighter feel) with a
   2px accent bar. The wash fades out by the 70% mark so the right side of
   the card stays clean and the hours chart keeps its legibility. */
.outlet-item--on-map {
  background: linear-gradient(90deg, var(--primary-tint) 0%, transparent 70%);
  box-shadow: inset 2px 0 0 var(--primary);
}

/* Featured + active share the left edge: featured already carries a 3px
   primary border, so the inset accent would double-stack. Drop it and let
   the wash sit on top of the existing bar. */
.outlet-item--featured.outlet-item--on-map {
  box-shadow: none;
}

.outlet-item:first-child { padding-top: 0; border-top: none; }

/* Featured outlet — left-edge accent + caption, instead of a tinted card.
   Communicates "this one matches your search" without adding a nested panel
   that doubles the page's visual chrome. */
.outlet-item--featured {
  padding-left: var(--space-4);
  border-left: 3px solid var(--primary);
  background: transparent;
  border-radius: 0;
  margin-bottom: 0;
}

[data-theme="dark"] .outlet-item--featured {
  background: transparent;
  border-left-color: var(--primary);
}

.outlet-featured-tag {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: transparent;
  padding: 0;
  border-radius: 0;
  margin-bottom: var(--space-2);
}

/* Overview map — one per provider, sits above the outlet list rather than
   nested inside the first outlet item. For multi-outlet providers the map
   carries all pins (featured highlighted, rest as small circles). */
.outlet-map {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-sm);
  margin: 0 0 var(--space-5);
  background: var(--surface-2);
  overflow: hidden;
  z-index: 0;
}

.outlet-map:empty::before {
  content: 'Map loading…';
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-family: var(--font-body);
  font-size: var(--t-meta);
  color: var(--text-muted);
}

.outlet-name {
  font-family: var(--font-body);
  font-size: var(--t-body-lg);
  font-weight: var(--fw-semi);
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.outlet-address {
  font-size: var(--t-meta);
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 6px;
}

.outlet-phone {
  margin: 6px 0 4px;
}

.outlet-phone a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-standard);
}

.outlet-phone a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.outlet-phone svg { flex-shrink: 0; opacity: 0.6; }

/* Row of outlet-level links/buttons (Directions, Show on map). Flex-wrap so
   mobile can drop the second item onto its own line without overflowing. */
.outlet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-top: 4px;
}

.show-on-map-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--primary);
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: var(--fw-semi);
  letter-spacing: -0.005em;
  transition: color var(--dur-fast) var(--ease-standard);
}

.show-on-map-btn:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Two-state label: pristine CTA swaps to a live "On the map" indicator
   while this outlet owns the map pin. Kept as two sibling spans so the
   button reflects state from markup alone — no textContent writes, no
   FOUC between SSR and hydrate. */
.show-on-map-btn__off { display: inline; }
.show-on-map-btn__on  { display: none; align-items: center; gap: 7px; }

.show-on-map-btn[data-on-map] {
  cursor: default;
  color: var(--primary);
}
.show-on-map-btn[data-on-map]:hover {
  color: var(--primary);
  text-decoration: none;
}
.show-on-map-btn[data-on-map] .show-on-map-btn__off { display: none; }
.show-on-map-btn[data-on-map] .show-on-map-btn__on  { display: inline-flex; }

/* Cartographer's dot — solid core + expanding halo echoes the pin being
   dropped on the map. Paired with the outlet-item wash, the two halves
   of the UI read as one continuous marker. */
.show-on-map-btn__pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.show-on-map-btn__pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.5;
  animation: sf-pin-pulse 1.9s var(--ease-standard) infinite;
}
@keyframes sf-pin-pulse {
  0%   { transform: scale(1);   opacity: 0.5; }
  70%  { transform: scale(2.6); opacity: 0;   }
  100% { transform: scale(2.6); opacity: 0;   }
}
@media (prefers-reduced-motion: reduce) {
  .show-on-map-btn__pulse::after { animation: none; opacity: 0; }
}

.outlet-hours {
  margin-top: 8px;
}

/* Per-day open/closed strip — one badge per weekday with a filled tick
   (open) or cross (closed) pip. Hover or focus reveals that day's actual
   hours. Each cell is a <button> so mobile tap fires :focus — no JS. */
.hours-block {
  margin-top: 4px;
}

.hours-heading {
  font-size: var(--t-meta);
  font-weight: var(--fw-semi);
  color: var(--text-dim);
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.hours-week {
  display: flex;
  gap: 6px;
}

.hours-day-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  font-size: 11px;
  font-weight: var(--fw-semi);
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
}

.hours-day-cell:focus { outline: none; }
.hours-day-cell:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.hours-day-label {
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hours-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.hours-icon--open   { color: var(--primary); }
.hours-icon--closed { color: var(--border); }

.hours-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  font-weight: var(--fw-semi);
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms var(--ease-standard);
  z-index: 5;
}

.hours-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--text);
}

.hours-day-cell:hover .hours-tooltip,
.hours-day-cell:focus .hours-tooltip {
  opacity: 1;
}

.directions-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  text-decoration: none;
  font-weight: var(--fw-semi);
  font-size: var(--t-meta);
  white-space: nowrap;
}

.directions-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Map view-mode control — "Show all N locations" toggle that appears beneath
   the map whenever the map is focused on a single pin while other pins exist.
   Right-aligned so it reads as a control affordance rather than a heading. */
.outlet-map-controls {
  display: flex;
  justify-content: flex-end;
  margin: calc(-1 * var(--space-4)) 0 var(--space-4);
}

.show-all-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--primary);
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: var(--fw-semi);
  letter-spacing: -0.005em;
  transition: background-color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard);
}

.show-all-btn:hover {
  background: var(--primary-tint);
  border-color: var(--primary);
}

[data-theme="dark"] .show-all-btn { background: transparent; }
[data-theme="dark"] .show-all-btn:hover { background: var(--surface-2); }

/* Outlet filter — surfaced only for providers with >5 locations. Client-side
   filter over the already-rendered list; not a search box (no network). */
.outlet-filter-wrap {
  margin: 0 0 var(--space-4);
}

.outlet-filter {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-meta);
  transition: border-color var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
}

.outlet-filter::placeholder { color: var(--text-muted); }

.outlet-filter:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}

.outlet-filter-count {
  display: block;
  font-family: var(--font-body);
  font-size: var(--t-micro);
  color: var(--text-muted);
  margin-top: 6px;
}

/* Soften Leaflet's attribution chip — cyan links on dark themed tiles were
   pulling focus away from the data. */
.outlet-map .leaflet-control-attribution {
  font-size: 10px;
  opacity: 0.7;
}
.outlet-map .leaflet-control-attribution a { color: var(--text-dim); }

@media (max-width: 879px) {
  .provider-page .provider-card { padding: var(--space-7) var(--space-6); }
  .outlets-section { margin-top: var(--space-7); }
}

@media (max-width: 640px) {
  .provider-page .provider-card {
    padding: var(--space-6) var(--space-5);
  }
  .provider-page h1.provider-name { font-size: clamp(26px, 7vw, 32px); }
  .card-header { margin-bottom: var(--space-5); }
  .action-bar { margin-bottom: var(--space-6); }
  /* Mobile action bar — Call claims its own row as the primary action;
     outlines split the second row evenly (50/50 for 2, 33/33/33 for 3).
     Previously every button had flex: 1 1 calc(50%-4px), which pushed the
     third chip onto its own row and made Website look like the hero CTA. */
  .action-bar { gap: 8px; }
  .action-btn--primary {
    flex: 1 1 100%;
    padding: 0 18px;
    font-size: var(--t-body);
  }
  .action-btn--outline {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 10px;
    font-size: var(--t-meta);
  }
  .outlet-item { padding: var(--space-4) 0; }
  /* Drop the left-edge accent on narrow viewports — the "Closest to your search"
     tag carries the differentiation, and removing the indent keeps the featured
     content flush with the section heading above it. */
  .outlet-item--featured {
    padding-left: 0;
    border-left: none;
  }
  /* Mobile drops featured's left-border, so a featured+active outlet would
     lose its edge accent entirely. Put the inset bar back so the active
     signal survives. */
  .outlet-item--featured.outlet-item--on-map {
    box-shadow: inset 2px 0 0 var(--primary);
  }
}

/* Ultra-narrow (small phones) — drops padding further and strips icons from
   the outline actions so Email/Website/Directions stay legibly three-up. */
@media (max-width: 420px) {
  .provider-page .provider-card {
    padding: var(--space-5) var(--space-4);
    border-radius: var(--radius-lg);
  }
  .provider-page h1.provider-name { font-size: 24px; letter-spacing: -0.02em; }
  .action-btn { min-height: 42px; }
  .action-btn--outline {
    padding: 0 8px;
    gap: 4px;
    font-size: var(--t-micro);
    letter-spacing: 0;
  }
  .action-btn--outline svg { display: none; }
  .section-label { margin-bottom: var(--space-2); }
  .section-heading { font-size: 20px; }
}

/* ---- Skeleton cards -------------------------------------
   Mirrors .provider-card so the skeleton→results swap doesn't jump.
*/
.skeleton-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5) var(--space-6);
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 14px;
  align-items: center;
  overflow: hidden;
}

.skeleton-block {
  background: linear-gradient(
    90deg,
    var(--surface-2) 0%,
    var(--surface-3) 50%,
    var(--surface-2) 100%
  );
  background-size: 600px 100%;
  animation: shimmer 2.4s ease-in-out infinite;
  animation-delay: var(--skeleton-delay, 0s);
  border-radius: 10px;
}

.skeleton-head { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.skeleton-title { height: 24px; max-width: 520px; }
.skeleton-meta  { height: 14px; max-width: 320px; }
.skeleton-tag   { height: 26px; width: 160px; border-radius: var(--radius-pill); }

/* ---- Pagination ------------------------------------------ */
.pagination {
  max-width: 920px;
  margin: var(--space-7) auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: 0 var(--space-6);
}

.pagination-label {
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: var(--fw-medium);
  color: var(--text-dim);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-3);
}

.pagination-label strong {
  color: var(--text);
  font-weight: var(--fw-bold);
}

.page-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard);
}

.page-nav-btn:hover:not(:disabled) {
  background: var(--primary-tint);
  color: var(--primary);
  border-color: var(--primary-tint);
}

.page-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Floating stack (theme + back-to-top) ----------------- */
.floating-stack {
  position: fixed;
  bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0));
  right: calc(var(--space-6) + env(safe-area-inset-right, 0));
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-end;
  z-index: 90;
}

.fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard),
              opacity var(--dur-med) var(--ease-standard);
}

.fab:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.fab.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.theme-hint {
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: var(--t-micro);
  font-weight: var(--fw-semi);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity var(--dur-med) var(--ease-standard),
              transform var(--dur-med) var(--ease-standard);
  order: -1;
}

.theme-hint.show {
  opacity: 1;
  transform: translateX(0);
}

.theme-hint.hidden { display: none; }

/* ---- Toast ---------------------------------------------- */
.toast {
  position: fixed;
  bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0));
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: var(--fw-semi);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity var(--dur-med) var(--ease-standard),
              transform var(--dur-med) var(--ease-standard);
  max-width: calc(100vw - 32px);
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 640px) {
  .toast { left: auto; right: calc(var(--space-6) + 68px); transform: translateY(14px); }
  .toast.show { transform: translateY(0); }
}

/* ---- State messages ------------------------------------- */
.state-message {
  max-width: 640px;
  margin: var(--space-8) auto;
  text-align: center;
  padding: var(--space-9) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
}

.state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-tint);
  color: var(--primary);
}

.state-icon--warn {
  background: var(--warn-tint);
  color: var(--warn);
}

.state-icon svg { width: 36px; height: 36px; }

.state-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--fw-semi);
  font-variation-settings: "SOFT" 60, "opsz" 120;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.state-sub {
  font-size: var(--t-body-lg);
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: var(--space-6);
}

.state-actions {
  display: inline-flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}

.state-btn {
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: var(--fw-bold);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard);
}

.state-btn--primary {
  background: var(--cta);
  color: var(--cta-ink);
  box-shadow: 0 8px 18px -6px rgba(255, 122, 89, 0.45);
}
.state-btn--primary:hover { background: var(--cta-hover); transform: translateY(-1px); }

.state-btn--secondary {
  background: var(--primary-tint);
  color: var(--primary);
}
.state-btn--secondary:hover { background: var(--surface-3); }

/* ---- Responsive ----------------------------------------- */
@media (min-width: 768px) {
  .search-form-wrap {
    flex-direction: row;
    align-items: stretch;
    gap: var(--space-3);
  }
  .search-card { flex: 1; }
  .search-btn {
    width: auto;
    flex-shrink: 0;
    padding: 0 28px;
    align-self: stretch;
    min-height: 0;
  }
  .search-btn-label { display: inline; }
}

@media (max-width: 640px) {
  .hero {
    padding: var(--space-6) var(--space-4) var(--space-5);
  }

  .hero-title { margin-bottom: var(--space-3); }
  .hero-sub   { font-size: var(--t-body); }

  .search-hints {
    padding: 0 var(--space-4);
    margin-bottom: var(--space-4);
    gap: 6px;
  }
  .search-inner { padding: 0 var(--space-4); }

  .search-dual { flex-direction: column; }

  .search-divider {
    width: auto;
    height: 1px;
    margin: 0 var(--space-4);
  }

  .search-field { padding: 14px var(--space-4); }

  .toolbar { padding: var(--space-3) var(--space-4) 0; }

  .status-pill {
    padding: 10px 14px;
    gap: 6px;
    font-size: var(--t-meta);
  }
  .status-pill mark { padding: 2px 9px; }
  .status-pill-clear { padding: 5px 12px; }

  .results-area {
    padding: var(--space-3) var(--space-4) var(--space-10);
    gap: var(--space-3);
  }

  .floating-stack {
    bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0));
    right: calc(var(--space-4) + env(safe-area-inset-right, 0));
  }

  .state-message {
    padding: var(--space-7) var(--space-4);
    border-radius: var(--radius-xl);
  }
}
