/* The sort-and-filter bar on listing flip-through pages (CC-ASK-3904; A-528, T-1095). Loaded only while the owner's switch is on.
   Tokens come from site.css (--ink, --soft, --line, --teal, --teal-d, --paper, --cream, --coral-d). 44 px targets; fits 320 px. */
.lf-bar{flex-basis:100%;display:flex;flex-direction:column;gap:8px;margin:2px 0 4px;}
.lf-bar[hidden]{display:none;}
/* On a listing the slot follows the header, so the title keeps Previous and Next beside it on the right (A-553, T-1118). */
.home-head + .lf-bar{margin:14px 0 0;}
/* site.css colours and sizes every span inside .home-flip (and makes it a full-width flex item on phones): the bar's own spans take their parent's. */
.home-flip .lf-bar span,.home-flip .lf-sheet span{color:inherit;font-size:inherit;margin:0;flex-basis:auto;}
.home-flip .lf-bar .lf-now,.home-flip .lf-sheet .lf-now{color:var(--soft);font-size:.78rem;}
.home-flip .lf-sheet .lf-check-c,.home-flip .lf-sheet .lf-tile-c,.home-flip .lf-bar .lf-tile-c{font-size:.8rem;}
.home-flip .lf-sheet .lf-check-c{color:var(--soft);font-size:.84rem;}
.home-flip .lf-sheet .lf-field,.home-flip .lf-bar .lf-field{color:var(--soft);font-size:.84rem;}
.lf-phone{display:flex;gap:8px;}
.lf-desk{display:none;}
.lf-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 16px;border-radius:999px;border:1px solid var(--line);background:var(--paper);color:var(--ink);font:inherit;font-weight:700;font-size:.9rem;cursor:pointer;}
.lf-phone .lf-btn{flex:1 1 0;min-width:0;}
.lf-btn:hover,.lf-btn[aria-expanded="true"],.lf-btn.on{border-color:var(--teal);}
.lf-btn.on{background:var(--cream);}
.lf-btn:focus-visible,.lf-pill:focus-visible,.lf-sortopt:focus-visible,.lf-chip:focus-visible,.lf-x:focus-visible,.lf-reset:focus-visible,.lf-show:focus-visible,.lf-input:focus-visible,.lf-check input:focus-visible{outline:3px solid var(--teal);outline-offset:2px;}
.lf-now{font-weight:400;font-size:.78rem;color:var(--soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:9em;}
.lf-badge{font-weight:800;}
.lf-chips{display:flex;flex-wrap:wrap;gap:6px;}
.lf-note{margin:0;font-size:.86rem;color:var(--soft);}
.lf-note[hidden]{display:none;}
.lf-chip{min-height:44px;padding:6px 14px;border-radius:999px;border:1px solid var(--teal);background:var(--cream);color:var(--teal-d);font:inherit;font-weight:700;font-size:.86rem;cursor:pointer;}
.lf-group{margin:0 0 18px;}
.lf-groupset{margin:0 0 18px;}
.lf-groupset .lf-group:last-child{margin-bottom:0;}
.lf-panel .lf-groupset:last-child,.lf-sheetbody .lf-groupset:last-child{margin-bottom:0;}
.lf-h{font-family:var(--font-head);font-size:.95rem;margin:0 0 8px;}
.lf-pills{display:flex;flex-wrap:wrap;gap:8px;}
.lf-pill{min-height:44px;min-width:44px;padding:6px 14px;border-radius:10px;border:1px solid var(--line);background:var(--paper);color:var(--ink);font:inherit;font-weight:700;cursor:pointer;}
.lf-pill[aria-pressed="true"]{border-color:var(--teal);background:var(--teal-d);color:#fff;}
.lf-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px;}
.lf-tile{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;}
.lf-tile-c{font-weight:400;font-size:.8rem;opacity:.85;}
.lf-checks{display:grid;grid-template-columns:1fr;gap:2px;}
.lf-check{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer;}
.lf-check input{width:22px;height:22px;flex:none;accent-color:var(--teal-d);}
.lf-check-l{flex:1;}
.lf-check-c{color:var(--soft);font-size:.84rem;}
.lf-pricerow{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.lf-field{display:flex;flex-direction:column;gap:4px;font-size:.84rem;color:var(--soft);}
.lf-input{min-height:44px;padding:8px 12px;border-radius:10px;border:1px solid var(--line);font:inherit;font-size:1rem;color:var(--ink);background:#fff;width:100%;}
.lf-sortlist{display:flex;flex-direction:column;gap:6px;}
.lf-sortopt{min-height:44px;padding:8px 14px;text-align:left;border-radius:10px;border:1px solid var(--line);background:var(--paper);color:var(--ink);font:inherit;font-weight:600;cursor:pointer;}
.lf-sortopt.on{border-color:var(--teal);background:var(--cream);font-weight:800;}
.lf-reset{min-height:44px;padding:8px 16px;border-radius:999px;border:1px solid var(--line);background:var(--paper);color:var(--ink);font:inherit;font-weight:700;cursor:pointer;}
.lf-show{flex:1;min-height:44px;padding:8px 18px;border-radius:999px;border:0;background:var(--teal-d);color:#fff;font:inherit;font-weight:800;cursor:pointer;}
/* the bottom sheet (phone) */
.lf-sheet{position:fixed;inset:auto 0 0 0;margin:0;width:100%;max-width:none;max-height:88vh;padding:0;border:0;border-radius:18px 18px 0 0;background:var(--paper);color:var(--ink);flex-direction:column;box-shadow:0 -10px 30px rgba(43,38,34,.18);}
.lf-sheet[open]{display:flex;}
.lf-sheet::backdrop{background:rgba(43,38,34,.45);}
.lf-sheethead{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--line);}
.lf-sheettitle{font-size:1.1rem;margin:0;}
.lf-x{width:44px;height:44px;border-radius:50%;border:0;background:transparent;color:var(--ink);font-size:1.6rem;line-height:1;cursor:pointer;}
.lf-sheetbody{padding:16px;overflow-y:auto;flex:1;}
.lf-sheetfoot,.lf-panelfoot{display:flex;gap:10px;padding:12px 16px;border-top:1px solid var(--line);background:var(--paper);}
.lf-panelfoot{padding:12px 0 0;margin-top:6px;}
.lf-sheetfoot:empty{display:none;}
/* desktop: Zillow's row, each a dropdown button; Sort on the right */
@media (min-width:720px){
  .lf-phone{display:none;}
  .lf-desk{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:8px;}
  .lf-groups{display:flex;flex-wrap:wrap;gap:8px;}
  .lf-dd{position:relative;}
  .lf-panel{position:absolute;z-index:30;top:calc(100% + 6px);left:0;min-width:300px;max-width:min(420px,90vw);max-height:70vh;overflow-y:auto;padding:16px;border-radius:14px;border:1px solid var(--line);background:var(--paper);box-shadow:var(--shadow);}
  .lf-panel-r{left:auto;right:0;min-width:240px;}
  .lf-panel[hidden]{display:none;}
}
@media (max-width:719px){ .lf-panel{display:none;} }

/* A category page's cards (slice 3): the bar hides a card with the hidden attribute, which the site's own card rule must not override. */
.listing-grid > li[hidden] { display: none; }
.lf-gridline { margin: .5rem 0 1rem; }

/* Near a place (brief 48, slice 2) */
.lf-find{margin-top:.6rem;width:100%;justify-content:center;}
.lf-nearmsg{margin:.4rem 0 0;font-size:.84rem;min-height:1.2em;color:var(--soft);}
.lf-hint{margin:.4rem 0 0;font-size:.8rem;color:var(--soft);}
