/* Ibeka City Explorer R1: all selectors confined to new components. */
.ibeka-locations,.ibeka-city-r1-enquiry {border-left:3px solid #8cd8bf;padding:10px 14px;margin:0 0 20px;background:#f5faf9;font-size:14px;color:#0d2c3c}
@media(max-width:991px){.ibeka-locations__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.ibeka-locations__controls{grid-template-columns:1fr}.ibeka-locations__grid{grid-template-columns:1fr;gap:14px}}

/* R1.4: the city is bound by the archive URL; no visible city control. */
/* City-specific grid: 7 regular fields, More Options, Search = 3 × 3. */
@media (min-width:1025px) {
  .ibeka-city-r1-search .search_wrapper.search_wr_1 .adv-search-1 .residence_adv_extended_options_text {
    grid-column:2 !important;
  }
  .ibeka-city-r1-search .search_wrapper.search_wr_1 .adv-search-1 .residence_advanced_submit_button_search_1 {
    grid-column:3 !important;
  }
}
@media (min-width:601px) and (max-width:1024px) {
  .ibeka-city-r1-search .search_wrapper.search_wr_1 .adv-search-1 .residence_adv_extended_options_text {
    grid-column:1 !important;
  }
  .ibeka-city-r1-search .search_wrapper.search_wr_1 .adv-search-1 .residence_advanced_submit_button_search_1 {
    grid-column:2 !important;
  }
}

/* R1.5: disable only the WPResidence live-results flyout on city archives.
   Native Advanced Search and its popup remain unchanged everywhere else. */
.ibeka-city-r1-archive .ibeka-city-r1-search #results {display:none!important;}


/* R1.7 — accessible city guide. Search form controls and handlers remain native. */
.ibeka-city-r17-seo-intro {margin:0 0 14px!important;max-width:1040px;color:#486572;font-size:15px;line-height:1.65}
.ibeka-city-r17-discover-button {
  box-sizing:border-box!important;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:38px;margin:0 0 16px;padding:7px 14px!important;border:1px solid #1b806f!important;
  border-radius:9px!important;background:#fff!important;color:#0d594f!important;
  font-size:12px!important;line-height:1.35!important;font-weight:600!important;
  cursor:pointer;white-space:normal;transition:background .15s ease,transform .15s ease;
}
.ibeka-city-r17-discover-button:hover {background:#e9f7f2!important;transform:translateY(-1px)}
.ibeka-city-r17-discover-button:focus-visible {outline:3px solid #8cd8bf;outline-offset:3px}
.ibeka-city-r17-discover-button svg {flex:none;display:block}
.ibeka-city-r17-discover-button.ibeka-city-r17--in-form {justify-self:start;align-self:center;margin:6px 0 4px!important;order:20;max-width:100%;position:relative;left:var(--ibeka-city-r17-inline-offset,0px);}
/* The native More Search Options retains its immediately following panel. */
@media(min-width:1025px) {
  .ibeka-city-r1-search .search_wrapper.search_wr_1 .adv-search-1 .residence_adv_extended_options_text {grid-column:1!important}
  .ibeka-city-r1-search .search_wrapper.search_wr_1 .adv-search-1 .ibeka-city-r17-discover-button {grid-column:2!important}
}
@media(min-width:601px) and (max-width:1024px) {
  .ibeka-city-r1-search .search_wrapper.search_wr_1 .adv-search-1 .residence_adv_extended_options_text {grid-column:1!important}
  .ibeka-city-r1-search .search_wrapper.search_wr_1 .adv-search-1 .ibeka-city-r17-discover-button {grid-column:2!important}
}
@media(max-width:600px) {
  .ibeka-city-r1-search .search_wrapper.search_wr_1 .adv-search-1 .ibeka-city-r17-discover-button {grid-column:1!important;order:21;width:100%;margin:0!important}
  .ibeka-city-r17-seo-intro {font-size:14px;line-height:1.6}
}
.ibeka-city-r17-overlay[hidden] {display:none!important}
.ibeka-city-r17-overlay {
  position:fixed!important;inset:0!important;z-index:2147483000!important;
  display:flex;align-items:center;justify-content:center;padding:20px;
  background:rgba(7,28,39,.75);backdrop-filter:blur(5px);
}
body.ibeka-city-r17-modal-open {overflow:hidden!important}
.ibeka-city-r17-modal {
  position:relative;display:flex;flex-direction:column;width:min(900px,100%);max-height:calc(100dvh - 40px);
  overflow-y:auto;overscroll-behavior:contain;border-radius:18px;background:#fff;
  box-shadow:0 25px 85px rgba(0,0,0,.32);color:#173849;
}
.ibeka-city-r17-close {
  position:sticky;top:15px;align-self:flex-end;z-index:4;flex:none;margin:15px 16px -59px 0;
  width:42px;height:42px;border:1px solid rgba(255,255,255,.7);border-radius:50%;
  display:grid;place-items:center;background:rgba(13,44,60,.88);color:#fff;cursor:pointer;
  box-shadow:0 3px 12px rgba(0,0,0,.17);
}
.ibeka-city-r17-close svg {width:21px;height:21px}
.ibeka-city-r17-close:hover {background:#174d60}
.ibeka-city-r17-close:focus-visible {outline:3px solid #8cd8bf;outline-offset:3px}
.ibeka-city-r17-hero {height:260px;flex:none;overflow:hidden;background:linear-gradient(120deg,#113549,#317d7b)}
.ibeka-city-r17-hero img {width:100%;height:100%;object-fit:cover;display:block}
.ibeka-city-r17-hero--fallback {display:flex;align-items:center;justify-content:center;gap:26px;color:#9ce7d7;background:radial-gradient(circle at 75% 30%,#388b80,#0d2c3c 70%)}
.ibeka-city-r17-hero--fallback svg {height:110px;width:110px;opacity:.6}
.ibeka-city-r17-hero--fallback span {font-family:Georgia,serif;font-size:clamp(26px,4vw,48px);color:white}
.ibeka-city-r17-modal-content {padding:30px 38px 34px}
.ibeka-city-r17-region {margin:0 0 8px!important;color:#168974!important;font-size:12px!important;text-transform:uppercase;letter-spacing:.09em;font-weight:700}
.ibeka-city-r17-modal-content h2 {margin:0 0 17px!important;font-size:clamp(25px,3vw,36px)!important;line-height:1.2!important;color:#0d2c3c!important;font-weight:700}
.ibeka-city-r17-guide-html {line-height:1.75;font-size:15px;color:#354b55}
.ibeka-city-r17-guide-html p {margin:0 0 15px}
.ibeka-city-r17-guide-html h2,.ibeka-city-r17-guide-html h3 {margin:24px 0 10px!important;font-size:20px!important;color:#0d2c3c!important;font-weight:700}
.ibeka-city-r17-guide-html ul {margin:0 0 18px;padding-left:22px}
.ibeka-city-r17-guide-html a {color:#147e70;text-decoration:underline}
.ibeka-city-r17-modal-actions {display:flex;gap:10px;flex-wrap:wrap;margin-top:26px;padding-top:20px;border-top:1px solid #e3e9e7}
.ibeka-city-r17-action-primary,.ibeka-city-r17-action-secondary {
  display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:43px;
  border-radius:8px;padding:10px 18px;font-size:14px;font-weight:700;text-decoration:none!important;cursor:pointer;
}
.ibeka-city-r17-action-primary {background:#0d2c3c;border:1px solid #0d2c3c;color:white}
.ibeka-city-r17-action-primary:hover {background:#14506a;color:white}
.ibeka-city-r17-action-secondary {background:white;border:1px solid #a0c5bb;color:#11584e!important}
.ibeka-city-r17-action-secondary:hover {background:#eef9f5}
.ibeka-city-r17-preview-note {font-size:12px;color:#835e25;background:#fff6e7;border-left:3px solid #ca9435;padding:10px 12px;margin:17px 0 0}
.ibeka-city-r17-action-primary:focus-visible,.ibeka-city-r17-action-secondary:focus-visible {outline:3px solid #8cd8bf;outline-offset:3px}
/* C2/C3 R2: mobile guide is content-sized instead of forced 100dvh.
   Long descriptions still scroll INSIDE the capped dialog; short pending
   guides no longer show a blank screen below their actions. */
@media(max-width:640px) {
  .ibeka-city-r17-overlay {padding:12px;align-items:center;justify-content:center}
  .ibeka-city-r17-modal {
    width:100%;height:auto;max-height:calc(100dvh - 24px);
    max-height:calc(100svh - 24px);border-radius:14px;
    overflow-x:hidden;overflow-y:auto;
  }
  .ibeka-city-r17-hero {height:clamp(165px,24svh,205px)}
  .ibeka-city-r17-modal-content {padding:22px 21px 26px}
  .ibeka-city-r17-close {margin-right:16px}
  .ibeka-city-r17-hero--fallback {gap:10px}
  .ibeka-city-r17-hero--fallback svg {width:65px;height:65px}
  .ibeka-city-r17-modal-actions>* {width:100%}
}
@media (max-width:640px) and (max-height:500px) {
  .ibeka-city-r17-hero {height:120px}
}
@media(prefers-reduced-motion:reduce){.ibeka-city-r17-discover-button {transition:none}}

/* R1.8: theme-resilient guide button (the native form remains untouched). */
body.ibeka-city-r1-archive button.ibeka-city-r17-discover-button,
body.ibeka-city-r1-archive .ibeka-city-r17-discover-button {
  appearance:none!important;-webkit-appearance:none!important;
  min-height:39px!important;padding:8px 15px!important;
  display:inline-flex!important;align-items:center!important;gap:8px!important;
  background:#fff!important;color:#0d594f!important;
  border:1px solid #1b806f!important;border-radius:9px!important;
  font-weight:700!important;font-size:13px!important;line-height:1.25!important;
  box-shadow:none!important;cursor:pointer!important;
}
body.ibeka-city-r1-archive .ibeka-city-r17-overlay:not([hidden]) {display:flex!important}
body.ibeka-city-r1-archive .ibeka-city-r17-overlay[hidden] {display:none!important}


/* R1.9: precise, non-overlapping native search-toolbar layout.
 * Preserve the original More Options trigger and its next-sibling panel.
 * City Discover uses its own intrinsic width instead of a stretched grid cell.
 */
@media (min-width:601px) {
  body.ibeka-city-r1-archive .ibeka-city-r1-search .search_wrapper.search_wr_1
  .adv-search-1 form#adv_search_form > .ibeka-city-r17-discover-button.ibeka-city-r17--in-form {
    grid-column:1!important;
    justify-self:start!important;
    width:max-content!important;
    max-width:min(260px,calc(100vw - 32px))!important;
    min-width:0!important;
    position:relative!important;
    left:var(--ibeka-city-r19-inline-offset,0px)!important;
    margin:6px 0 4px!important;
    z-index:2;
  }
}
@media (max-width:600px) {
  body.ibeka-city-r1-archive .ibeka-city-r1-search .search_wrapper.search_wr_1
  .adv-search-1 form#adv_search_form > .ibeka-city-r17-discover-button.ibeka-city-r17--in-form {
    grid-column:1!important;
    position:static!important;
    left:auto!important;
    width:100%!important;
    max-width:100%!important;
    justify-self:stretch!important;
    margin:2px 0 4px!important;
  }
}
/* Typographic hierarchy for the saved, multilingual town guide.
 * Avoid tight WPResidence theme heading fonts/word-spacing inside the guide. */
body.ibeka-city-r1-archive .ibeka-city-r17-guide-html h2,
body.ibeka-city-r1-archive .ibeka-city-r17-guide-html h3 {
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:18px!important;
  font-weight:700!important;
  letter-spacing:normal!important;
  word-spacing:normal!important;
  line-height:1.45!important;
  margin:26px 0 11px!important;
}
body.ibeka-city-r1-archive .ibeka-city-r17-guide-html p {
  line-height:1.75!important;
  margin:0 0 17px!important;
}

/* R2.0 — unified City/Town directory. All selectors scoped to the shortcode.
   Preserves the approved R1.9 city archives and property search unchanged. */
.ibeka-locations[data-city-directory="1"] {
  display:block; background:transparent!important; border:0!important;
  color:#0d2c3c; margin:0 auto 46px; padding:0!important;
  max-width:1240px; font-size:15px;
}
.ibeka-locations__intro {margin:0 0 22px}
.ibeka-locations__intro h2 {
  font-size:clamp(26px,3vw,38px)!important;line-height:1.2!important;
  letter-spacing:-.02em;color:#0d2c3c!important;margin:0 0 8px!important;
}
.ibeka-locations__intro p {font-size:15px;line-height:1.65;margin:0;color:#516978}
.ibeka-locations__controls {
  display:grid;grid-template-columns:minmax(0,2fr) minmax(200px,1fr);gap:12px;
  padding:18px;border:1px solid #e1ebe9;border-radius:14px;background:#f5f8f9;
  margin:0 0 16px;
}
.ibeka-locations__controls input,.ibeka-locations__controls select {
  display:block!important;width:100%!important;max-width:none!important;min-width:0;
  height:48px!important;border:1px solid #d8e3e5!important;border-radius:9px!important;
  padding:0 15px!important;background:#fff!important;color:#0d2c3c!important;
  font-size:14px!important;font-family:inherit!important;box-shadow:none!important;
}
.ibeka-locations__controls input:focus-visible,.ibeka-locations__controls select:focus-visible {
  outline:3px solid #8cd8bf!important;outline-offset:1px;
}
.ibeka-locations__summary {margin:0 0 23px!important;font-size:13px;color:#476774;font-weight:600}
.ibeka-locations__group {padding-top:10px;margin-bottom:37px}
.ibeka-locations__group[hidden],.ibeka-location[hidden] {display:none!important}
.ibeka-locations__group h3 {
  font-family:inherit!important;font-size:22px!important;font-weight:700!important;
  letter-spacing:-.01em!important;word-spacing:normal!important;
  margin:0 0 17px!important;padding:0 0 13px;border-bottom:1px solid #dfeae8;
  color:#0d2c3c!important;line-height:1.3!important;
}
.ibeka-locations__grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.ibeka-locations .ibeka-location {
  display:block;min-width:0;overflow:hidden;background:#fff;border:1px solid #e3eaeb;
  border-radius:13px;box-shadow:0 3px 15px rgba(13,44,60,.06);
  text-decoration:none!important;color:#0d2c3c!important;
  transition:box-shadow .18s ease,transform .18s ease,border-color .18s ease;
}
.ibeka-locations .ibeka-location:hover {
  transform:translateY(-3px);border-color:#a9d5c9;box-shadow:0 12px 25px rgba(13,44,60,.12);
}
.ibeka-locations .ibeka-location:focus-visible {outline:3px solid #8cd8bf;outline-offset:3px}
.ibeka-locations .ibeka-location__media {
  display:block;position:relative;aspect-ratio:16/10;overflow:hidden;
  background:linear-gradient(135deg,#0d2c3c,#2e7879);
}
.ibeka-locations .ibeka-location__media img {
  width:100%;height:100%;object-fit:cover;display:block;
  transition:transform .22s ease;
}
.ibeka-locations .ibeka-location:hover .ibeka-location__media img {transform:scale(1.035)}
.ibeka-locations .ibeka-location__no-image {
  display:flex;align-items:center;justify-content:center;width:100%;height:100%;
  font-size:64px;color:#a3dcd0;font-weight:300;
}
.ibeka-locations .ibeka-location__body {display:flex;flex-direction:column;gap:6px;padding:17px 18px 18px}
.ibeka-locations .ibeka-location__body strong {
  font-size:19px;line-height:1.3;font-weight:700;letter-spacing:-.012em;color:#0d2c3c;
}
.ibeka-locations .ibeka-location__body>span {font-size:14px;line-height:1.45;color:#385e6b}
.ibeka-locations .ibeka-location__body small {font-size:12px;line-height:1.4;font-weight:700;color:#137b6b}
.ibeka-locations__empty {padding:24px;border:1px dashed #bad6d0;border-radius:10px;color:#476774}
@media(max-width:991px) {
  .ibeka-locations__grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
}
@media(max-width:640px) {
  .ibeka-locations__controls {grid-template-columns:1fr;gap:10px;padding:13px}
  .ibeka-locations__grid {grid-template-columns:1fr;gap:14px}
  .ibeka-locations__group {margin-bottom:27px}
  .ibeka-locations .ibeka-location__media {aspect-ratio:16/9}
}
@media(prefers-reduced-motion:reduce) {
  .ibeka-locations .ibeka-location,.ibeka-locations .ibeka-location__media img {transition:none!important}
}
/* Guarantee accessible labels don't occupy form-grid tracks if the theme's
   screen-reader utility CSS is delayed or disabled by caching. */
.ibeka-locations .screen-reader-text {
  position:absolute!important;width:1px!important;height:1px!important;
  padding:0!important;margin:-1px!important;overflow:hidden!important;
  clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}


/* R2.0: the approved city search action arrangement.
 * Desktop, seven configured visible filters: Price | Search Properties |
 * Discover [city]. The existing More Search Options is on the next row.
 * Only the CITY archive uses these selectors; /advanced-search/ is untouched.
 * In particular, keep More Options directly next to its feature panel in DOM.
 */
@media (min-width:1025px) {
  body.ibeka-city-r1-archive .ibeka-city-r1-search .search_wrapper.search_wr_1
  .adv-search-1 form#adv_search_form .residence_advanced_submit_button_search_1 {
    order:21!important;grid-column:2!important;grid-row:auto!important;
  }
  body.ibeka-city-r1-archive .ibeka-city-r1-search .search_wrapper.search_wr_1
  .adv-search-1 form#adv_search_form .ibeka-city-r17-discover-button.ibeka-city-r17--in-form {
    order:22!important;grid-column:3!important;grid-row:auto!important;
    justify-self:stretch!important;align-self:stretch!important;
    position:static!important;left:auto!important;inset:auto!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:42px!important;min-height:42px!important;margin:0!important;
    transform:none!important;z-index:auto!important;
  }
  body.ibeka-city-r1-archive .ibeka-city-r1-search .search_wrapper.search_wr_1
  .adv-search-1 form#adv_search_form .residence_adv_extended_options_text {
    order:23!important;grid-column:1!important;grid-row:auto!important;
  }
}
/* Tablet: Price | Search on one row, then More | Discover on the next. */
@media (min-width:601px) and (max-width:1024px) {
  body.ibeka-city-r1-archive .ibeka-city-r1-search .search_wrapper.search_wr_1
  .adv-search-1 form#adv_search_form .residence_advanced_submit_button_search_1 {
    order:21!important;grid-column:2!important;grid-row:auto!important;
  }
  body.ibeka-city-r1-archive .ibeka-city-r1-search .search_wrapper.search_wr_1
  .adv-search-1 form#adv_search_form .residence_adv_extended_options_text {
    order:22!important;grid-column:1!important;grid-row:auto!important;
  }
  body.ibeka-city-r1-archive .ibeka-city-r1-search .search_wrapper.search_wr_1
  .adv-search-1 form#adv_search_form .ibeka-city-r17-discover-button.ibeka-city-r17--in-form {
    order:23!important;grid-column:2!important;grid-row:auto!important;
    justify-self:stretch!important;align-self:stretch!important;
    position:static!important;left:auto!important;inset:auto!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:42px!important;min-height:42px!important;margin:0!important;
    transform:none!important;z-index:auto!important;
  }
}
/* Mobile: full-width Search, native More Options, then Discover. */
@media (max-width:600px) {
  body.ibeka-city-r1-archive .ibeka-city-r1-search .search_wrapper.search_wr_1
  .adv-search-1 form#adv_search_form .residence_advanced_submit_button_search_1 {
    order:21!important;grid-column:1!important;grid-row:auto!important;
  }
  body.ibeka-city-r1-archive .ibeka-city-r1-search .search_wrapper.search_wr_1
  .adv-search-1 form#adv_search_form .residence_adv_extended_options_text {
    order:22!important;grid-column:1!important;grid-row:auto!important;
  }
  body.ibeka-city-r1-archive .ibeka-city-r1-search .search_wrapper.search_wr_1
  .adv-search-1 form#adv_search_form .ibeka-city-r17-discover-button.ibeka-city-r17--in-form {
    order:23!important;grid-column:1!important;grid-row:auto!important;
    position:static!important;left:auto!important;inset:auto!important;
    align-self:stretch!important;justify-self:stretch!important;
    width:100%!important;max-width:100%!important;
    height:42px!important;min-height:42px!important;margin:0!important;
    transform:none!important;z-index:auto!important;
  }
}
