/* Betts Team home search. Uses the theme's colors and type. */
.bs { --bar: #fff; display: flex; flex-direction: column; height: calc(100vh - var(--header-h, 84px)); min-height: 560px; background: var(--bone, #f6f4ef); color: var(--text, #1d2430); font-family: var(--sans, system-ui, sans-serif); }
.admin-bar .bs { height: calc(100vh - var(--header-h, 84px) - 32px); }
.bs *, .bs *::before, .bs *::after { box-sizing: border-box; }
.bs [hidden] { display: none !important; }

/* Search bar */
.bs-bar { background: var(--bar); border-bottom: 1px solid var(--line, #dcd8cf); padding: 14px 20px 12px; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.bs-ask { flex: 1 1 420px; display: flex; min-width: 0; border: 1px solid var(--ink, #0b1322); }
.bs-ask input { flex: 1; min-width: 0; height: 48px; border: 0; padding: 0 16px; font: 300 1rem var(--sans, sans-serif); color: var(--ink, #0b1322); background: #fff; outline-offset: -2px; }
.bs-ask input::placeholder { color: #8a8f9a; }
.bs-go { border: 0; background: var(--red, #b02a30); color: #fff; padding: 0 26px; font: 500 .72rem var(--sans, sans-serif); letter-spacing: .24em; text-transform: uppercase; cursor: pointer; }
.bs-go:hover { background: var(--red-dark, #8f2026); }
.bs-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bs-filters select { height: 40px; border: 1px solid var(--line, #dcd8cf); background: #fff; color: var(--ink, #0b1322); padding: 0 30px 0 12px; font: 400 .85rem var(--sans, sans-serif); border-radius: 0; cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #6a7180 50%), linear-gradient(135deg, #6a7180 50%, transparent 50%); background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.bs-filters select:hover { border-color: var(--ink, #0b1322); }
.bs-clear, .bs-link { border: 0; background: none; color: var(--navy, #18335f); font: 400 .85rem var(--sans, sans-serif); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 6px; }

/* Body: list beside map */
.bs-view { display: none; }
.bs-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.bs-list { overflow-y: auto; padding: 18px 20px 28px; }
.bs-mapwrap { position: relative; min-height: 0; border-left: 1px solid var(--line, #dcd8cf); }
.bs-map { position: absolute; inset: 0; background: #e8e6e0; z-index: 0; }
.bs-follow { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 500; background: #fff; padding: 7px 14px; font-size: .8rem; box-shadow: 0 2px 10px rgba(11, 19, 34, .18); white-space: nowrap; cursor: pointer; }
.bs-follow input { margin-right: 6px; accent-color: var(--red, #b02a30); }

.bs-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; margin-bottom: 14px; }
.bs-count { margin: 0; font: 400 1.5rem var(--serif, Georgia, serif); color: var(--ink, #0b1322); }
.bs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bs-chip { border: 1px solid var(--line, #dcd8cf); background: #fff; padding: 3px 10px; font-size: .76rem; letter-spacing: .04em; color: var(--ink, #0b1322); }
.bs-loading .bs-cards { opacity: .45; transition: opacity .15s; }

/* Cards */
.bs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.bs-card { display: flex; flex-direction: column; background: #fff; color: inherit; text-decoration: none; border: 1px solid var(--line, #dcd8cf); transition: box-shadow .2s, transform .2s; }
.bs-card:hover { color: inherit; box-shadow: 0 10px 30px rgba(11, 19, 34, .14); transform: translateY(-2px); }
.bs-photo { position: relative; aspect-ratio: 3 / 2; background: #e3dfd6; overflow: hidden; }
.bs-photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.bs-nophoto { position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: #8a8f9a; }
.bs-badge { position: absolute; top: 12px; left: 12px; background: var(--ink, #0b1322); color: #fff; padding: 4px 10px; font: 500 .64rem var(--sans, sans-serif); letter-spacing: .2em; text-transform: uppercase; }
.bs-badge.bs-new { background: var(--red, #b02a30); }
.bs-badge.bs-pending { background: #fff; color: var(--ink, #0b1322); }
.bs-info { padding: 14px 16px 14px; }
.bs-info p { margin: 0; }
.bs-price { font: 400 1.5rem/1.2 var(--serif, Georgia, serif); color: var(--ink, #0b1322); }
.bs-price s, .bs-dprice s { font: 300 .85rem var(--sans, sans-serif); color: var(--muted, #6a7180); margin-left: 6px; }
.bs-facts { margin-top: 4px !important; font-size: .88rem; color: var(--text, #1d2430); }
.bs-facts b { font-weight: 600; }
.bs-addr { margin-top: 8px !important; font-size: .88rem; line-height: 1.5; }
.bs-office { margin-top: 10px !important; padding-top: 8px; border-top: 1px solid var(--line, #dcd8cf); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #6a7180); }
.bs-more { text-align: center; margin: 26px 0 6px; }
.bs-empty { grid-column: 1 / -1; background: #fff; border: 1px solid var(--line, #dcd8cf); padding: 40px 28px; text-align: center; }
.bs-legal { margin: 22px 0 0; font-size: .72rem; line-height: 1.6; color: var(--muted, #6a7180); }

/* Map pins */
.bs-pin { background: none; border: 0; }
.bs-pin span { display: block; background: var(--ink, #0b1322); color: #fff; font: 500 11px/24px var(--sans, sans-serif); text-align: center; border: 1px solid #fff; box-shadow: 0 2px 6px rgba(11, 19, 34, .3); white-space: nowrap; }
.bs-pin:hover span, .bs-pin.is-hot span { background: var(--red, #b02a30); }
.bs-pin.is-hot { z-index: 9999 !important; }
.bs .marker-cluster { background: rgba(24, 51, 95, .22); border-radius: 50%; }
.bs .marker-cluster div { width: 30px; height: 30px; margin: 5px; border-radius: 50%; background: var(--navy, #18335f); color: #fff; font: 500 12px/30px var(--sans, sans-serif); text-align: center; }
.bs .leaflet-container { font-family: var(--sans, sans-serif); }

/* One home */
.bs-lock { overflow: hidden; }
.bs-detail { position: fixed; inset: 0; z-index: 1000; background: rgba(11, 19, 34, .6); display: flex; justify-content: flex-end; }
.bs-sheet { position: relative; width: min(820px, 100%); height: 100%; overflow-y: auto; background: #fff; outline: 0; animation: bs-in .22s ease-out; }
@keyframes bs-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bs-sheet { animation: none; } .bs-card { transition: none; } }
.bs-x { position: sticky; top: 12px; float: right; margin: 12px 12px -56px 0; z-index: 5; width: 44px; height: 44px; border: 0; background: var(--ink, #0b1322); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.bs-gallery { position: relative; background: var(--ink, #0b1322); aspect-ratio: 3 / 2; }
.bs-gallery img { width: 100%; height: 100%; max-width: none; object-fit: contain; display: block; }
.bs-prev, .bs-next { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 62px; border: 0; background: rgba(11, 19, 34, .55); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.bs-prev { left: 0; } .bs-next { right: 0; }
.bs-prev:hover, .bs-next:hover { background: var(--red, #b02a30); }
.bs-n { position: absolute; right: 12px; bottom: 12px; background: rgba(11, 19, 34, .7); color: #fff; padding: 3px 10px; font-size: .76rem; letter-spacing: .08em; }
.bs-d { padding: 26px clamp(20px, 4vw, 40px) 40px; }
.bs-d h3 { margin: 30px 0 10px; font-size: 1.3rem; }
.bs-status { margin: 0 0 4px; font: 500 .7rem var(--sans, sans-serif); letter-spacing: .28em; text-transform: uppercase; color: var(--red, #b02a30); }
.bs-dprice { margin: 0 0 6px; font-size: clamp(2rem, 4vw, 2.8rem); }
.bs-daddr { margin: 0 0 8px; font-size: 1.05rem; line-height: 1.5; }
.bs-dfacts { font-size: 1rem; margin-bottom: 20px !important; }
.bs-d .btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.bs-remarks { white-space: pre-line; max-width: 68ch; }
.bs-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 28px; margin: 0; }
.bs-dl div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line, #dcd8cf); font-size: .9rem; }
.bs-dl dt { color: var(--muted, #6a7180); }
.bs-dl dd { margin: 0; text-align: right; font-weight: 500; color: var(--ink, #0b1322); }
.bs-wait { padding: 80px 30px; text-align: center; color: var(--muted, #6a7180); }

/* Phones and small tablets: one pane at a time */
@media (max-width: 900px) {
  .bs { height: auto; min-height: 0; }
  .admin-bar .bs { height: auto; }
  .bs-bar { padding: 12px 14px 10px; }
  .bs-ask { flex-basis: 100%; }
  .bs-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; width: 100%; -webkit-overflow-scrolling: touch; }
  .bs-filters select { flex: 0 0 auto; }
  .bs-view { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-bottom: 1px solid var(--line, #dcd8cf); }
  .bs-view button { height: 44px; border: 0; background: none; font: 500 .72rem var(--sans, sans-serif); letter-spacing: .24em; text-transform: uppercase; color: var(--muted, #6a7180); border-bottom: 2px solid transparent; cursor: pointer; }
  .bs-view button[aria-selected="true"] { color: var(--ink, #0b1322); border-bottom-color: var(--red, #b02a30); }
  .bs-body { display: block; }
  .bs-list { overflow: visible; padding: 16px 14px 24px; }
  .bs-body[data-view="map"] .bs-list { display: none; }
  .bs-body[data-view="list"] .bs-mapwrap { display: none; }
  .bs-mapwrap { height: calc(100vh - var(--header-h, 84px) - 170px); min-height: 380px; border-left: 0; }
  .bs-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* What a search asked for and a listing has */
.bs-sub { flex-basis: 100%; margin: 0; font-size: .86rem; color: var(--muted, #6a7180); }
.bs-hits { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px !important; }
.bs-hits span { border: 1px solid var(--line, #dcd8cf); padding: 2px 8px; font-size: .7rem; letter-spacing: .04em; color: var(--ink, #0b1322); background: var(--bone, #f6f4ef); }
.bs-hits span.is-photo { border-color: var(--navy, #18335f); background: var(--navy, #18335f); color: #fff; }
.bs-seen { margin-top: 0 !important; }
.bs-seen span { font-size: .78rem; padding: 4px 10px; }

/* Match score in the corner of a card */
.bs-match { position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, .95); color: var(--ink, #0b1322); padding: 4px 10px; font: 400 .66rem var(--sans, sans-serif); letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 2px 8px rgba(11, 19, 34, .2); }
.bs-match b { font: 500 .95rem var(--serif, Georgia, serif); letter-spacing: 0; margin-right: 3px; }
.bs-match.is-full { background: var(--red, #b02a30); color: #fff; }

/* Showing request and question form inside a listing */
.bs-ask-form { margin-top: 22px; padding: 22px; background: var(--bone, #f6f4ef); border: 1px solid var(--line, #dcd8cf); }
.bs-ask-form h3 { margin: 0 0 14px; }
.bs-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.bs-fields label { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #6a7180); }
.bs-fields .bs-wide, .bs-fields .bs-when { grid-column: 1 / -1; }
.bs-fields input, .bs-fields textarea { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid var(--line, #dcd8cf); background: #fff; font: 300 1rem var(--sans, sans-serif); color: var(--ink, #0b1322); letter-spacing: 0; text-transform: none; border-radius: 0; }
.bs-fields input:focus, .bs-fields textarea:focus { border-color: var(--ink, #0b1322); outline-offset: 0; }
.bs-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bs-consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 16px; font-size: .74rem; line-height: 1.55; color: var(--muted, #6a7180); }
.bs-consent input { margin-top: 3px; accent-color: var(--red, #b02a30); flex: none; }
.bs-ask-form .btn-row { align-items: center; }
.bs-ask-msg { font-size: .86rem; color: var(--red, #b02a30); }
.bs-ask-done { margin: 0; outline: 0; }
@media (max-width: 560px) { .bs-fields { grid-template-columns: 1fr; } .bs-ask-form { padding: 16px; } }

/* Listings drawn on the server: city pages and listing pages */
.bs-static { margin: 0 0 28px; }
.bs-static-title { margin: 0 0 18px; }
.bs-static .btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.bs-cityfacts { margin-top: 34px; padding: 24px 26px; background: var(--bone, #f6f4ef); border-left: 3px solid var(--red, #b02a30); }
.bs-cityfacts h3 { margin: 0 0 8px; }
.bs-cityfacts p { margin: 0 0 8px; max-width: 78ch; }
.bs-page { padding: clamp(24px, 4vw, 48px) 0 clamp(48px, 6vw, 90px); }
.bs-page .wrap { max-width: 1080px; }
.bs-page .bs-gallery { max-height: 72vh; }
.bs-page .bs-d { padding-left: 0; padding-right: 0; }
.bs-page p.bs-dprice { margin: 0 0 6px; font: 400 clamp(2rem, 4vw, 2.8rem)/1.1 var(--serif, Georgia, serif); color: var(--ink, #0b1322); }
.bs-page .h3, .bs-ask-form .h3 { font-size: 1.35rem; margin: 30px 0 10px; }
.bs-crumbs { font-size: .78rem; letter-spacing: .08em; color: #aab3c4; margin-bottom: 10px; }
.bs-crumbs a { color: #d5dbe6; }
.bs-open { margin: 0 0 10px; font-size: .86rem; }

/* Save this search */
.bs-save-open { min-height: 36px; padding: 8px 16px; margin-left: auto; }
.bs-savebox { position: fixed; inset: 0; z-index: 1000; background: rgba(11, 19, 34, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.bs-savebox .bs-sheet { height: auto; max-height: 92vh; width: min(560px, 100%); }
.bs-save-name { font-size: .9rem; color: var(--muted, #6a7180); }
.bs-fields select { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--line, #dcd8cf); background: #fff; font: 300 1rem var(--sans, sans-serif); border-radius: 0; }
/* My searches page */
.bs-my { max-width: 860px; }
.bs-notice { padding: 14px 18px; background: var(--bone, #f6f4ef); border-left: 3px solid var(--red, #b02a30); }
.bs-saved { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line, #dcd8cf); }
.bs-saved h3 { margin: 0 0 4px; font-size: 1.15rem; }
.bs-saved .fine { margin: 0; }
.bs-saved-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bs-saved-actions select { height: 44px; border: 1px solid var(--line, #dcd8cf); padding: 0 10px; background: #fff; }
.bs-saved-actions .btn { min-height: 44px; padding: 10px 18px; }

/* Saved homes and sign-up */
.bs-savebox { z-index: 1001; }
.bs-save-form .bs-join-only { display: none; }
.bs-save-form.is-join .bs-join-only { display: block; }
.bs-save-form.is-join .bs-save-only { display: none; }
.bs-radios { border: 0; padding: 0; margin: 0; grid-column: 1 / -1; }
.bs-radios legend { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #6a7180); margin-bottom: 6px; }
.bs-radios label { display: flex; gap: 8px; align-items: center; font-size: .92rem; letter-spacing: 0; text-transform: none; color: var(--ink, #0b1322); margin: 4px 0; }
.bs-heart { position: absolute; bottom: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #8a8f9a; font-size: 20px; line-height: 40px; cursor: pointer; box-shadow: 0 2px 8px rgba(11, 19, 34, .25); padding: 0; }
.bs-heart:hover, .bs-heart.is-on { color: var(--red, #b02a30); }
.bs-heart-btn.is-on { background: var(--red, #b02a30); border-color: var(--red, #b02a30); color: #fff; }
.bs-teaser { display: inline; color: var(--ink, #0b1322); }
.bs-welcome { flex-basis: 100%; margin: 6px 0 0; }
.bs-fav-wrap { display: flex; flex-direction: column; gap: 6px; }

/* Our listings: one row that scrolls sideways */
.bs-carousel { position: relative; }
.bs-carousel .bs-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 36px) / 3); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.bs-carousel .bs-cards::-webkit-scrollbar { display: none; }
.bs-carousel .bs-cards:focus-visible { outline: 2px solid var(--navy, #18335f); outline-offset: 4px; }
.bs-carousel .bs-card { scroll-snap-align: start; }
.bs-car-btn { position: absolute; top: 34%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line, #dcd8cf); background: #fff; color: var(--ink, #0b1322); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(11, 19, 34, .18); z-index: 2; }
.bs-car-btn[hidden] { display: none; }
.bs-car-btn:hover { background: var(--bone, #f6f4ef); }
.bs-car-prev { left: -14px; }
.bs-car-next { right: -14px; }
@media (max-width: 1000px) { .bs-carousel .bs-cards { grid-auto-columns: calc((100% - 18px) / 2); } }
@media (max-width: 640px) {
  .bs-carousel .bs-cards { grid-auto-columns: 82%; }
  .bs-car-btn { display: none; }
}
