/* ==========================================================================
   Public search results page. Lives in the guest theme's visual language
   (Montserrat, Bootstrap grid, Font Awesome, rounded cards) — deliberately
   NOT the admin portal's design system.
   ========================================================================== */

.srch {
  --s-ink: #1b2330;
  --s-ink-2: #5c6675;
  --s-ink-3: #8b94a3;
  --s-line: #e7eaef;
  --s-soft: #f6f7f9;
  --s-brand: #1f7a5a;          /* overridden below from the theme if present */
  --s-radius: 16px;
  --s-shadow: 0 2px 10px rgba(20, 28, 40, .06);
  --s-shadow-lg: 0 18px 44px -14px rgba(20, 28, 40, .28);
  color: var(--s-ink);
}

/* ---------- sticky search bar ---------- */
.srch-bar {
  position: sticky; top: 0; z-index: 40;
  background: #fff; border-bottom: 1px solid var(--s-line);
  padding: 14px 0;
}
.srch-bar__grid {
  display: grid; gap: 10px; align-items: end;
  grid-template-columns: 1.2fr 1fr 1fr 1.1fr auto;
  background: #fff; border: 1px solid var(--s-line);
  border-radius: 999px; padding: 8px 8px 8px 22px;
  box-shadow: var(--s-shadow);
}
.srch-fld { position: relative; text-align: left; min-width: 0; }
.srch-fld__l { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--s-ink-3); margin-bottom: 2px; }
.srch-fld__v { font-size: 14px; font-weight: 500; color: var(--s-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srch-fld__v.is-empty { color: var(--s-ink-3); }
.srch-fld__btn { width: 100%; background: none; border: 0; padding: 6px 12px 6px 0; text-align: left; cursor: pointer; font: inherit; }
.srch-fld__btn:focus-visible { outline: 2px solid var(--s-brand); outline-offset: 3px; border-radius: 10px; }
.srch-bar__go {
  border: 0; border-radius: 999px; background: var(--s-brand); color: #fff;
  height: 52px; padding: 0 26px; font-weight: 700; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.srch-bar__go:hover { filter: brightness(.94); }
.srch-bar__go:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- popovers (dates, guests) ---------- */
.srch-pop {
  position: absolute; top: calc(100% + 14px); left: 0; z-index: 60;
  background: #fff; border: 1px solid var(--s-line); border-radius: 18px;
  box-shadow: var(--s-shadow-lg); padding: 18px;
  min-width: 320px;
}
.srch-pop--right { left: auto; right: 0; }
.srch-pop--up { top: auto; bottom: calc(100% + 14px); }

/* ---------- calendar ---------- */
.srch-cal { display: flex; gap: 26px; flex-wrap: wrap; }
.srch-cal__m { min-width: 268px; }
.srch-cal__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.srch-cal__t { font-weight: 700; font-size: 15px; }
.srch-cal__nav { background: none; border: 1px solid var(--s-line); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--s-ink-2); }
.srch-cal__nav:disabled { opacity: .35; cursor: not-allowed; }
.srch-cal__g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.srch-cal__dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--s-ink-3); padding-bottom: 6px; }
.srch-cal__d {
  aspect-ratio: 1; border: 0; background: none; border-radius: 50%;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--s-ink); cursor: pointer;
}
.srch-cal__d:hover:not(:disabled) { background: var(--s-soft); }
.srch-cal__d:disabled { color: #c6ccd5; cursor: not-allowed; text-decoration: line-through; }
.srch-cal__d.is-edge { background: var(--s-brand); color: #fff; font-weight: 700; }
.srch-cal__d.is-mid { background: #eef5f2; border-radius: 0; }
.srch-cal__d.is-empty { visibility: hidden; }

/* ---------- guests ---------- */
.srch-g { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--s-line); }
.srch-g:last-of-type { border-bottom: 0; }
.srch-g__t { font-weight: 600; font-size: 14px; }
.srch-g__d { font-size: 12px; color: var(--s-ink-3); }
.srch-g__c { display: flex; align-items: center; gap: 12px; }
.srch-g__b { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--s-line); background: #fff; cursor: pointer; color: var(--s-ink-2); font-size: 15px; }
.srch-g__b:disabled { opacity: .35; cursor: not-allowed; }
.srch-g__n { min-width: 20px; text-align: center; font-weight: 600; }

/* ---------- results header ---------- */
.srch-head { padding: 26px 0 14px; }
.srch-head h1 { font-size: 30px; font-weight: 700; margin: 0 0 6px; }
.srch-head__sub { color: var(--s-ink-2); font-size: 15px; }
.srch-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.srch-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--s-line); background: #fff;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--s-ink); cursor: pointer;
}
.srch-chip:hover { border-color: #cfd6df; }
.srch-chip.is-on { border-color: var(--s-ink); box-shadow: inset 0 0 0 1px var(--s-ink); }
.srch-chip__n { background: var(--s-ink); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.srch-tools__end { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.srch-sel { height: 40px; border-radius: 999px; border: 1px solid var(--s-line); padding: 0 34px 0 16px; font: inherit; font-size: 14px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c6675' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 14px center; -webkit-appearance: none; appearance: none; cursor: pointer; }
.srch-active { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.srch-active__x { display: inline-flex; align-items: center; gap: 7px; background: var(--s-soft); border: 1px solid var(--s-line); border-radius: 999px; padding: 5px 8px 5px 13px; font-size: 13px; }
.srch-active__x button { background: none; border: 0; cursor: pointer; color: var(--s-ink-3); line-height: 1; padding: 2px; }
.srch-active__x button:hover { color: var(--s-ink); }

/* ---------- split layout ---------- */
.srch-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(360px, 1fr); gap: 24px; align-items: start; padding-bottom: 40px; }
.srch-list { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.srch-mapwrap { position: sticky; top: 96px; }

/* ---------- property card ---------- */
.srch-card { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; }
.srch-card.is-hover .srch-card__t { text-decoration: underline; }
.srch-card__media { position: relative; border-radius: var(--s-radius); overflow: hidden; background: var(--s-soft); }
.srch-card__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.srch-card__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--s-ink); cursor: pointer; opacity: 0; transition: opacity .18s; }
.srch-card__media:hover .srch-card__nav { opacity: 1; }
.srch-card__nav--p { left: 10px; } .srch-card__nav--n { right: 10px; }
.srch-card__dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.srch-card__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.srch-card__dots i.on { background: #fff; }
.srch-card__flags { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.srch-flag { background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 700; box-shadow: var(--s-shadow); }
.srch-flag--brand { background: var(--s-brand); color: #fff; }
.srch-card__body { display: flex; flex-direction: column; min-width: 0; }
.srch-card__type { font-size: 12.5px; color: var(--s-ink-3); text-transform: capitalize; }
.srch-card__t { font-size: 19px; font-weight: 700; margin: 2px 0 4px; line-height: 1.3; }
.srch-card__loc { font-size: 14px; color: var(--s-ink-2); }
.srch-card__facts { font-size: 14px; color: var(--s-ink-2); margin-top: 8px; }
.srch-card__am { font-size: 13.5px; color: var(--s-ink-2); margin-top: 6px; }
.srch-card__rate { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-top: 10px; }
.srch-card__rate b { font-weight: 700; }
.srch-card__foot { margin-top: auto; padding-top: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.srch-price__big { font-size: 19px; font-weight: 700; }
.srch-price__sub { font-size: 13px; color: var(--s-ink-2); }
.srch-price__note { font-size: 12px; color: var(--s-ink-3); }
.srch-price__skel { display: inline-block; width: 108px; height: 19px; border-radius: 6px; background: linear-gradient(90deg, #eef1f4 25%, #f7f9fb 37%, #eef1f4 63%); background-size: 400% 100%; animation: srchShim 1.3s ease infinite; }
.srch-cta { border: 1px solid var(--s-ink); background: #fff; color: var(--s-ink); border-radius: 999px; height: 44px; padding: 0 22px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; }
.srch-cta:hover { background: var(--s-ink); color: #fff; }

/* ---------- map ---------- */
.srch-map { height: calc(100vh - 130px); min-height: 460px; border-radius: var(--s-radius); overflow: hidden; border: 1px solid var(--s-line); position: relative; background: var(--s-soft); }
.srch-map .maplibregl-map { height: 100%; width: 100%; font: inherit; background: #eef1f4; }
.srch-map > div:first-child { height: 100%; width: 100%; }
.srch-marker { background: none; border: 0; }
.srch-marker__b {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--s-ink); border: 1px solid rgba(20, 28, 40, .14);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(20, 28, 40, .18); white-space: nowrap; cursor: pointer;
  transition: transform .14s ease, background .14s ease, color .14s ease;
}
.srch-marker__b:hover { transform: scale(1.07); }
.srch-marker.is-active .srch-marker__b { background: var(--s-brand); color: #fff; border-color: var(--s-brand); transform: scale(1.1); }
.srch-map__area { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 500; }
.srch-map__area button { background: #fff; border: 1px solid var(--s-line); border-radius: 999px; height: 40px; padding: 0 18px; font-weight: 700; font-size: 14px; box-shadow: var(--s-shadow-lg); cursor: pointer; }
.srch-map__note { position: absolute; bottom: 12px; left: 12px; z-index: 500; background: rgba(255, 255, 255, .94); border-radius: 10px; padding: 6px 10px; font-size: 12px; color: var(--s-ink-2); }
.srch-preview { width: 240px; }
.srch-preview img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; }
.srch-preview__t { font-weight: 700; font-size: 14px; margin: 8px 0 2px; }
.srch-preview__m { font-size: 12.5px; color: var(--s-ink-2); }
.srch-preview a { display: inline-block; margin-top: 8px; font-weight: 700; font-size: 13px; color: var(--s-brand); text-decoration: none; }
.maplibregl-popup-content { border-radius: 14px; box-shadow: var(--s-shadow-lg); padding: 12px; }
.maplibregl-popup-close-button { font-size: 18px; padding: 2px 7px; }

/* ---------- filters drawer ---------- */
.srch-bd { position: fixed; inset: 0; background: rgba(20, 28, 40, .42); z-index: 1200; }
.srch-dr { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: #fff; z-index: 1210; display: flex; flex-direction: column; box-shadow: var(--s-shadow-lg); }
.srch-dr__h { padding: 18px 22px; border-bottom: 1px solid var(--s-line); display: flex; align-items: center; justify-content: space-between; }
.srch-dr__h h2 { font-size: 18px; font-weight: 700; margin: 0; }
.srch-dr__b { padding: 22px; overflow-y: auto; flex: 1 1 auto; }
.srch-dr__f { padding: 16px 22px; border-top: 1px solid var(--s-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; }
.srch-sec { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--s-line); }
.srch-sec:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.srch-sec__t { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.srch-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.srch-opt { border: 1px solid var(--s-line); background: #fff; border-radius: 999px; height: 38px; padding: 0 15px; font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; color: var(--s-ink-2); }
.srch-opt:hover { border-color: #cfd6df; }
.srch-opt.is-on { background: var(--s-ink); border-color: var(--s-ink); color: #fff; font-weight: 700; }
.srch-num { display: flex; gap: 10px; align-items: center; }
.srch-num input { width: 100%; height: 44px; border: 1px solid var(--s-line); border-radius: 12px; padding: 0 12px; font: inherit; }
.srch-check { display: flex; align-items: center; gap: 11px; padding: 10px 0; font-size: 14.5px; cursor: pointer; }
.srch-check input { width: 18px; height: 18px; accent-color: var(--s-brand); }
.srch-link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 700; color: var(--s-ink); text-decoration: underline; cursor: pointer; }

/* ---------- states ---------- */
.srch-skel { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; }
.srch-skel__i { aspect-ratio: 4 / 3; border-radius: var(--s-radius); }
.srch-sh, .srch-skel__i { background: linear-gradient(90deg, #eef1f4 25%, #f7f9fb 37%, #eef1f4 63%); background-size: 400% 100%; animation: srchShim 1.3s ease infinite; border-radius: 8px; }
@keyframes srchShim { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.srch-note { text-align: center; padding: 56px 24px; border: 1px solid var(--s-line); border-radius: var(--s-radius); background: #fff; }
.srch-note h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.srch-note p { color: var(--s-ink-2); max-width: 46ch; margin: 0 auto 18px; }
.srch-more { display: flex; justify-content: center; padding: 10px 0 4px; }
.srch-more button { border: 1px solid var(--s-ink); background: #fff; border-radius: 999px; height: 48px; padding: 0 30px; font-weight: 700; cursor: pointer; }

/* ---------- SEO block ---------- */
.srch-seo { background: var(--s-soft); padding: 56px 0; }
.srch-seo h2 { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.srch-seo h3 { font-size: 17px; font-weight: 700; margin: 24px 0 8px; }
.srch-seo p, .srch-seo li { color: var(--s-ink-2); line-height: 1.7; }

/* ---------- mobile / tablet ---------- */
.srch-toggle { display: none; }
@media (max-width: 1100px) {
  .srch-split { grid-template-columns: minmax(0, 1fr); }
  .srch-mapwrap { display: none; }
  .srch-card { grid-template-columns: 260px minmax(0, 1fr); }
  .srch-toggle {
    display: inline-flex; position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
    z-index: 900; background: var(--s-ink); border-radius: 999px; padding: 4px; gap: 2px; box-shadow: var(--s-shadow-lg);
  }
  .srch-toggle button { border: 0; background: none; color: rgba(255, 255, 255, .7); border-radius: 999px; height: 38px; padding: 0 18px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
  .srch-toggle button.is-on { background: #fff; color: var(--s-ink); }
  .srch--map .srch-split { grid-template-columns: minmax(0, 1fr); }
  .srch--map .srch-list, .srch--map .srch-head__tools { display: none; }
  .srch--map .srch-mapwrap { display: block; position: static; }
  .srch--map .srch-map { height: calc(100vh - 190px); border-radius: var(--s-radius); }
}
@media (max-width: 860px) {
  .srch-bar__grid { grid-template-columns: 1fr 1fr; border-radius: 20px; padding: 14px; gap: 14px; }
  .srch-bar__go { grid-column: 1 / -1; justify-content: center; }
  .srch-pop { left: 0; right: 0; min-width: 0; }
  .srch-head h1 { font-size: 24px; }
}
@media (max-width: 640px) {
  .srch-card, .srch-skel { grid-template-columns: minmax(0, 1fr); }
  .srch-card__img { aspect-ratio: 3 / 2; }
  .srch-dr { width: 100vw; top: auto; height: 92vh; border-radius: 18px 18px 0 0; }
  .srch-cal { gap: 0; }
  .srch-cal__m:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .srch *, .srch *::before, .srch *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
