/* The shared search bar.

   GENERATED by feed/build_search_bar_css.py from css/site.css — do not
   hand-edit. feed/test_search_entry.py fails if the two drift.

   These rules are copied rather than moved because the homepage cannot load
   site.css: index.html runs on css/app.css + css/home.css, and the two files
   share 101 selectors including `*`. search.html and the 425 result-filter
   pages still read the originals from site.css.

   The pill bar that used to live here is gone. The homepage and
   /edmonton/zone-map/ now carry the same bar as /search.html — see
   feed/directory.py search_entry_html(). */

/* The MLS® number lookup (/mls/, js/listing-page.js lookup mode). */
.sb-mls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 0 0; font-size: 14px;}

.sb-mls label { font-weight: 600; color: var(--ink-2);}

.sb-mls input { width: 150px; min-height: 40px; padding: 0 12px; border: 1px solid #cfd6d3; border-radius: 10px;
  background: #fff; font: inherit; font-size: 15px; text-transform: uppercase; letter-spacing: 0.03em;}

.sb-mls input:focus { outline: 2px solid var(--blue-500); outline-offset: 1px;}

.sb-mls button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--orange-deep);
  background: #fff; color: var(--orange-deep); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;}

.sb-mls button:hover { background: var(--orange-deep); color: #fff;}

.searchbar-wrap { border-bottom: 1px solid var(--grid); background: #fff; position: sticky; top: 0; z-index: 40;}

/* The search page runs on one container: the nav pill, the filter bar and the
   list/map split all sit on the shared --page-max container, so their left and
   right edges line up with each other and with every other page. The bar also carries the pill's 22px inner padding, so
   the first field starts on the same x as the logo above it. */
/* Says what the row of controls is for. Without it the bar reads as a fresh
   site-wide search rather than as something narrowing the results underneath
   — which matters most on the pages where it now appears below a heading that
   has already committed to a set ("1,422 homes, price reduced"). Shares the
   .searchbar container so its left edge lines up with the first field. */
.searchbar-title {
  width: min(var(--page-max), calc(100% - 2 * var(--page-gutter)));
  margin: 0 auto; padding: 12px 22px 0;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--red-text);}

.searchbar {
  width: min(var(--page-max), calc(100% - 2 * var(--page-gutter)));
  margin-inline: auto;
  display: flex; align-items: end; flex-wrap: wrap; gap: 14px;
  padding: 14px 22px;}

/* The title already provides the top padding when it is present. */
.searchbar-title + .searchbar { padding-top: 8px;}

/* The money field asks for a payment OR a price, from one box.

   Shown as two words with "or" between them rather than a select. A select
   hides the second option behind a click nobody makes — the whole point is
   that a visitor should see, without doing anything, that this field can be
   either thing. It sits in the label row, so it costs the bar no width: the
   input below still sets the field's width, and the bar keeps its slack. */
.sb-mode { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px;}

.sb-mode-btn {
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; padding: 0; border: 0; background: none;
  /* #6e6e6e not var(--ink-3): the token is 3.45:1 on white and this is an
     interactive label, which must clear 4.5:1 (WCAG 2.1 AA). */
  color: #6e6e6e; cursor: pointer; border-bottom: 2px solid transparent;}

.sb-mode-btn:hover { color: var(--ink);}

.sb-mode-btn.is-on { color: var(--red-text); border-bottom-color: var(--red-text);}

.sb-mode-or {
  font-size: 12px; font-weight: 500; text-transform: lowercase;
  color: var(--ink-3);}

/* A select must not be sized by its longest option. "Fort Saskatchewan (147)"
   was widening the Area control to 232px and pushing the bar to a second row —
   the options are readable when open, which is the only time they need to be. */
.sb-field select { max-width: 160px; text-overflow: ellipsis;}

/* Neighbourhood suggestions. Replaces a <datalist> that never opened on iOS,
   so the list is ours to draw, style and debug. */
.sb-field { position: relative;}

.sb-ac {
  position: absolute; z-index: 45; top: calc(100% + 6px); left: 0; right: 0;
  margin: 0; padding: 6px; list-style: none; max-height: 288px; overflow-y: auto;
  background: #fff; border: 1px solid var(--grid); border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);}

.sb-ac[hidden] { display: none;}

.sb-ac li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  /* 44px of height, because this is the control most likely to be used with a
     thumb and the datalist it replaces was untappable. */
  min-height: 44px; padding: 9px 12px; border-radius: 10px; cursor: pointer;
  font-size: 14.5px; line-height: 1.3;}

.sb-ac li[aria-selected="true"], .sb-ac li:hover { background: var(--orange-soft);}

.sb-ac small { flex: none; font-size: 12px; color: var(--ink-3);}

.rf-wrap .searchbar-title, .rf-wrap .searchbar { width: auto; margin-inline: 0;}

.rf-wrap .searchbar { padding-bottom: 16px;}

.sb-field label { display: block; font-weight: 500; font-size: 12px; color: #6f7069; margin-bottom: 4px;}

.sb-field input, .sb-field select {
  font-family: inherit; font-size: 14px; color: var(--ink); background: var(--linen);
  border: 1.5px solid transparent; border-radius: 11px; padding: 9px 13px;
  appearance: none; -webkit-appearance: none; min-width: 132px;}

.sb-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%234E4F4F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 12px;
  padding-right: 30px; cursor: pointer;}

.sb-field input:focus, .sb-field select:focus { outline: none; border-color: var(--orange); background: #fff;}

/* Min and max share one field, so the bar gains a price floor without
   gaining a whole control's label, gap and 132px minimum. */
.sb-range { display: flex; align-items: center; gap: 6px;}

.sb-range input { min-width: 0; width: 84px; flex: 0 1 auto;}

.sb-range-sep { flex: 0 0 auto; color: var(--ink-3); font-size: 14px;}

.sb-go {
  font-family: inherit; font-weight: 600; font-size: 14px; color: #fff; background: #064031;
  border: 0; border-radius: 11px; padding: 10px 22px; cursor: pointer;}

.sb-go:hover { background: #04291F;}

.sb-reset {
  font-family: inherit; font-weight: 600; font-size: 13.5px; color: var(--red-text);
  background: none; border: 0; cursor: pointer; padding: 10px 4px; text-decoration: underline;
  text-underline-offset: 3px;}

/* Secondary to Search: outlined rather than filled, so the primary action
   still reads first. */
.sb-save {
  font-family: inherit; font-weight: 600; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--grid); border-radius: 11px;
  padding: 10px 18px; cursor: pointer; white-space: nowrap;}

.sb-save:hover { border-color: var(--orange); color: var(--red-text);}

.sb-save[disabled] { opacity: .55; cursor: default;}

@media (max-width: 1000px) {
  /* The filter bar is one tidy row on desktop, so pinning it costs ~60px and
     keeps the controls to hand. Stacked on a phone it is over 400px of a
     660px viewport, so pinned it sat on top of the results the whole way down
     the page — the filters covering the homes they filtered. Let it scroll
     away; it is a few flicks back up, and the results are the point. */
  .searchbar-wrap { position: static;}
  /* Map view means the map. The filter bar stayed on screen underneath it, so
     on a phone the visitor tapped "Map" and got a screenful of filters with a
     strip of map beneath — the map is the one thing they asked for. Filters
     come back with the List toggle. */
  body.map-view .searchbar-wrap,
  body.map-view .fs-bar,
  body.map-view .fs-chips { display: none;}
}

/* ---------- mobile filter sheet ----------
   Everything here is off above 1000px. `display: contents` on the sheet is
   what keeps the desktop layout byte-identical: the wrapper generates no box,
   so .searchbar-wrap sits where it always did.

   Ported from the source architecture with one colour change, computed rather than copied.
   Its --orange-deep is #d94512; this site's is the brand red #6AA18E, which
   is 4.56:1 on white — fine for the badge, Done link and Apply button — but
   only 4.02:1 against --orange-soft, so the chip label would have failed AA.
   The chip uses --red-text (4.83:1 on that background) instead. */
.fs-bar, .fs-chips, .fs-scrim, .fs-grab, .fs-head, .fs-foot { display: none;}

@media (max-width: 1000px) {
  /* Save search is not a filter. It stays on the bar rather than going into
     the sheet, so the reason it was put on this page survives the change. */
  .fs-bar .sb-save { flex: none; padding: 10px 14px; min-height: 44px;}
  /* The form is the scrolling middle of the sheet. */
  .fs-sheet .searchbar-wrap { flex: 1; min-height: 0; overflow-y: auto;}
  .fs-sheet .searchbar-title { display: none;}
  /* the sheet is titled already */
  .fs-sheet .sb-go { display: none;}
}

/* ---- Touch targets -------------------------------------------------------
   A 20px-high "Price / Monthly" toggle and a 31px favourite heart are a
   thumb's width away from unusable. The audit counted 82 of 138 visible
   targets under 44px on the homepage alone, and named these: the menu at
   40x40, the money toggle at 20, hearts at 31, Search and Save at 41-43, and
   the listing's Share/Print/Favourite at 32-34.

   Expanding the padding on each control would reflow the bars they sit in, so
   the hit area is grown with an ::after overlay instead: invisible, no
   layout cost, and the visible control is untouched. 44px is the Apple and
   WCAG 2.5.5 figure. `position: relative` on the host is what anchors it, and
   it is set here rather than assumed.

   Hover styling stays on the element, so nothing lights up from the overlay
   alone — only the click box grows.

   Class names are this site's, checked one by one rather than copied: the
   heart is .dg-heart on a listing card and .heart in the account and search
   lists, the blog tab is .bx-tab (styled in blog-index.css, which loads
   alongside this file), and the account tab is .account-tab. */
/* Not the hearts: they are already position: absolute (pinned to the photo's
   top-right corner), which is a containing block for ::after too. Listing
   them here made them relative and dropped them below the card, white on
   white (found 2026-10-22). */
.sb-mode-btn, .sb-go, .sb-save, .sb-reset,
.dgn-burger, .pdp-action, .account-tab, .bx-tab { position: relative;}

.dg-heart::after, .rcard .heart::after, .sb-mode-btn::after, .sb-go::after,
.sb-save::after, .sb-reset::after, .dgn-burger::after, .pdp-action::after,
.account-tab::after, .bx-tab::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: max(100%, 44px); height: max(100%, 44px);}

.sb-go { min-height: 44px; padding: 0 26px; border-radius: 999px; font-size: 15px;}

.results-more button, .pdp-savesearch, .pdp-block .btn--ghost, .guide__card .btn--ghost,
.sb-save, .fs-btn, .book-alt-btn {
  border: 1.5px solid var(--orange-deep, #064031); color: var(--orange-deep, #064031); background: #fff;}

.sb-save, .fs-btn { min-height: 44px; border-radius: 999px;}

.results-more button:hover, .pdp-savesearch:hover:not([disabled]), .pdp-block .btn--ghost:hover,
.guide__card .btn--ghost:hover, .sb-save:hover, a.book-alt-btn:hover {
  background: var(--orange-soft, #EEF5F2); color: var(--orange-deep, #064031); border-color: var(--orange-deep, #064031);}


/* ---- the entry-bar variant ----

   .searchbar-wrap pins itself to the top of the viewport, which is right on
   /search.html — the bar filters the list scrolling underneath it, so it has
   to stay reachable. On the homepage and the zone map there is nothing
   underneath to filter: the bar navigates to /search.html instead. Pinned, it
   would follow the reader down a page it has no relationship with, and on the
   homepage it would sit over the hero. */
.se-wrap { position: static; border-bottom: 0; background: transparent; }

/* The sticky bar earns a full-width white band and a rule under it because it
   separates the controls from the results. Standing on its own it is a
   component on the page, not a chrome bar across it. */
.se-wrap .searchbar {
  background: #fff;
  border: 1px solid var(--grid, rgba(51, 51, 51, 0.12));
  border-radius: 18px;
  box-shadow: 0 18px 50px -22px rgba(20, 24, 16, 0.28);
  padding: 14px 18px;
}

/* Its own spacing, rather than the hero overlap the pill used. */
.se-wrap { margin: 22px auto 26px; }
