/* The farm map in Option C. Reference: docs/design/option-c/OptionC-Map.html
   and OptionC-MapFilters.html. The Maps runtime owns the map, its topbar and
   popups; this sheet themes them, lays out the FarmFinder list beside the map
   (in an expandable overlay on a phone) and styles the FarmFinder filter drawer that stands
   in for the runtime's category panel. Client pin artwork is unchanged. */

/* FarmFinder map behavior. These rules lived in directory.css; once that
   file moved into a lower cascade layer the Maps runtime's own sheet
   outranked them, which shrank the client pin artwork to 15 pixel blobs and
   undid the phone filter modal. Here they are unlayered again and load after
   the runtime. */

.farmfinder-map-body {
  margin: 0;
  overflow: hidden;
}
.farmfinder-map-app {
  height: 100dvh;
  font-family: "Figtree", system-ui, sans-serif;
  inset: 0;
  position: fixed;
}
.farmfinder-map-app .maps-panelcard-head h2,
.farmfinder-map-app .maps-popup h3,
.farmfinder-map-app .maps-modal h2 {
  font-family: "Bricolage Grotesque", "Figtree", sans-serif;
  font-weight: 700;
}
.farmfinder-map-app .farmfinder-map-branding {
  align-items: center;
  display: flex;
  gap: .55rem;
  justify-content: flex-start;
}
.farmfinder-map-brand-home {
  align-items: center;
  border-right: 1px solid var(--maps-rule, #E3E0D6);
  display: flex;
  height: 44px;
  padding: 0 .65rem .05rem .35rem;
  text-decoration: none;
}
.farmfinder-map-brand-home img {
  display: block;
  height: 2.25rem;
  object-fit: contain;
  width: 5.6rem;
}
.farmfinder-map-brand-home:focus-visible {
  border-radius: 8px;
  outline: 3px solid color-mix(in srgb, var(--maps-primary) 32%, transparent);
  outline-offset: 2px;
}
.farmfinder-map-back {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--maps-text);
  display: inline-flex;
  flex: 0 0 auto;
  font: 750 .875rem/1 "Figtree", system-ui, sans-serif;
  gap: .5rem;
  height: 44px;
  padding: 0 .9rem;
  text-decoration: none;
}
.farmfinder-map-back:hover,
.farmfinder-map-back:focus-visible {
  background: color-mix(in srgb, var(--maps-primary) 8%, transparent);
  color: var(--maps-primary);
}
.farmfinder-map-back:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--maps-primary) 32%, transparent);
  outline-offset: 2px;
}
.farmfinder-map-message {
  background: var(--maps-panel, #fff);
  border: 1px solid var(--maps-rule, #E3E0D6);
  border-radius: 1rem;
  left: 50%;
  max-width: min(34rem, calc(100vw - 2rem));
  padding: 1.5rem;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
}
.farmfinder-map-message h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.05;
  margin: 0 0 .75rem;
}
.farmfinder-map-message a {
  font-weight: 750;
}
.farmfinder-map-message a + a {
  margin-left: 1rem;
}
.farmfinder-map-filter {
  align-items: center;
  background: var(--maps-panel, #fff);
  border: 1px solid var(--maps-rule, #E3E0D6);
  border-radius: 16px;
  bottom: 1.25rem;
  box-shadow: 0 10px 30px rgba(21,35,27,.14);
  color: #15231B;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  left: 50%;
  max-width: min(46rem, calc(100vw - 2rem));
  padding: .7rem 1.25rem;
  position: absolute;
  transform: translateX(-50%);
  z-index: 80;
}
.farmfinder-map-filter p,
.farmfinder-map-filter a {
  font-family: "Figtree", system-ui, sans-serif;
  font-size: .875rem;
}
.farmfinder-map-filter p {
  margin: 0;
}
.farmfinder-map-filter a {
  font-weight: 700;
  white-space: nowrap;
  color: #2E6B2B;
}
@media (max-width: 40rem) {
  .farmfinder-map-filter {
    border-radius: 1rem;
    justify-content: center;
    text-align: center;
  }
}
.farmfinder-map-skip {
  position: absolute;
  left: -9999px;
  z-index: 90;
}
.farmfinder-map-skip:focus {
  left: 16px;
  top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: #15231B;
  font: 600 15px/1.2 "Figtree", system-ui, sans-serif;
  box-shadow: 0 6px 18px rgba(21,35,27,.16);
}
@media (max-width: 820px) {
  .farmfinder-map-app .maps-topmenu {
    display: none !important;
  }
  .farmfinder-map-app .maps-filters {
    border: 0;
    border-radius: 0;
    bottom: 0;
    height: 100dvh;
    position: fixed;
    left: 0;
    max-height: none;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 100;
  }
  .farmfinder-map-app .maps-filters .maps-panelcard-head {
    padding-top: max(1rem, env(safe-area-inset-top));
  }
  .farmfinder-map-app .maps-filters .maps-filters-foot {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  .farmfinder-map-app * {
    scroll-behavior: auto !important;
  }
}
.farmfinder-pin-art {
  display: inline-block;
  flex: 0 0 auto;
  height: 34px;
  overflow: hidden;
  position: relative;
  vertical-align: middle;
  width: 24px;
  clip-path: polygon(
    45.88% 0%, 54.12% 0%, 62.24% 1%, 67.05% 2%, 73.57% 4%,
    78.03% 6%, 81.92% 8%, 85.01% 10%, 88.79% 13%, 91.99% 16%,
    95.19% 20%, 97.48% 24%, 98.97% 28%, 99.77% 32%, 100% 36%,
    99.54% 40%, 98.4% 44%, 96.68% 48%, 94.74% 52%, 92.45% 56%,
    90.16% 60%, 87.53% 64%, 84.67% 68%, 81.58% 72%, 78.15% 76%,
    74.49% 80%, 70.48% 84%, 66.13% 88%, 61.21% 92%, 56.06% 96%,
    53.2% 98%, 50.34% 100%, 49.77% 100%, 47.14% 98%, 44.51% 96%,
    39.7% 92%, 35.01% 88%, 30.78% 84%, 26.66% 80%, 23% 76%,
    19.45% 72%, 16.25% 68%, 13.27% 64%, 10.41% 60%, 7.89% 56%,
    5.49% 52%, 3.32% 48%, 1.6% 44%, .46% 40%, .11% 36%,
    .23% 32%, 1.03% 28%, 2.63% 24%, 4.92% 20%, 8.12% 16%,
    11.1% 13%, 14.99% 10%, 18.19% 8%, 22.08% 6%, 26.66% 4%,
    33.07% 2%, 37.76% 1%
  );
}
.farmfinder-map-app .farmfinder-pin-art[data-farmfinder-pin] > img {
  border: 0;
  border-radius: 0;
  display: block;
  height: 165.16129%;
  left: -65.714286%;
  max-height: none;
  max-width: none;
  object-fit: fill;
  position: absolute;
  top: -40%;
  width: 234.057143%;
}
.farmfinder-pin-art--20261003 {
  clip-path: polygon(
    45.83% 0%, 54.28% 0%, 62.85% 1%, 67.19% 2%, 73.75% 4%,
    78.31% 6%, 82.09% 8%, 85.09% 10%, 88.99% 13%, 92.10% 16%,
    95.22% 20%, 97.44% 24%, 99.00% 28%, 99.78% 32%, 100% 36%,
    99.67% 40%, 98.67% 44%, 96.89% 48%, 94.88% 52%, 92.77% 56%,
    90.55% 60%, 87.99% 64%, 85.09% 68%, 82.09% 72%, 78.64% 76%,
    75.08% 80%, 71.08% 84%, 66.74% 88%, 61.96% 92%, 56.84% 96%,
    53.95% 98%, 50.39% 100%, 49.17% 100%, 46.50% 98%, 43.83% 96%,
    38.93% 92%, 34.37% 88%, 30.14% 84%, 26.14% 80%, 22.47% 76%,
    18.91% 72%, 15.80% 68%, 12.79% 64%, 10.01% 60%, 7.45% 56%,
    5.12% 52%, 3% 48%, 1.33% 44%, .33% 40%, 0% 36%,
    .22% 32%, 1% 28%, 2.56% 24%, 4.78% 20%, 8.01% 16%,
    11.01% 13%, 14.91% 10%, 18.02% 8%, 21.69% 6%, 26.25% 4%,
    32.81% 2%, 37.15% 1%
  );
}
.farmfinder-map-app .farmfinder-pin-art--20261003[data-farmfinder-pin] > img {
  height: 161.897233%;
  left: -62.625139%;
  top: -38.260870%;
  width: 227.808676%;
}
.farmfinder-map-app .maps-pin:has(.farmfinder-pin-art)::before { display: none; }
.farmfinder-map-app .maps-pin:has(.farmfinder-pin-art) .maps-pin-ico {
  filter: drop-shadow(0 1px 1px #fff) drop-shadow(0 3px 3px rgb(0 0 0 / .3));
  height: 56.686px;
  left: 15px;
  top: 32px;
  transform: translate(-50%, -100%);
  width: 40px;
}
.farmfinder-map-app .maps-pin-ico > .farmfinder-pin-art { height: 100%; width: 100%;
}
.farmfinder-map-app .maps-pin.is-selected:has(.farmfinder-pin-art) .maps-pin-ico {
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 5px #15231B);
  height: 68.023px;
  left: 17px;
  top: 41px;
  width: 48px;
}
.farmfinder-map-app .maps-pin:has(.farmfinder-pin-art) .maps-pin-feature { right: -13px; top: -24px;
}
.farmfinder-map-app .maps-pin:has(.farmfinder-pin-art) .maps-pin-feature:nth-of-type(3) { right: -16px; top: -5px;
}
.farmfinder-map-app .maps-pin.is-selected:has(.farmfinder-pin-art) .maps-pin-feature { right: -18px; top: -27px;
}
.farmfinder-map-app .maps-pin.is-selected:has(.farmfinder-pin-art) .maps-pin-feature:nth-of-type(3) { right: -21px; top: -5px;
}
.farmfinder-map-app .maps-chip[data-cat] {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 17px;
  column-gap: 8px;
  min-height: 50px;
}
.farmfinder-map-app .maps-chip[data-cat] > .maps-cat-dot { justify-self: center;
}
.farmfinder-map-app .maps-chip[data-cat] > span:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.farmfinder-filter-art {
  display: inline-flex;
  flex: 0 0 24px;
  width: 24px;
  height: 34px;
}
.farmfinder-map-app .maps-filter-active-icon:has(.farmfinder-pin-art) { background: transparent; border: 0;
}
.farmfinder-map-app .maps-filter-active-icon .farmfinder-pin-art { height: 25.5px; width: 18px;
}
.farmfinder-map-app .maps-popup-badge:has(.farmfinder-pin-art),
.farmfinder-map-app .maps-hero-tile:has(.farmfinder-pin-art) { background: transparent; box-shadow: none;
}
.farmfinder-map-app .maps-popup-badge .farmfinder-pin-art { height: 45.35px; width: 32px;
}
.farmfinder-map-app .maps-hero-tile .farmfinder-pin-art { height: 59.52px; width: 42px;
}

/* Option C theme ------------------------------------------------------- */

.farmfinder-map-app {
  --maps-primary:#2E6B2B; --maps-accent:#F2A74B; --maps-bg:#EEF5E4; --maps-panel:#FFFFFF;
  --maps-text:#15231B; --maps-muted:#4F5F55; --maps-rule:#E3E0D6; --maps-none:#2E6B2B;
  --maps-radius:16px; --maps-top-h:64px;
  --maps-shadow:0 20px 50px rgba(21,35,27,.16); --maps-shadow-sm:0 6px 18px rgba(21,35,27,.1);
  --ff-results-w:320px;
  font-family:"Figtree","Segoe UI",Helvetica,Arial,sans-serif;
}
.farmfinder-map-app .maps-panelcard-head h2,
.farmfinder-map-app .maps-popup h3,
.farmfinder-map-app .maps-modal h2,
.farmfinder-map-app .maps-listview h2 { font-family:"Bricolage Grotesque","Figtree",sans-serif; font-weight:700; letter-spacing:-.015em; }

/* Topbar: one white bar across the top, as on the board. */
.farmfinder-map-app .maps-topbar { top:0; left:0; right:0; min-height:var(--maps-top-h); padding:10px 16px; gap:16px; border:0; border-bottom:1px solid var(--maps-rule); border-radius:0; box-shadow:none; }
.farmfinder-map-app .farmfinder-map-branding { gap:6px; }
.farmfinder-map-brand-home { border-right:0; padding:0 4px 0 0; }
.farmfinder-map-brand-home img { width:auto; height:40px; }
.farmfinder-map-back { font:600 15px/1 "Figtree",system-ui,sans-serif; color:#15231B; gap:8px; padding:0 10px; border-radius:10px; }
.farmfinder-map-back:hover, .farmfinder-map-back:focus-visible { background:#EEF5E4; color:#2E6B2B; }
.farmfinder-map-app .maps-topsearch { max-width:480px; }
.farmfinder-map-app .maps-topsearch-field { height:44px; border:1px solid #D5D2C6; border-radius:12px; background:#fff; }
.farmfinder-map-app .maps-topsearch-field:focus-within { border-color:#2E6B2B; box-shadow:0 0 0 3px rgba(120,180,72,.3); }
.farmfinder-map-app .maps-topsearch-field input { font-size:15px; }
.farmfinder-map-app .maps-pill { height:44px; padding:0 16px; border:1px solid #D5D2C6; border-radius:12px; font-size:15px; font-weight:600; color:#15231B; }
.farmfinder-map-app .maps-pill:hover { border-color:#15231B; }
.farmfinder-map-app .maps-pill--icon { padding:0; width:44px; }
.farmfinder-map-app .maps-pill-badge { background:#78B448; color:#15231B; }

/* Controls and clusters. */
.farmfinder-map-app .maps-ctrl-group { border:1px solid #E3E0D6; border-radius:12px; background:#fff; box-shadow:0 4px 14px rgba(21,35,27,.1); overflow:hidden; }
.farmfinder-map-app .maps-ctrl { color:#15231B; }
.farmfinder-map-app .maps-ctrl:hover { background:#EEF5E4; }
.farmfinder-map-app .maps-cluster { background:#fff !important; color:#15231B; border:2px solid #78B448; box-shadow:0 0 0 6px rgba(120,180,72,.18), 0 4px 12px rgba(21,35,27,.18) !important; font:700 13px/1 "Figtree",system-ui,sans-serif; }

/* Popup: a white card with the farm name, place and profile link, as on
   the board. When the pin is a published farm, farm-map.js folds the place
   into the heading and links the profile, so the runtime's detail tiles and
   its second button step aside. */
.farmfinder-map-app .maps-popup { width:360px; border-color:#E3E0D6; border-radius:16px; box-shadow:0 20px 50px rgba(21,35,27,.18); }
.farmfinder-map-app .maps-popup-body { padding:18px 18px 16px; }
.farmfinder-map-app .maps-popup h3 { font-size:19px; }
.farmfinder-map-app .maps-poptile { border-radius:12px; }
.farmfinder-map-app .maps-popup-more { min-height:40px; border-radius:10px; font-weight:600; color:#2E6B2B; }
.farmfinder-map-app .maps-popup-more:hover { color:#15231B; }
.farmfinder-map-app .maps-popup.is-farm { width:320px; }
.farmfinder-map-app .maps-popup.is-farm .maps-popup-body { padding:16px 16px 14px; }
.farmfinder-map-app .maps-popup.is-farm .maps-popup-head { align-items:flex-start; gap:14px; padding-right:36px; margin:0; }
.farmfinder-map-app .maps-popup.is-farm .maps-popup-headtext { min-width:0; }
.farmfinder-map-app .maps-popup.is-farm h3 { font-size:17px; line-height:1.25; }
.farmfinder-map-app .maps-popup.is-farm .maps-popup-tiles,
.farmfinder-map-app .maps-popup.is-farm .maps-popup-more { display:none; }
.farmfinder-popup-place { margin:4px 0 0; font-size:14px; line-height:1.45; color:#4F5F55; }
.farmfinder-popup-profile { display:inline-flex; align-items:center; gap:6px; min-height:44px; margin:-2px 0 -10px; color:#2E6B2B; font:700 15px/1.2 "Figtree",system-ui,sans-serif; text-decoration:none; }
.farmfinder-popup-profile:hover { color:#15231B; text-decoration:underline; }
.farmfinder-popup-profile:focus-visible { outline:3px solid #2E6B2B; outline-offset:2px; border-radius:6px; }

/* Filters panel and chips, with the client artwork cropped to its circle. */
.farmfinder-map-app .maps-filters { border-color:#E3E0D6; }
@media (min-width: 821px) { .farmfinder-map-app .maps-filters { top:calc(var(--maps-top-h) + 12px); right:16px; } }
.farmfinder-map-app .maps-chip { min-height:44px; padding:6px 14px 6px 10px; border:1px solid #D5D2C6; background:#fff; color:#15231B; font-size:14px; font-weight:600; }
.farmfinder-map-app .maps-chip.is-on { background:#EEF5E4; border-color:#2E6B2B; color:#2E6B2B; box-shadow:inset 0 0 0 1px #2E6B2B; }
.farmfinder-map-app .maps-chip .maps-cat-dot { width:10px; height:10px; margin-left:6px; }
.farmfinder-map-app .maps-fsec-action { color:#2E6B2B; font-weight:600; }
.farmfinder-map-app .maps-btn { border-radius:12px; font-weight:600; }
.farmfinder-map-app .maps-btn--primary { background:#2E6B2B; border-color:#2E6B2B; }
.farmfinder-result-art { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; flex:none; border-radius:10px; background:#EEF5E4; }
.farmfinder-map-app .farmfinder-result-art .farmfinder-pin-art { width:24px; height:34px; }

/* Results panel beside the map. */
.farmfinder-map-results { position:absolute; z-index:25; top:var(--maps-top-h); left:0; bottom:0; width:var(--ff-results-w); display:flex; flex-direction:column; gap:12px; padding:20px 16px 16px; background:#fff; border-right:1px solid #E3E0D6; color:#15231B; }
.farmfinder-map-results-body { display:flex; flex:1; min-height:0; flex-direction:column; gap:12px; }
.farmfinder-map-results-body[hidden] { display:none; }
.farmfinder-results-toggle { display:none; }
.farmfinder-map-results-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.farmfinder-map-results-head h1 { margin:0; font:700 21px/1.2 "Bricolage Grotesque","Figtree",sans-serif; letter-spacing:-.015em; }
.farmfinder-map-results-head>[data-results-count] { font-size:14px; color:#4F5F55; white-space:nowrap; }
.farmfinder-map-results-list { flex:1 1 auto; min-height:0; margin:0; padding:0 2px 0 0; overflow-y:auto; overscroll-behavior:contain; list-style:none; display:flex; flex-direction:column; gap:8px; }
.farmfinder-map-results-list li { position:relative; display:block; border:1px solid #E3E0D6; border-radius:12px; background:#fff; }
.farmfinder-map-results-list li:hover { border-color:#BFD9A6; background:#FBF9F4; }
.farmfinder-result { display:flex; align-items:center; gap:12px; width:100%; min-height:68px; padding:12px; border:0; background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; border-radius:12px; }
.farmfinder-result:focus-visible { outline:3px solid #2E6B2B; outline-offset:-3px; }
.farmfinder-result-art { width:44px; height:44px; }
.farmfinder-result-tile { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; flex:none; border-radius:10px; background:#EEF5E4; color:#2E6B2B; }
.farmfinder-result-tile svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.farmfinder-result-copy { display:flex; flex-direction:column; gap:2px; min-width:0; }
.farmfinder-result-copy strong { font-size:15px; line-height:1.3; }
.farmfinder-result-copy span { font-size:13px; line-height:1.35; color:#4F5F55; }
/* The profile link shares the place line, so a row stays as short as the
   board's while the farm stays one tap away. */
.farmfinder-map-results-list li:has(.farmfinder-result-link) .farmfinder-result-copy > :last-child { padding-right:76px; }
.farmfinder-result-link { position:absolute; right:4px; bottom:4px; display:inline-flex; align-items:center; min-height:36px; padding:0 10px; border-radius:8px; font-size:14px; font-weight:600; color:#2E6B2B; text-decoration:none; }
.farmfinder-result-link:focus-visible { outline:3px solid #2E6B2B; outline-offset:-3px; }
.farmfinder-result-link:hover { color:#15231B; text-decoration:underline; }
.farmfinder-result-empty { padding:16px; font-size:14px; color:#4F5F55; }
.farmfinder-map-results-more { margin:0; font-size:13px; color:#4F5F55; }
.farmfinder-map-results-note { display:none; margin:-4px 0 0; font-size:14px; line-height:1.45; color:#4F5F55; }
.farmfinder-map-results-note a { color:#2E6B2B; font-weight:600; white-space:nowrap; }
.farmfinder-map-results-all { font-size:15px; font-weight:600; color:#2E6B2B; text-decoration:none; }
.farmfinder-map-results-all:hover { color:#15231B; }

/* Filter drawer: the directory's filters as a form that reloads the map,
   sliding in from the left as on the MapFilters board. The runtime's own
   category panel gives way to it. */
.farmfinder-map-body .ff-sprite { position:absolute; width:0; height:0; overflow:hidden; }
.farmfinder-map-app .maps-topbar-actions > .maps-pill:not(.maps-pill--icon):not(.farmfinder-filters-btn) { display:none; }
.farmfinder-filters-btn .maps-pill-badge { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; font-size:12px; font-weight:700; }
.farmfinder-filters-btn .maps-pill-badge[hidden] { display:none; }
.ff-map-drawer-backdrop { position:fixed; inset:0; z-index:200; background:rgba(21,35,27,.38); }
.ff-map-drawer { position:fixed; z-index:201; top:0; left:0; bottom:0; width:min(400px, 100vw); display:flex; flex-direction:column; background:#fff; color:#15231B; box-shadow:0 20px 60px rgba(21,35,27,.24); font-family:"Figtree",system-ui,sans-serif; }
.ff-map-drawer[hidden], .ff-map-drawer-backdrop[hidden] { display:none; }
.ff-map-drawer-form { display:flex; flex-direction:column; min-height:0; height:100%; }
.ff-map-drawer-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 20px 8px; padding-top:max(20px, env(safe-area-inset-top)); }
.ff-map-drawer-head h2 { margin:0; font:700 21px/1.2 "Bricolage Grotesque","Figtree",sans-serif; letter-spacing:-.015em; }
.ff-map-drawer-x { display:grid; place-items:center; width:44px; height:44px; flex:none; border:1px solid #D5D2C6; border-radius:12px; background:#fff; color:#15231B; cursor:pointer; }
.ff-map-drawer-x:hover { border-color:#15231B; }
.ff-map-drawer-x:focus-visible { outline:3px solid #2E6B2B; outline-offset:2px; }
.ff-map-drawer .ff-icon { display:block; width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.ff-map-drawer-x .ff-icon { color:#15231B; width:22px; height:22px; }
.ff-map-drawer-body { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; display:flex; flex-direction:column; gap:18px; padding:12px 20px 20px; }
.ff-map-drawer-body .ff-label { font-weight:700; }
.ff-map-drawer-body .ff-select { min-height:48px; }
.ff-map-drawer-note { margin:4px 0 0; }
.ff-map-drawer-note .ff-icon { color:#2E6B2B; width:18px; height:18px; }
.ff-map-drawer-foot { display:flex; gap:12px; padding:16px 20px 20px; padding-bottom:max(20px, env(safe-area-inset-bottom)); border-top:1px solid #E3E0D6; }
.farmfinder-map-body.ff-map-drawer-open { overflow:hidden; }

@media (min-width: 821px) {
  .farmfinder-map-app.has-farm-results .farmfinder-map-filter { left:calc(50% + var(--ff-results-w) / 2); max-width:min(46rem, calc(100vw - var(--ff-results-w) - 2rem)); }
  .farmfinder-map-app.has-farm-results .maps-leftctrls { left:calc(var(--ff-results-w) + 16px); }
  .farmfinder-map-app.has-farm-results .leaflet-bottom.leaflet-left { left:var(--ff-results-w); }
}

/* Phone results stay on the map as a compact expandable overlay. */
@media (max-width: 820px) {
  .farmfinder-map-body { overflow:hidden; background:#fff; }
  .farmfinder-map-app { position:fixed; inset:0; height:100dvh; min-height:0; overflow:hidden; display:block; --ff-map-headroom:64px; }
  .farmfinder-map-app:has(.farmfinder-search-open) { --ff-map-headroom:120px; }
  .farmfinder-map-app > .maps-canvas { top:var(--ff-map-headroom); }
  .farmfinder-map-app .maps-tabbar,
  .farmfinder-map-app .maps-listview { display:none !important; }
  .farmfinder-map-app > .maps-modal { position:fixed; }
  .farmfinder-map-app .maps-leftctrls { top:calc(var(--ff-map-headroom) + 14px); left:14px; }

  .farmfinder-map-app .maps-topbar { position:absolute; top:0; left:0; right:0; z-index:40; display:grid; grid-template-columns:minmax(0,1fr) auto auto; grid-template-areas:"brand actions searchbtn" "search search search"; gap:0 8px; min-height:64px; padding:10px 10px 10px 12px; }
  .farmfinder-map-app .maps-topbar:not(.farmfinder-search-open) .maps-topsearch { display:none; }
  .farmfinder-map-app .maps-topbar.farmfinder-search-open { row-gap:10px; }
  .farmfinder-map-app .maps-topbar-actions > .maps-pill { flex:0 0 auto; }
  .farmfinder-map-app .maps-topsearchbtn { width:44px; height:44px; border:1px solid #D5D2C6; border-radius:12px; background:#fff; color:#15231B; }
  .farmfinder-map-app .maps-topbar.farmfinder-search-open .maps-topsearchbtn { border-color:#2E6B2B; color:#2E6B2B; }
  .farmfinder-map-app .farmfinder-map-branding { min-width:0; gap:2px; container-type:inline-size; }
  .farmfinder-map-brand-home { flex:none; height:44px; padding:0 2px 0 0; }
  .farmfinder-map-brand-home img { flex:none; width:auto; height:32px; }
  .farmfinder-map-back { flex:none; width:auto; padding:0 6px; gap:6px; font-size:15px; white-space:nowrap; }
  .farmfinder-map-back-label { position:static; width:auto; height:auto; overflow:visible; clip:auto; clip-path:none; white-space:nowrap; }
  .farmfinder-map-app .maps-topbar-actions > .maps-pill { gap:6px; padding:0 12px; }
  .farmfinder-map-app > .farmfinder-map-filter { display:none; }
  .farmfinder-map-results-note { display:block; }

  .farmfinder-map-results { position:absolute; top:auto; left:12px; right:12px; bottom:max(28px,env(safe-area-inset-bottom)); width:auto; padding:8px 10px; gap:8px; max-height:calc(100dvh - 150px); border:1px solid #D5D2C6; border-radius:16px; box-shadow:0 6px 24px #152b2026; }
  .farmfinder-map-results-head { display:grid; grid-template-columns:minmax(0,1fr) auto 44px; gap:8px; align-items:center; }
  .farmfinder-map-results-head h1 { min-width:0; font-size:17px; }
  .farmfinder-map-results-head>[data-results-count] { font-size:13px; }
  .farmfinder-results-toggle { display:inline-flex; width:44px; height:44px; align-items:center; justify-content:center; border:1px solid #D5D2C6; border-radius:10px; background:#FBF9F4; color:#2E6B2B; cursor:pointer; }
  .farmfinder-results-toggle svg { width:20px; height:20px; }
  .farmfinder-results-toggle[aria-expanded=true] svg { transform:rotate(180deg); }
  .farmfinder-results-toggle:focus-visible { outline:3px solid #2E6B2B; outline-offset:2px; }
  .farmfinder-map-results-body { display:block; flex:none; max-height:min(48dvh,440px); overflow:auto; overscroll-behavior:contain; padding:2px; }
  .farmfinder-map-results-body>:not(:first-child) { margin-top:12px; }
  .farmfinder-map-results-all { display:flex; align-items:center; min-height:44px; flex:none; }
  .farmfinder-map-results-list { flex:none; overflow:visible; padding:0; }
  .farmfinder-map-app .maps-popup { width:auto; }
  .farmfinder-map-app .maps-popup.is-farm { width:auto; }
}
/* When the phone header row is too tight for the label, the back link
   keeps its arrow and its accessible name. */
@container (max-width: 189px) {
  .farmfinder-map-back { width:44px; padding:0; justify-content:center; }
  .farmfinder-map-back-label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); }
}
