/* BSK Property Listings 1.5.0: search bar, custom dropdowns, results tabs, save-search panel.
   Loaded after bskpl.css, only on pages that show the search (directory, home search, agency pages).
   Every rule is scoped to .bskpl. Colours come from the tokens below and from bskpl.css, so the BSK logo
   colours can be changed in one place later. */

.bskpl {
  /* Search tokens (1.5.0). Owner's design layout; BSK colours replace these after the logo arrives. */
  --s-accent: var(--g);
  --s-accent-hover: #237528;
  --s-soft: #eef8ee;
  --s-soft-hover: #f1f8e9;
  --s-soft-on: #e8f5e9;
  --s-line: #d5dbe3;
  --s-field-h: 46px;
  --s-radius: 6px;
  --s-radius-lg: 10px;
  --s-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .05);
  --s-pop-shadow: 0 14px 32px rgba(16, 24, 40, .18);
  --s-dark: #111827;
  --s-dark-2: #1f2937;
}

/* ---------- Custom dropdown ----------
   The native select stays in the form. With JavaScript it is hidden and a button shows the choice,
   so the form still works without JavaScript. */
.bskpl-dd { position: relative; min-width: 0; }
.bskpl.is-js .bskpl-dd-src {
  position: absolute !important; left: 0; top: 0; width: 1px !important; height: 1px !important; min-width: 0 !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; overflow: hidden;
}
.bskpl-dd-btn {
  display: none;
  align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; min-height: var(--s-field-h); padding: 0 12px;
  border: 1px solid var(--s-line); border-radius: var(--s-radius); background: #fff; color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 400; text-align: left; cursor: pointer;
}
.bskpl.is-js .bskpl-dd-btn { display: flex; }
.bskpl-dd-btn:hover { border-color: #b7c0cc; }
.bskpl-dd-btn[aria-expanded="true"] { border-color: var(--g-brand); outline: 2px solid var(--g-brand); outline-offset: 0; }
.bskpl-dd-btn:disabled { background: #f3f5f8; color: #9aa4b1; cursor: not-allowed; }
.bskpl-dd-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bskpl-dd.is-empty .bskpl-dd-val { color: var(--muted); }
.bskpl-dd.is-set .bskpl-dd-btn { border-color: #9fd3a3; background: var(--s-soft); }
.bskpl-dd-chev { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.bskpl-dd-menu {
  position: absolute; z-index: 1000; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 220px; overflow-y: auto; margin: 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid var(--s-line); border-radius: var(--s-radius); box-shadow: var(--s-pop-shadow);
}
.bskpl-dd-menu[hidden] { display: none; }
.bskpl-dd-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 38px; padding: 8px 10px; border-radius: 4px; cursor: pointer; font-size: 15px; color: var(--ink);
}
.bskpl-dd-opt:hover, .bskpl-dd-opt:focus { background: var(--s-soft-hover); outline: none; }
.bskpl-dd-opt[aria-selected="true"] { background: var(--s-soft-on); font-weight: 700; color: var(--g); }
.bskpl-dd-opt.is-child { padding-left: 24px; color: #3a4350; }
.bskpl-dd-opt.is-placeholder { color: var(--muted); }

/* ---------- Home search bar ([bsk_search]) ---------- */
.bskpl-hs {
  background: #fff; border: 1px solid var(--line); border-radius: var(--s-radius-lg); box-shadow: var(--s-shadow);
  margin-top: 16px; overflow: hidden;
}
/* Photo band. The shortcode sets the photo in --bskpl-hero-img. Height and position come from admin settings in 1.7.0. */
.bskpl-hs-hero {
  position: relative; display: grid; align-content: end; gap: 14px; min-height: var(--bskpl-hero-h, 200px);
  padding: 24px 22px 22px; color: #fff; background-color: #1f2937;
  background-image: linear-gradient(180deg, rgba(10, 20, 15, .22) 0%, rgba(10, 20, 15, .68) 100%), var(--bskpl-hero-img, none);
  background-size: cover; background-position: center 40%;
}
.bskpl .bskpl-hs-hero .bskpl-hs-title { margin: 0; font-size: 26px; color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.bskpl .bskpl-hs-hero .bskpl-hs-tab { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); color: #fff; }
.bskpl .bskpl-hs-hero .bskpl-hs-tab.is-link { color: #fff; }
.bskpl .bskpl-hs-hero .bskpl-hs-tab.on, .bskpl .bskpl-hs-hero .bskpl-hs-tab:has(input:checked) { background: var(--s-accent); border-color: var(--s-accent); }
.bskpl .bskpl-hs-hero .bskpl-hs-tab.is-soon { color: rgba(255, 255, 255, .75); background: rgba(0, 0, 0, .18); border-style: dashed; }
.bskpl .bskpl-hs-hero .bskpl-hs-tab small { background: rgba(255, 255, 255, .2); color: #fff; }
.bskpl .bskpl-hs-hero .bskpl-hs-tab.is-link:hover { border-color: #fff; color: #fff; }
.bskpl-hs-fields { display: grid; gap: 12px; padding: 16px; }
@media (max-width: 720px) {
  .bskpl-hs-hero { min-height: var(--bskpl-hero-h-phone, 150px); padding: 18px 14px 14px; }
  .bskpl .bskpl-hs-hero .bskpl-hs-title { font-size: 22px; }
  .bskpl-hs-fields { padding: 12px; }
}
.bskpl .bskpl-hs-title { font-size: 20px; font-weight: 900; line-height: 1.25; margin: 0 0 12px; }
/* The directory bar sets column spans for its own grid. The home card lays its fields out with its own rows. */
.bskpl .bskpl-hs .bskpl-f { grid-column: auto; }
.bskpl .bskpl-hs-tab.is-link { color: var(--ink); }
.bskpl-hs-form { display: grid; gap: 0; }
.bskpl-hs-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.bskpl-hs-tab {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--s-line); border-radius: var(--s-radius); background: #fff; color: var(--ink);
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
}
.bskpl-hs-tab input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bskpl-hs-tab input:focus-visible + span { outline: 2px solid var(--g-brand); outline-offset: 3px; border-radius: 3px; }
.bskpl-hs-tab.on, .bskpl-hs-tab:has(input:checked), .bskpl-hs-tab.is-on { background: var(--s-accent); border-color: var(--s-accent); color: #fff; }
.bskpl-hs-tab.is-link:hover { border-color: var(--g-brand); color: var(--g); }
.bskpl-hs-tab.is-soon { color: #8a94a3; border-style: dashed; background: #fafbfc; cursor: default; }
.bskpl-hs-tab small {
  font-size: 11px; font-weight: 700; color: #6b7280; background: #eef1f4; border-radius: 999px; padding: 2px 8px;
}
.bskpl-hs-row { display: grid; gap: 10px; align-items: end; }
.bskpl-hs-row-top { grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) minmax(0, 1fr); }
.bskpl-hs-row-bottom { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, 1.5fr) minmax(0, 1fr); }
.bskpl-hs-go { display: grid; }
.bskpl-hs-go .bskpl-btn { width: 100%; min-height: var(--s-field-h); background: var(--s-accent); border-color: var(--s-accent); }
.bskpl-hs-go .bskpl-btn:hover { background: var(--s-accent-hover); border-color: var(--s-accent-hover); }
.bskpl-hs .bskpl-f { gap: 6px; }
.bskpl-hs .bskpl-f-label { font-size: 12px; }
.bskpl-hs .bskpl-f input[type="number"] { min-height: var(--s-field-h); }
.bskpl-hs .bskpl-range { grid-template-columns: 1fr 1fr 1.1fr; }
.bskpl-hs .bskpl-range.is-price { grid-template-columns: 1fr 1fr; }
.bskpl-promo {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 16px; border-radius: var(--s-radius-lg);
  background: linear-gradient(90deg, var(--s-dark-2), var(--s-dark)); color: #fff;
}
.bskpl-hs > .bskpl-promo { margin: 0; border-radius: 0; }
.bskpl-promo p { margin: 0; font-size: 15px; font-weight: 700; }
.bskpl-promo p span { color: #7fd186; }
.bskpl-promo a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--s-radius);
  background: var(--s-accent); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none;
}
.bskpl-promo a:hover { background: var(--s-accent-hover); color: #fff; }

/* ---------- Directory search bar (restyled) ---------- */
.bskpl-searchbar { box-shadow: var(--s-shadow); border-radius: var(--s-radius-lg); }
.bskpl-tabs-purpose { gap: 6px; margin-bottom: 12px; }
.bskpl-tab span { min-height: 40px; border-radius: var(--s-radius); border-color: var(--s-line); }
.bskpl-tab:has(input:checked) span { background: var(--s-accent); border-color: var(--s-accent); color: #fff; }
.bskpl-tab input:checked + span { background: var(--s-accent); border-color: var(--s-accent); color: #fff; }
.bskpl-f select, .bskpl-f input[type="number"], .bskpl-f input[type="search"] { border-color: var(--s-line); border-radius: var(--s-radius); }
.bskpl-agency-select { width: 100%; }
.bskpl-hp-note { font-size: 13px; color: var(--muted); }

/* ---------- Results: sub-tabs, bed and bath rolls, cross-purpose link, save search ---------- */
.bskpl-results-tools { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.bskpl-subtabs {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 14px 0 0; padding: 0;
}
.bskpl-subtabs a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; white-space: nowrap;
  border: 1px solid var(--s-line); border-radius: 999px; background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 700; text-decoration: none;
}
.bskpl-subtabs a b { font-weight: 700; color: var(--muted); }
.bskpl-subtabs a:hover { border-color: var(--g-brand); color: var(--g); }
.bskpl-subtabs a[aria-current="true"] { background: var(--s-accent); border-color: var(--s-accent); color: #fff; }
.bskpl-subtabs a[aria-current="true"] b { color: #e8f5e9; }
.bskpl-rolls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 0; }
.bskpl-rolls-label { font-size: 13px; font-weight: 700; color: var(--muted); min-width: 52px; }
.bskpl-rolls ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.bskpl-rolls a {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 11px; border-radius: var(--s-radius); white-space: nowrap;
  border: 1px solid var(--s-line); background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none;
}
.bskpl-rolls a:hover { border-color: var(--g-brand); color: var(--g); }
.bskpl-rolls a[aria-current="true"] { background: var(--s-soft); border-color: #9fd3a3; color: var(--g); }
.bskpl-cross { margin: 12px 0 0; font-size: 14px; }
.bskpl-cross a { font-weight: 700; color: var(--g); }

.bskpl-savesearch { position: relative; }
.bskpl-savesearch > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px;
  border: 1px solid var(--s-accent); border-radius: var(--s-radius); background: #fff; color: var(--g);
  font-size: 14px; font-weight: 700;
}
.bskpl-savesearch > summary::-webkit-details-marker { display: none; }
.bskpl-savesearch > summary:hover { background: var(--s-soft); }
.bskpl-savesearch > summary .bskpl-i { width: 16px; height: 16px; }
.bskpl-savesearch[open] > summary { background: var(--s-soft); }
.bskpl-savesearch-panel {
  position: absolute; z-index: 40; right: 0; top: calc(100% + 8px); width: min(360px, 88vw);
  display: grid; gap: 8px; padding: 14px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--s-radius-lg); box-shadow: var(--s-pop-shadow);
}
.bskpl-savesearch-panel h3 { font-size: 16px; font-weight: 900; margin: 0; }
.bskpl-savesearch-panel p { font-size: 13px; color: var(--muted); margin: 0; }
.bskpl-savesearch-panel label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.bskpl-savesearch-panel input[type="email"] {
  font: inherit; font-size: 15px; font-weight: 400; width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid var(--s-line); border-radius: var(--s-radius); background: #fff; color: var(--ink);
}
.bskpl-savesearch-panel .bskpl-btn { width: 100%; }
.bskpl-alert-hidden { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Phone ---------- */
@media (max-width: 1020px) {
  .bskpl-hs-row-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bskpl-hs-row-top .bskpl-f-type { grid-column: span 2; }
  .bskpl-hs-row-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bskpl-hs-row-bottom .bskpl-hs-go { grid-column: span 2; }
}
@media (max-width: 720px) {
  .bskpl-hs { padding: 14px; }
  .bskpl-hs-tab { min-height: 38px; padding: 0 12px; font-size: 14px; }
  .bskpl-hs-row-top, .bskpl-hs-row-bottom { grid-template-columns: minmax(0, 1fr); }
  .bskpl-hs-row-top .bskpl-f-type, .bskpl-hs-row-bottom .bskpl-hs-go { grid-column: auto; }
  .bskpl-promo { padding: 12px; }
  .bskpl-results-tools { width: 100%; }
  .bskpl-savesearch-panel { right: auto; left: 0; }
  .bskpl-subtabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .bskpl-subtabs a { flex: 0 0 auto; }
}
