/* Directory pages — ported from mockups/directory.html (nav/footer come from site.css). */

/* HERO */
.dir-hero { padding: 3rem 1.5rem 2rem; text-align: center; }
/* Return to results pill: sits above the breadcrumbs on the category and seed pages. */
.dir-hero .dir-back {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-bottom: 0.9rem; padding: 0.5rem 1rem 0.5rem 0.75rem;
  border: 1px solid #ddd; border-radius: 9999px; background: #fff;
  font-size: 0.8rem; font-weight: 600; color: #444; text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.dir-hero .dir-back:hover { background: #f4f3ee; border-color: #bbb; color: var(--brand-primary, #2a2a2a); }
.seed-lightbox-dialog .dir-back { display: none; }
.dir-hero .breadcrumb { font-size: 0.8rem; color: #888; margin-bottom: 1rem; }
.dir-hero .breadcrumb a { color: #666; text-decoration: none; }
.dir-hero .breadcrumb a:hover { color: var(--brand-primary, #2a2a2a); text-decoration: underline; }
.dir-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700; color: var(--brand-primary, #2a2a2a);
  margin-bottom: 0.75rem;
}
.dir-hero p { color: #6b6b6b; font-size: 1rem; max-width: 36rem; margin: 0 auto; line-height: 1.7; }
.result-count {
  display: inline-block; margin-top: 1.5rem;
  padding: 0.4rem 1rem; border-radius: 9999px;
  background: rgba(42,42,42,0.08);
  font-size: 0.75rem; font-weight: 700; color: #555;
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* FILTERS */
.filters {
  max-width: 80rem; margin: 0 auto; padding: 0 1.5rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem;
}
.filter-btn {
  padding: 0.5rem 1rem; border-radius: 9999px;
  border: 1px solid #ddd; background: #fff;
  font-size: 0.8rem; font-weight: 600; color: #555;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 0.35rem;
}
.filter-btn:hover { border-color: #aaa; }
.filter-btn.active {
  background: var(--brand-primary, #2a2a2a); color: #fff; border-color: var(--brand-primary, #2a2a2a);
}

/* LISTINGS */
.listings { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem 4rem; }
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.listing-card {
  border-radius: 1.25rem;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3);
  overflow: hidden;
  transition: all 0.3s;
  text-decoration: none; color: inherit;
  display: block;
}
.listing-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }
.listing-card.hidden-by-filter { display: none; }
.listing-img { height: 180px; background: #e0e0e0; overflow: hidden; position: relative; }
.listing-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-img .img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
  color: rgba(255,255,255,0.6);
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 2rem;
}
.listing-body { padding: 1.25rem; }
.listing-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 0.5rem;
}
.listing-name { font-weight: 700; font-size: 1.1rem; color: #1a1a1a; }
.listing-rating {
  display: flex; align-items: center; gap: 0.25rem;
  font-size: 0.8rem; font-weight: 700; color: #1a1a1a;
  background: rgba(245,158,11,0.1);
  padding: 0.2rem 0.5rem; border-radius: 0.5rem;
}
.listing-rating svg { color: #f59e0b; }
.listing-category { font-size: 0.8rem; color: #888; margin-bottom: 0.75rem; }
.listing-social { display: flex; align-items: center; gap: 0.45rem; color: #bbb; margin-bottom: 0.75rem; }
.listing-services { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.listing-tag {
  padding: 0.2rem 0.6rem; border-radius: 9999px;
  background: rgba(42,42,42,0.06);
  font-size: 0.7rem; font-weight: 600; color: #666;
}
.listing-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 0.75rem; border-top: 1px solid #f0f0f0;
  font-size: 0.8rem; color: #888;
}
.listing-footer .price { font-weight: 700; color: var(--brand-primary, #2a2a2a); }

/* PRIORITY BADGE */
/* Premier placement (2026-09-11): gold mark on the card image and an inline pill beside a name. */
.premier-badge {
  position: absolute; top: 0.75rem; left: 0.75rem; z-index: 1;
  padding: 0.25rem 0.6rem; border-radius: 9999px;
  background: #f5b301; color: #2a2a2a;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.premier-pill {
  display: inline-block; vertical-align: middle;
  padding: 0.15rem 0.5rem; border-radius: 9999px;
  background: #f5b301; color: #2a2a2a;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
.priority-badge {
  position: absolute; top: 0.75rem; left: 0.75rem;
  padding: 0.25rem 0.6rem; border-radius: 9999px;
  background: var(--brand-primary, #2a2a2a); color: #fff;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* SEO CONTENT */
.seo-content {
  max-width: 80rem; margin: 0 auto; padding: 3rem 1.5rem 4rem;
  border-top: 1px solid #e2e8f0;
}
.seo-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem;
}
.seo-content p {
  color: #6b6b6b; font-size: 0.9rem; line-height: 1.8; margin-bottom: 1rem;
  max-width: 48rem;
}
.seo-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.seo-links a {
  padding: 0.35rem 0.75rem; border-radius: 9999px;
  border: 1px solid #ddd; background: #fff;
  font-size: 0.75rem; color: #555; text-decoration: none;
  transition: all 0.2s;
}
.seo-links a:hover { border-color: var(--brand-primary, #2a2a2a); color: var(--brand-primary, #2a2a2a); }

/* DIRECTORY INDEX (browse page) */
.dir-index { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem 4rem; }
.dir-index h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem; font-weight: 700; margin: 2rem 0 1rem;
}
.dir-index .empty { color: #888; text-align: center; padding: 3rem 0; }

/* LIVE SEARCH (Wave G2): the box above the chips and the rows it renders. */
.dir-search { max-width: 34rem; margin: 0 auto 1.25rem; padding: 0 1.5rem; }
.dir-search input[type="search"] {
  width: 100%; box-sizing: border-box;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid #e2e2de; border-radius: 9999px;
  font-family: inherit; font-size: 0.95rem;
  background: #fff; color: #2a2a2a;
}
.dir-search input[type="search"]:focus { outline: none; border-color: var(--brand-primary, #2a2a2a); }

.dir-results { max-width: 46rem; margin: 0 auto; padding: 0 1.5rem 3rem; }
.dsr-row {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.7rem 0.9rem; margin-bottom: 0.5rem;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.5); border-radius: 0.9rem;
  text-decoration: none; color: inherit;
}
.dsr-row:hover { border-color: rgba(42,42,42,0.14); box-shadow: 0 6px 18px rgba(0,0,0,0.05); }
.dsr-thumb {
  flex: 0 0 40px; width: 40px; height: 40px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.6rem; background: #ececea;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.8rem; color: #7a7a7a;
}
.dsr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dsr-body { flex: 1 1 auto; min-width: 0; }
.dsr-name { display: block; font-weight: 600; font-size: 0.95rem; color: #2a2a2a; }
.dsr-meta { display: block; font-size: 0.8rem; color: #7a7a7a; }
/*
 * The badge is positioned ABSOLUTELY on a listing card (claim.css .seed-badge, which puts it in
 * the corner of the card image). Inside a flat search row it is just a chip.
 *
 * The two-class selector is load-bearing, not style: DirectoryController::index loads
 * directory.css THEN claim.css, so a single .dsr-badge would tie on specificity with
 * .seed-badge and lose on source order, and every Unclaimed badge would position itself against
 * the page instead of its row (they stack in the top-left corner and overlap the results).
 * Scoping to .dir-results as well keeps this rule off the cards entirely.
 */
.dir-results .dsr-badge.seed-badge {
  position: static; flex: 0 0 auto;
  top: auto; left: auto;
}
.dsr-rating { flex: 0 0 auto; font-size: 0.8rem; color: #6b6b6b; white-space: nowrap; }
.dsr-empty { color: #888; text-align: center; padding: 2rem 0; }

@media (max-width: 768px) {
  .dir-search { padding: 0 16px; max-width: none; }
  .dir-search input[type="search"] { min-height: 48px; font-size: 16px; }
  .dir-results { padding: 0 16px 2rem; }
  .dsr-row { flex-wrap: wrap; }
  .dsr-rating { width: 100%; }
}

@media (max-width: 768px) {
  body { overflow-x: hidden; }

  /* SEARCH — sticky under nav (only present on directory.php if the view adds it;
     harmless if unused) */
  .search-bar {
    position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 100;
    padding: 12px 16px;
    background: var(--brand-cream, #f8f7f2);
  }
  .search-wrapper { position: relative; }
  .search-wrapper svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #999; }
  .search-input {
    width: 100%; padding: 14px 14px 14px 42px;
    min-height: 48px; font-size: 16px;
  }

  /* BREADCRUMBS — horizontal scroll */
  .dir-hero { padding: 1.5rem 16px 1rem; text-align: left; }
  .dir-hero .dir-back { min-height: 44px; padding: 0 1rem 0 0.75rem; font-size: 0.85rem; }
  /* The card thumbnail is small on mobile, so the corner badges shrink with it. */
  .premier-badge, .priority-badge { top: 0.35rem; left: 0.35rem; padding: 0.15rem 0.4rem; font-size: 0.55rem; letter-spacing: 0.05em; }
  .dir-hero .breadcrumb {
    white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    font-size: 12px; margin-bottom: 0.75rem;
  }
  .dir-hero .breadcrumb::-webkit-scrollbar { display: none; }
  .dir-hero h1 { font-size: 24px; line-height: 1.3; }
  .dir-hero p { font-size: 0.9rem; }

  /* FILTER PILLS — horizontal scroll row */
  .filters {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 8px 16px 16px; gap: 8px; margin: 0; scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn {
    flex-shrink: 0; padding: 10px 18px; min-height: 44px;
    border-radius: 9999px; font-size: 13px;
  }

  /* LISTING CARDS — stack, horizontal thumb layout */
  .listings { padding: 0 0 3rem; }
  .listing-grid { grid-template-columns: 1fr; gap: 0; }
  .listing-card {
    display: flex; gap: 14px;
    border-radius: 1rem; margin: 0 16px 12px; padding: 14px;
  }
  .listing-img {
    width: 80px; height: 80px; flex-shrink: 0;
    border-radius: 0.75rem;
  }
  .listing-body { padding: 0; flex: 1; min-width: 0; }
  .listing-name { font-size: 15px; }
  .listing-category { font-size: 12px; margin-bottom: 6px; }
  .listing-social { gap: 0.4rem; margin-bottom: 6px; }
  .listing-social svg { width: 12px; height: 12px; }
  .listing-services { margin-bottom: 6px; }
  .listing-tag { font-size: 11px; }
  .listing-footer {
    border-top: none; padding-top: 0;
    font-size: 13px;
  }

  /* SEO CONTENT + NEARBY CITIES */
  .seo-content { padding: 1.5rem 16px 2rem; }
  .seo-links {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; gap: 8px;
  }
  .seo-links::-webkit-scrollbar { display: none; }
  .seo-links a {
    flex-shrink: 0; min-height: 44px; display: flex; align-items: center;
    padding: 10px 18px; border-radius: 9999px; font-size: 13px;
  }

  .dir-index { padding: 0 16px 2rem; }
}

/* Logo fallback in listing cards (no gallery photo yet) */
.img-placeholder-logo img {
  width: 72px; height: 72px; border-radius: 1rem; object-fit: cover;
  background: #fff; border: 1px solid #eee;
}

/* =====================================================================================
   DIRECTORY SEARCH V2 (mockups/directory-search-v2.html + mobile-directory-search-v2.html)
   One search box, one compact control under it, one panel behind the control, and below
   that either the browse index or a list of business cards. Class names match the mockups.
   ===================================================================================== */

/* the search box gains a clear button */
.dir-search { position: relative; }
.dir-search input[type="search"] { padding-right: 2.6rem; -webkit-appearance: none; appearance: none; }
.dir-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; right: 2.1rem; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 9999px;
  border: none; background: rgba(42,42,42,0.08); color: #555;
  font: inherit; font-size: 0.85rem; line-height: 1; cursor: pointer;
  display: none; align-items: center; justify-content: center;
}
.search-clear.on { display: flex; }

/* the one quiet line under the search box */
.dir-stat { max-width: 34rem; margin: 0 auto 1rem; padding: 0 1.5rem; text-align: center; }
.dir-status { max-width: 64rem; margin: 0 auto 1.4rem; padding: 0 1.5rem; text-align: center; }
.quiet-line { font-size: 0.78rem; color: #9a9a94; }
.list-count { text-align: center; font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 500; color: #7a7a73; margin: 0 0 0.25rem; text-transform: none; letter-spacing: 0; background: none; padding: 0; }
.filter-pill .fp-mi { color: #7a7a73; font-weight: 500; }
.result-head { font-family: 'Outfit', sans-serif; font-size: 1.15rem; font-weight: 700; color: #1f1f1f; margin: 0; }
.result-head .rh-count { font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 500; color: #9a9a94; }

/* ONE compact control: the whole selection in plain words */
/*
 * The control is a BUTTON, not a field. The search box above it is the only white input on the
 * page, so this one is a tinted pill that fits its own text: cream one step darker than the page,
 * a muted border, no icon, and the reading truncating rather than stretching. The left padding is
 * the text inset itself, since nothing leads the words any more.
 */
.filter-pill-wrap { max-width: 34rem; margin: 0 auto 0.55rem; padding: 0 1.5rem; display: flex; justify-content: center; }
.filter-pill {
  max-width: 100%; min-height: 42px; min-width: 0;
  display: inline-flex; align-items: center; padding: 0 0.45rem 0 0.9rem;
  border: 1px solid #ddd; border-radius: 9999px; background: #eceae2;
  font-family: 'Inter', system-ui, sans-serif; font-size: 0.95rem; font-weight: 500; color: #3d3d38;
  transition: background-color 0.15s, border-color 0.15s, transform 0.05s;
}
.filter-pill:hover { background: #e3e0d6; border-color: #c2c2b8; }
.filter-pill:focus-within { border-color: #8f8f86; box-shadow: 0 0 0 3px rgba(42,42,42,0.12); }
.filter-pill:active { transform: translateY(1px); }
.filter-pill.set { border-color: rgba(42,42,42,0.35); }
/* The reading itself. A button, so the whole pill opens the panel. */
.fp-main {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0; border: none; background: none;
  font: inherit; color: inherit; cursor: pointer;
}
.fp-main:focus { outline: none; }
/* The pin is the only glyph in the control (Brian, 2026-09-07: the sliders mark came off). */
.filter-pill .fp-pin { display: inline-flex; vertical-align: -3px; margin-right: 4px; color: #6f6f68; }
.filter-pill .fp-pin svg { width: 17px; height: 17px; }
.filter-pill .fp-label { flex: 1 1 auto; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* An unset half stays visible and goes quiet, so the control always reads as two dimensions. */
.filter-pill .fp-svc.off, .filter-pill .fp-place.off, .filter-pill .fp-sep { color: #a9a9a2; }
/* Quick clear, the same mark as the X on the search box, behind a thin divider. */
.filter-clear {
  flex: 0 0 auto; width: 24px; height: 24px; margin-left: 0.5rem; border-radius: 9999px;
  border: none; background: rgba(42,42,42,0.1); color: #555;
  font: inherit; font-size: 0.82rem; line-height: 1; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
}
/* The thin divider between the reading and the X. Only a set control has one. */
.filter-pill.set .fp-main { border-right: 1px solid #d5d3c8; padding-right: 0.55rem; }
.filter-clear:hover { background: rgba(42,42,42,0.2); color: #2a2a2a; }

/* THE PANEL: centered modal on desktop, bottom sheet at 768px and under */
body.lb-locked { position: fixed; left: 0; right: 0; overflow: hidden; width: 100%; }
.lb-backdrop { overscroll-behavior: contain; touch-action: none; }
.lb-backdrop .lb-panel { touch-action: pan-y; }
.lb-backdrop {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(20,20,18,0.45);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
}
.lb-panel {
  width: 27rem; max-width: 100%; max-height: 80vh;
  background: #fff; border-radius: 1.2rem;
  box-shadow: 0 30px 70px rgba(0,0,0,0.28);
  display: flex; flex-direction: column; overflow: hidden;
}
.lb-panel:focus { outline: none; }
.lb-handle { display: none; }
.lb-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.1rem 0.6rem; }
.lb-head h3 { font-family: 'Outfit', sans-serif; font-size: 1.05rem; font-weight: 700; margin: 0; }
.lb-x {
  border: none; background: rgba(42,42,42,0.06); color: #6b6b64;
  width: 28px; height: 28px; border-radius: 9999px; font: inherit; font-size: 1rem; line-height: 1; cursor: pointer;
}
.lb-tabs { display: flex; gap: 6px; padding: 0 1.1rem 0.7rem; }
.lb-tab {
  flex: 1 1 0; min-width: 0; text-align: left; cursor: pointer;
  border: 1px solid #e4e4de; background: #fbfbf9; border-radius: 0.7rem; padding: 0.5rem 0.65rem; font: inherit;
}
.lb-tab.on { background: #fff; border-color: var(--brand-primary, #2a2a2a); box-shadow: inset 0 0 0 1px var(--brand-primary, #2a2a2a); }
.lb-tab b {
  display: block; font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #9a9a94; font-weight: 700; margin-bottom: 1px;
}
.lb-tab span { display: block; font-size: 0.78rem; font-weight: 600; color: #3d3d38; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A tile holding a SET: the name truncates, the "+2" beside it never does. */
.lb-tab span.two { display: flex; align-items: baseline; gap: 3px; }
.lb-tab .tname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.lb-tab .tmore { flex: 0 0 auto; font-style: normal; color: #6f6f68; }
.lb-loc {
  display: flex; align-items: center; gap: 8px;
  margin: 0 1.1rem 0.8rem; padding: 0.5rem 0.9rem;
  border-radius: 9999px; font-size: 0.8rem;
}
.lb-loc svg { flex: 0 0 auto; color: #8a8a82; }
.lb-loc span { flex: 1 1 auto; min-width: 0; }
.lb-loc.act {
  width: calc(100% - 2.2rem); border: 1px dashed #d8d8d2; background: #fbfbf9;
  color: #3d3d38; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; text-align: left;
}
.lb-loc.act:hover { border-color: #b6b6ae; }
.lb-loc.on { background: rgba(42,42,42,0.05); color: #5f5f58; }
.lb-loc.muted { color: #9a9a94; }
.lb-loc-link {
  flex: 0 0 auto; border: none; background: none; font: inherit; font-size: 0.76rem;
  color: #2a2a2a; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 0 0 0 8px;
}
.lb-search { padding: 0 1.1rem 0.5rem; }
.lb-search input {
  width: 100%; box-sizing: border-box;
  padding: 0.55rem 0.8rem; border: 1px solid #e2e2de; border-radius: 0.6rem;
  font: inherit; font-size: 0.88rem; background: #fbfbf9;
}
.lb-search input:focus { outline: none; border-color: var(--brand-primary, #2a2a2a); }
.lb-list {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; max-height: 17rem; padding: 0 0.7rem 0.4rem;
  overscroll-behavior: contain;
}
.opt {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.55rem 0.7rem; border: none; background: none; border-radius: 0.6rem;
  font: inherit; font-size: 0.86rem; color: #3d3d38; text-align: left; cursor: pointer;
}
.opt:hover { background: rgba(42,42,42,0.05); }
.opt.on { background: rgba(42,42,42,0.9); color: #fff; }
.opt .cnt { flex: 0 0 auto; display: flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; color: #a5a5a0; font-weight: 600; }
.opt.on .cnt { color: rgba(255,255,255,0.6); }
/*
 * Categories are a SET (2026-09-07), so a Category row is a toggle: the tick beside the count
 * says it is on, the highlight is the same one every picked row has always had, and the
 * "All categories" row at the top empties the set.
 */
.opt .tick { display: inline-flex; align-items: center; color: #fff; }
.opt-all .cnt { color: #a5a5a0; }
.opt-all.on .cnt { color: rgba(255,255,255,0.85); }
.opt-empty { padding: 0.9rem 0.7rem; font-size: 0.84rem; color: #9a9a94; }
.lb-foot {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.7rem 1.1rem 1rem; border-top: 1px solid #f0f0ec;
}
.lb-clear {
  border: none; background: none; font: inherit; font-size: 0.82rem; color: #77776f;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 0;
}
.lb-done {
  border: none; border-radius: 9999px; background: var(--brand-primary, #2a2a2a); color: #fff;
  font: inherit; font-size: 0.84rem; font-weight: 700; padding: 0.55rem 1.5rem; cursor: pointer;
}

/* BROWSE INDEX */
.dir-index { max-width: 64rem; padding: 0 1.5rem 3rem; }
.state-block { margin-bottom: 2.4rem; }
.state-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.9rem; margin-bottom: 0.35rem; }
.state-head h2 {
  font-family: 'Outfit', sans-serif; font-size: 1.3rem; font-weight: 700;
  color: #1f1f1f; flex: 0 0 auto; margin: 0 0.2rem 0 0;
}
.state-cats { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cat-pill {
  padding: 0.35rem 0.85rem; border-radius: 9999px;
  border: 1px solid #ddd; background: #fff;
  font: inherit; font-size: 0.76rem; font-weight: 600; color: #555;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.cat-pill:hover { border-color: #aaa; }
.cat-pill .n { color: #a5a5a0; font-weight: 600; font-size: 0.72rem; }
.state-sub { font-size: 0.78rem; color: #9a9a94; margin-bottom: 0.9rem; }
.dir-index .seo-links {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.5rem; margin-top: 0;
}
.dir-index .seo-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.55rem 0.95rem; border-radius: 9999px;
  border: 1px solid #ddd; background: #fff;
  font-size: 0.78rem; color: #555; text-decoration: none; transition: all 0.18s;
}
.dir-index .seo-links a:hover { border-color: var(--brand-primary, #2a2a2a); color: var(--brand-primary, #2a2a2a); }
.dir-index .seo-links a .n { color: #a5a5a0; font-weight: 600; font-size: 0.72rem; flex: 0 0 auto; }
.browse-empty { color: #8a8a84; padding: 2.5rem 0; text-align: center; font-size: 0.9rem; }
/* Cities close to the selected town (2026-09-14): same chip as a page link, one row under the page. */
.near-cities { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem 3rem; }
.near-cities h3 { font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 600; color: #3a3a3a; margin: 0 0 0.7rem; }
.near-city-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.near-city-row a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.95rem; border-radius: 9999px; border: 1px solid #ddd; background: #fff;
  font-size: 0.78rem; color: #555; text-decoration: none; transition: all 0.18s;
}
.near-city-row a:hover { border-color: var(--brand-primary, #2a2a2a); color: var(--brand-primary, #2a2a2a); }
.near-city-row a .n { color: #a5a5a0; font-weight: 600; font-size: 0.72rem; }
@media (max-width: 768px) { .near-cities { padding: 0 16px 2rem; } }
.show-all, .show-states {
  display: block; margin: 0.7rem auto 0; min-height: 42px; padding: 0 1.6rem;
  border: 1px dashed #cfcfc9; border-radius: 9999px; background: transparent;
  font: inherit; font-size: 0.82rem; font-weight: 600; color: #6b6b64; cursor: pointer;
}
.show-all { margin-left: 0; }
.show-states { margin-top: 1rem; border-color: #b9b9b1; color: #4f4f49; }
.show-all:hover, .show-states:hover { border-color: var(--brand-primary, #2a2a2a); color: var(--brand-primary, #2a2a2a); }

/* LIST VIEW: business cards */
.dir-results { max-width: 64rem; }
/* Flex, not grid: one or two cards sit centred; three fill the row. */
.result-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.rcard {
  flex: 0 1 calc((100% - 2rem) / 3); min-width: 17rem; box-sizing: border-box;
  display: flex; align-items: flex-start; gap: 0.9rem; padding: 1rem;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.5); border-radius: 1.25rem;
  text-decoration: none; color: inherit; transition: all 0.25s;
}
.rcard:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.08); border-color: rgba(42,42,42,0.10); }
.rthumb {
  flex: 0 0 56px; width: 56px; height: 56px; border-radius: 0.85rem; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem;
  color: rgba(255,255,255,0.92);
  background: linear-gradient(135deg, #4a4a4a, #2a2a2a);
}
.rthumb img { width: 100%; height: 100%; object-fit: cover; }
.rbody { flex: 1 1 auto; min-width: 0; }
.rname { display: block; font-weight: 700; font-size: 0.98rem; color: #1a1a1a; }
.rmeta { display: block; font-size: 0.8rem; color: #7a7a74; margin-top: 0.1rem; }
.rrating { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.5rem; font-size: 0.78rem; color: #5f5f5a; }
.rrating .on-google { color: #a5a5a0; }
.result-more { margin-top: 1rem; text-align: center; font-size: 0.82rem; color: #9a9a94; }
.result-more a { color: var(--brand-primary, #2a2a2a); font-weight: 600; }
.results-empty { color: #8a8a84; text-align: center; padding: 2.5rem 0; font-size: 0.9rem; }

@media (max-width: 768px) {
  /* The per-state category pills are a desktop discovery affordance. On a phone the one
     control does that job, so the row is not rendered at all. */
  .state-cats { display: none; }

  .dir-stat, .dir-status, .filter-pill-wrap { max-width: none; padding-left: 16px; padding-right: 16px; }
  .filter-pill { font-size: 0.86rem; }
  .search-clear { right: 25px; }

  .dir-index .seo-links { grid-template-columns: 1fr; gap: 6px; }
  .dir-index .seo-links a { min-height: 44px; font-size: 0.82rem; }
  .state-block { margin-bottom: 1.6rem; }
  .show-all, .show-states { width: 100%; }

  .result-grid { gap: 8px; }
  .rcard { flex-basis: 100%; min-width: 0; }
  .rcard { border-radius: 1rem; padding: 10px 12px; gap: 12px; align-items: center; }
  .rthumb { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 0.75rem; font-size: 0.85rem; }
  .rname { font-size: 0.9rem; font-weight: 600; }
  .rmeta { font-size: 0.76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rrating { margin-top: 3px; font-size: 0.72rem; }

  /* The panel becomes a bottom sheet: anchored to the bottom, never taller than the screen,
     with the option list as the only thing that scrolls, so the on-screen keyboard cannot
     push it out of view. */
  .lb-backdrop { padding: 0; align-items: flex-end; }
  .lb-panel {
    width: 100%; max-width: none; border-radius: 22px 22px 0 0;
    max-height: 80vh; max-height: 80dvh;
    box-shadow: 0 -12px 40px rgba(0,0,0,0.22);
  }
  .lb-handle { display: block; width: 42px; height: 5px; border-radius: 9999px; background: #ddddd6; margin: 10px auto 2px; flex: 0 0 auto; }
  .lb-head { padding: 6px 16px 8px; }
  .lb-tabs { padding: 0 16px 10px; }
  .lb-loc { margin: 0 16px 10px; }
  .lb-loc.act { width: calc(100% - 32px); min-height: 42px; }
  .lb-search { padding: 0 16px 8px; }
  .lb-search input { height: 42px; font-size: 16px; }
  .lb-list { max-height: none; padding: 0 10px 6px; }
  .opt { min-height: 46px; padding: 10px 12px; }
  .lb-foot { padding: 10px 16px 18px; }
  .lb-done { min-height: 44px; }
}

/* Radius control: a segmented row of miles, only ever shown when a location is known. */
.lb-radius { margin: 0 1.1rem 0.8rem; }
.lb-radius-row { display: flex; gap: 4px; background: #f3f3ef; border-radius: 9999px; padding: 3px; }
.lb-mi {
  flex: 1 1 0; min-height: 30px; border: none; border-radius: 9999px; background: none;
  font: inherit; font-size: 0.76rem; font-weight: 600; color: #6f6f68; cursor: pointer;
}
.lb-mi.on { background: #fff; color: #2a2a2a; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.lb-radius-note { margin: 6px 2px 0; font-size: 0.72rem; color: #9a9a94; }
.lb-loc-note { margin: -4px 1.1rem 0.7rem; font-size: 0.72rem; color: #a5a5a0; }

@media (max-width: 768px) {
  .lb-radius { margin: 0 16px 10px; }
  .lb-loc-note { margin: -4px 16px 8px; }
  .lb-mi { min-height: 36px; }
}

/* On a phone the control may take the full width, but it keeps the tinted button look. */
@media (max-width: 480px) {
  .filter-pill { width: 100%; }
}
