/* =========================================================
   Wildwood Rental Hub — Search Rentals page
   Search bar on top, big map on the left, rentals on the right.
   ========================================================= */
[hidden] { display: none !important; }
.srch { background: var(--bg); position: relative; }

/* ---------- Search bar (light band under the dark menu) ---------- */
.srch-top { background: linear-gradient(180deg, #D4ECEC 0%, #E4EFF6 100%); border-bottom: 1px solid #c9dfe3; padding: 18px 0 14px; position: relative; z-index: 950; }
.srch-top__inner { position: relative; padding: 0 24px; max-width: 1480px; margin: 0 auto; }
.srch-bar { position: relative; display: flex; align-items: center; max-width: 1080px; margin: 0 auto; background: #fff; border: 1px solid #b9d3da; border-radius: 999px; box-shadow: 0 8px 24px rgba(16,40,68,.14); padding: 4px; }
.srch-field { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 16px; border-radius: 999px; cursor: pointer; position: relative; }
.srch-field + .srch-field::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--border); }
.srch-field:hover { background: var(--bg); }
.srch-field:hover::before, .srch-field:hover + .srch-field::before, .srch-field:focus-within::before, .srch-field:focus-within + .srch-field::before { opacity: 0; }
.srch-field--loc { flex-grow: 1.3; padding-left: 20px; }
.srch-field > span { font-size: .75rem; font-weight: 700; letter-spacing: .02em; color: var(--navy); }
.srch-field select, .srch-field input { border: 0; padding: 0; background: transparent; font: 500 14.5px/1.3 var(--font-body, 'Inter', sans-serif); color: var(--text-muted); width: 100%; min-width: 0; cursor: pointer; }
.srch-field select:focus, .srch-field input:focus { outline: none; color: var(--text); }
.srch-field:focus-within { background: var(--teal-light); }
.srch-filters-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0 16px; margin: 0 6px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--navy); font: 700 .9rem var(--font-body, 'Inter', sans-serif); cursor: pointer; white-space: nowrap; flex: none; }
.srch-filters-btn:hover, .srch-filters-btn[aria-expanded="true"] { border-color: var(--navy); background: var(--navy-light); }
.srch-filters-btn:focus-visible { outline: 3px solid #F7C948; outline-offset: 2px; }
.srch-filters-btn__n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--teal); color: #fff; font-size: .75rem; }
.srch-go { flex: none; height: 42px; min-height: 0; padding: 0 24px; border-radius: 999px; font-size: .95rem; }

/* Feature buttons: one full row, scrolls sideways when there are more */
.srch-quick-wrap { position: relative; max-width: 1480px; margin: 14px auto 0; }
.srch-quick { display: flex; gap: 7px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 2px 0; }
.srch-quick::-webkit-scrollbar { display: none; }
.srch-chip { position: relative; cursor: pointer; flex: none; }
.srch-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.srch-chip span { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid #b9d3da; background: #fff; color: var(--navy); font-size: .85rem; font-weight: 600; white-space: nowrap; box-shadow: 0 1px 3px rgba(16,40,68,.08); transition: background .15s, color .15s, border-color .15s; }
.srch-chip:hover span { border-color: var(--teal); background: #f4fbfb; }
.srch-chip:first-child { margin-left: auto; }
.srch-chip:last-child { margin-right: auto; }
.srch-chip input:checked + span { background: var(--teal); color: #fff; border-color: var(--teal); }
.srch-chip input:focus-visible + span { outline: 3px solid #F7C948; outline-offset: 2px; }
.srch-quick__arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--navy); font-size: 1.3rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.srch-quick__arrow--prev { left: 0; }
.srch-quick__arrow--next { right: 0; }
.srch-quick-wrap::before, .srch-quick-wrap::after { content: ''; position: absolute; top: 0; bottom: 0; width: 36px; pointer-events: none; z-index: 1; }
.srch-quick-wrap::after { right: 0; background: linear-gradient(90deg, rgba(228,239,246,0), #E4EFF6 80%); }
.srch-quick-wrap:has(.srch-quick__arrow--prev:not([hidden]))::before { left: 0; background: linear-gradient(270deg, rgba(228,239,246,0), #E4EFF6 80%); }
.srch-quick-wrap:has(.srch-quick__arrow--next[hidden])::after { display: none; }

/* ---------- "Filters" panel ---------- */
.srch-more { position: absolute; top: calc(100% + 10px); right: 0; width: min(720px, calc(100vw - 48px)); max-height: calc(100vh - var(--navh, 88px) - 110px); display: flex; flex-direction: column; background: #fff; color: var(--text); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.28); z-index: 960; overflow: hidden; }
.srch-more__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.srch-more__head h2 { font-size: 1.1rem; margin: 0; }
.srch-more__close { border: 0; background: none; font-size: 1.8rem; line-height: 1; color: var(--text-muted); cursor: pointer; min-width: 44px; min-height: 44px; margin-right: -10px; }
.srch-more__body { overflow: auto; padding: 18px 20px; display: grid; gap: 18px; }
.srch-more__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.srch-select { display: flex; flex-direction: column; gap: 5px; }
.srch-select > span { font-size: .8rem; font-weight: 700; color: var(--navy); }
.srch-select select, .srch-select input { width: 100%; padding: 10px 12px; border: 1.5px solid #cdd6df; border-radius: 10px; background: #fff; font: 500 15px var(--font-body, 'Inter', sans-serif); color: var(--text); box-sizing: border-box; }
.srch-select select:focus, .srch-select input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,139,139,.18); }
.srch-more__amen { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.srch-more__amen legend { font-size: .8rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; padding: 0; }
.srch-check { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: .93rem; cursor: pointer; }
.srch-check input { width: 18px; height: 18px; accent-color: var(--teal); flex: none; }
.srch-more__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); background: #fff; }
.srch-clear { border: 0; background: none; font: 700 .95rem var(--font-body, 'Inter', sans-serif); color: var(--navy); text-decoration: underline; cursor: pointer; min-height: 44px; }

/* ---------- Map + results ---------- */
.srch-body { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); align-items: start; }
.srch-map { position: sticky; top: var(--navh, 88px); height: calc(100vh - var(--navh, 88px)); border-right: 1px solid var(--border); background: #dfe7ee; }
.srch-map__canvas { width: 100%; height: 100%; background: #dfe7ee; }
.srch-map__note { position: absolute; left: 12px; right: 12px; bottom: 26px; z-index: 500; margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.95); color: var(--navy); font-size: .84rem; font-weight: 600; box-shadow: 0 2px 10px rgba(0,0,0,.15); text-align: center; }
.srch-map__fail { padding: 2rem; text-align: center; color: var(--text-muted); }
.srch-results { padding: 20px 24px 48px; min-width: 0; }
.srch-results__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.srch-results__title { font-size: 1.35rem; margin: 0; color: var(--navy); }
.srch-results__sub { margin: 4px 0 0; color: var(--text-muted); font-size: .9rem; }
.srch-sort { display: flex; flex-wrap: wrap; gap: 6px; }
.srch-sort__btn { padding: 6px 12px; min-height: 34px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); font: 600 .84rem var(--font-body, 'Inter', sans-serif); cursor: pointer; }
.srch-sort__btn:hover { border-color: var(--navy); }
.srch-sort__btn.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.srch-sort__btn:focus-visible { outline: 3px solid #F7C948; outline-offset: 2px; }
.srch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.srch-grid > .empty-listings, .srch-grid > .loading-placeholder, .srch-grid > .srch-none { grid-column: 1 / -1; }
.srch-none { text-align: center; padding: 2.5rem 1.5rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.srch-none h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
.srch-none p { color: var(--text-muted); margin: 0 0 1rem; }

/* Price pins on the map */
.sw-price-pin { background: none; border: 0; }
.sw-price-pin span { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 8px)); display: block; padding: 7px 10px; border-radius: 999px; background: #fff; color: var(--navy); border: 1px solid rgba(0,0,0,.1); box-shadow: 0 2px 8px rgba(0,0,0,.28); font: 800 13px/1 var(--font-body, 'Inter', sans-serif); white-space: nowrap; cursor: pointer; transition: transform .12s, background .12s, color .12s; }
.sw-price-pin span::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 9px; height: 9px; background: inherit; border-right: 1px solid rgba(0,0,0,.1); border-bottom: 1px solid rgba(0,0,0,.1); transform: translateX(-50%) rotate(45deg); }
.sw-price-pin.is-featured span { background: #F7C948; color: var(--navy); }
.sw-price-pin.is-hot span, .sw-price-pin:hover span, .sw-price-pin:focus span { background: var(--navy); color: #fff; transform: translate(-50%, calc(-100% - 8px)) scale(1.1); }
.sw-price-pin:focus { outline: none; }
.sw-price-pin:focus-visible span { outline: 3px solid #F7C948; outline-offset: 2px; }

/* Map / list switch (phones and small tablets) */
.srch-maptoggle { display: none; }

/* ---------- Tablets ---------- */
@media (max-width: 1100px) {
  .srch-top__inner { padding: 0 18px; }
  .srch-field { padding-left: 12px; padding-right: 12px; }
  .srch-field--loc { padding-left: 16px; }
  .srch-filters-btn { padding: 0 12px; margin: 0 4px; }
  .srch-go { padding: 0 16px; }
  .srch-body { grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); }
}
@media (max-width: 960px) {
  .srch-bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-radius: 18px; padding: 6px; gap: 2px 0; }
  .srch-field, .srch-field--loc { grid-column: span 2; border-radius: 12px; padding: 6px 12px; }
  .srch-field:nth-child(4)::before { display: none; }
  .srch-filters-btn { grid-column: span 2; margin: 4px 4px 0 0; }
  .srch-go { grid-column: span 2; margin-top: 4px; }
  .srch-filters-btn, .srch-go { height: 44px; }
}

/* ---------- Phones: list first, map one tap away ---------- */
@media (max-width: 899px) {
  .srch-body { grid-template-columns: minmax(0, 1fr); }
  .srch-map { display: none; position: relative; top: auto; height: calc(100vh - var(--navh, 72px)); height: calc(100dvh - var(--navh, 72px)); border-right: 0; }
  .srch--map .srch-map { display: block; }
  .srch--map .srch-results { display: none; }
  .srch-results { padding: 16px 16px 96px; }
  .srch-maptoggle { display: inline-flex; position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 900; align-items: center; gap: 6px; padding: 12px 22px; min-height: 48px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; font: 700 .95rem var(--font-body, 'Inter', sans-serif); box-shadow: 0 8px 24px rgba(0,0,0,.3); cursor: pointer; }
  .srch-maptoggle [data-when="map"] { display: none; }
  .srch--map .srch-maptoggle [data-when="map"] { display: inline; }
  .srch--map .srch-maptoggle [data-when="list"] { display: none; }
  body:has(.sw-demo-bar) .srch-maptoggle { bottom: 76px; }
  .srch-more { position: fixed; inset: 0; top: 0; right: 0; width: auto; max-height: none; border-radius: 0; z-index: 10000; }
  body.srch-more-open { overflow: hidden; }
  body.srch-more-open .srch-top { z-index: 10000; }
  .srch-more__foot { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 600px) {
  .srch-top { padding: 12px 0 10px; }
  .srch-top__inner { padding: 0 12px; }
  .srch-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .srch-field, .srch-field--loc { grid-column: span 1; }
  .srch-field--loc { grid-column: 1 / -1; }
  .srch-field::before { display: none; }
  .srch-filters-btn, .srch-go { grid-column: span 1; }
  .srch-field select, .srch-field input { font-size: 16px; }
  .srch-quick-wrap { margin: 10px -12px 0; }
  .srch-quick { padding: 2px 12px; }
  .srch-quick__arrow { display: none; }
  .srch-chip span { height: 40px; }
  .srch-results__head { align-items: flex-start; }
  .srch-sort { width: 100%; }
  .srch-sort__btn { min-height: 40px; }
  .srch-grid { gap: 14px; }
  .srch-more__amen { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (hover: none), (pointer: coarse) {
  .srch-quick__arrow { display: none !important; }
  .srch-field { padding-top: 6px; padding-bottom: 6px; }
  .srch-field select, .srch-field input { min-height: 44px; font-size: 16px; }
  .srch-check { min-height: 44px; }
  .srch-sort__btn { min-height: 40px; }
}
body:has(.sw-demo-bar) .srch-more { max-height: calc(100vh - var(--navh, 88px) - 170px); }
@media (max-width: 899px) { body:has(.sw-demo-bar) .srch-more { max-height: none; } }

/* Owner options under the results: Free, Featured, Full management */
.owner-options-search .owner-option-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.owner-option-card--featured { border: 1px solid #E8C25A; box-shadow: 0 0 0 1px #F2D68A, var(--shadow-sm); background: linear-gradient(180deg, #FFF8E5, #fff); }
.owner-option-card--featured span { background: #F7C948; color: var(--navy); }
.owner-option-card .btn { margin-top: auto; }
@media (max-width: 1024px) { .owner-options-search .owner-option-grid { grid-template-columns: minmax(0, 1fr); } }
