/* =============================================================
   BENIN-IMMO Search Builder — CSS v4.3 — responsive via CSS custom props
   Grid layout · 56px fields · 8px radius
   Editor-aware · Sticky Search · Mobile Sheet
   ============================================================= */

/* ── Outer wrapper ─────────────────────────────────── */
.bi-search-builder-wrapper {
  position: relative;
}

/* =============================================================
   FORM LAYOUT — CSS Grid (fully responsive)
   --bi-cols is written by Elementor responsive controls.
   Fallback: 5 desktop / 3 tablet / 1 mobile.
   ============================================================= */
.bi-search-builder-wrapper .houzez-ele-search-form-wrapper {
  display:   flex !important;
  flex-wrap: wrap;
  row-gap:   6px;
}



/* =============================================================
   FIELDS — 56px · 8px radius · premium border
   ============================================================= */
.bi-search-builder-wrapper .elementor-field,
.bi-search-builder-wrapper .elementor-field.form-group,
.bi-search-builder-wrapper .elementor-select-wrapper,
.bi-search-builder-wrapper .elementor-select-wrapper.form-group {
  height: 56px;
  margin: 0;
  padding: 0;
}

.bi-search-builder-wrapper select.selectpicker,
.bi-search-builder-wrapper select.form-control,
.bi-search-builder-wrapper input.elementor-field-textual,
.bi-search-builder-wrapper input.form-control {
  height:      56px !important;
  min-height:  56px;
  border-radius: 8px !important;
  border:      1.5px solid #E2E8F0 !important;
  font-family: 'Josefin Sans', sans-serif;
  font-size:   14px;
  color:       #1A2B4A;
  background:  #FFFFFF;
  padding:     0 16px;
  transition:  border-color .2s, box-shadow .2s;
  width:       100%;
  box-sizing:  border-box;
  box-shadow:  none;
}

.bi-search-builder-wrapper select.selectpicker:focus,
.bi-search-builder-wrapper select.form-control:focus,
.bi-search-builder-wrapper input.elementor-field-textual:focus,
.bi-search-builder-wrapper input.form-control:focus {
  border-color: #C8A96E !important;
  box-shadow:   0 0 0 3px rgba(200,169,110,.15) !important;
  outline:      none;
}

/* Bootstrap-select toggle */
.bi-search-builder-wrapper .bootstrap-select > .dropdown-toggle.btn {
  height:      56px !important;
  min-height:  56px;
  border-radius: 8px !important;
  border:      1.5px solid #E2E8F0 !important;
  font-family: 'Josefin Sans', sans-serif;
  font-size:   14px;
  color:       #1A2B4A;
  background:  #FFFFFF !important;
  padding:     0 38px 0 16px;
  display:     flex;
  align-items: center;
  transition:  border-color .2s, box-shadow .2s;
  box-shadow:  none !important;
  white-space: nowrap;
  overflow:    hidden;
  text-overflow: ellipsis;
}

.bi-search-builder-wrapper .bootstrap-select > .dropdown-toggle:focus,
.bi-search-builder-wrapper .bootstrap-select.show > .dropdown-toggle {
  border-color: #C8A96E !important;
  box-shadow:   0 0 0 3px rgba(200,169,110,.15) !important;
  outline:      none !important;
}

.bi-search-builder-wrapper .bootstrap-select .filter-option-inner-inner {
  font-family: 'Josefin Sans', sans-serif;
  font-size:   14px;
  color:       #1A2B4A;
  overflow:    hidden;
  text-overflow: ellipsis;
}

/* Dropdown menu */
.bi-search-builder-wrapper .bootstrap-select .dropdown-menu {
  border-radius: 10px;
  border:        1px solid #E2E8F0;
  box-shadow:    0 8px 32px rgba(26,43,74,.12);
  padding:       6px;
  overflow:      hidden;
}

.bi-search-builder-wrapper .bootstrap-select .dropdown-item {
  border-radius: 6px;
  font-family:   'Josefin Sans', sans-serif;
  font-size:     14px;
  color:         #1A2B4A;
  padding:       10px 14px;
}

.bi-search-builder-wrapper .bootstrap-select .dropdown-item.active,
.bi-search-builder-wrapper .bootstrap-select .dropdown-item:active {
  background: #C8A96E; color: #1A2B4A;
}

.bi-search-builder-wrapper .bootstrap-select .dropdown-item:hover {
  background: rgba(200,169,110,.1); color: #1A2B4A;
}

/* =============================================================
   SEARCH BUTTON — fills grid cell, 56px
   ============================================================= */
.bi-search-builder-wrapper .bi-search-btn,
.bi-search-builder-wrapper .houzez-search-btn,
.bi-search-builder-wrapper .houzez-search-btn-js {
  display:         inline-flex !important;
  align-items:     center;
  justify-content: center;
  gap:             7px;
  width:           100%;
  height:          56px !important;
  min-height:      56px;
  padding:         0 28px;
  background:      linear-gradient(135deg, #C8A96E 0%, #b8955c 100%);
  color:           #1A2B4A !important;
  font-family:     'Josefin Sans', sans-serif;
  font-size:       15px;
  font-weight:     700;
  letter-spacing:  .25px;
  border:          none !important;
  border-radius:   8px !important;
  cursor:          pointer;
  transition:      background .2s, transform .15s, box-shadow .2s, opacity .2s;
  white-space:     nowrap;
  text-decoration: none;
  line-height:     1;
  box-shadow:      0 2px 8px rgba(200,169,110,.3);
}

.bi-search-builder-wrapper .bi-search-btn:hover,
.bi-search-builder-wrapper .houzez-search-btn:hover,
.bi-search-builder-wrapper .houzez-search-btn-js:hover {
  background:      linear-gradient(135deg, #b8955c 0%, #a07848 100%);
  transform:       translateY(-1px);
  box-shadow:      0 8px 24px rgba(200,169,110,.45);
  color:           #1A2B4A !important;
  text-decoration: none;
}

.bi-search-builder-wrapper .bi-search-btn.bi-btn-loading { opacity:.7; pointer-events:none; }

/* =============================================================
   CLEAR BUTTON
   ============================================================= */
.bi-search-builder-wrapper .bi-clear-btn {
  display:         inline-flex !important;
  align-items:     center;
  justify-content: center;
  width:           100%;
  height:          56px !important;
  min-height:      56px;
  padding:         0 20px;
  background:      transparent;
  color:           #718096;
  font-family:     'Josefin Sans', sans-serif;
  font-size:       13px;
  font-weight:     600;
  letter-spacing:  .3px;
  border:          1.5px solid #CBD5E0 !important;
  border-radius:   8px !important;
  cursor:          pointer;
  transition:      color .2s, border-color .2s, background .2s;
  text-decoration: none;
  white-space:     nowrap;
}

.bi-search-builder-wrapper .bi-clear-btn:hover {
  color:           #1A2B4A;
  border-color:    #1A2B4A !important;
  background:      rgba(26,43,74,.04);
  text-decoration: none;
}

/* =============================================================
   ICONS IN FIELDS
   ============================================================= */
.bi-field-icon-wrap {
  position:  relative;
  height:    56px;
  width:     100%;       /* prevent flex-item shrink when .elementor-field-group is flex container */
  min-width: 0;          /* allow shrink below content width if needed */
  display:   block;      /* never become flex/grid itself */
  box-sizing: border-box;
}

.bi-field-icon {
  position:  absolute;
  left:      14px;
  top:       50%;
  transform: translateY(-50%);
  width:     16px;
  height:    16px;
  color:     #C8A96E;
  pointer-events: none;
  z-index:   5;
  display:   flex;
  align-items: center;
  justify-content: center;
}

.bi-field-icon svg {
  width:  16px;
  height: 16px;
  fill:   none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.bi-field-icon-wrap select.selectpicker,
.bi-field-icon-wrap select.form-control,
.bi-field-icon-wrap input.elementor-field-textual,
.bi-field-icon-wrap input.form-control {
  padding-left: 42px !important;
}

.bi-field-icon-wrap .bootstrap-select > .dropdown-toggle.btn {
  padding-left: 42px !important;
}

.bi-field-icon-wrap .elementor-field,
.bi-field-icon-wrap .elementor-select-wrapper { height: 56px; }

/* =============================================================
   SEO TITLE + SUBTITLE
   ============================================================= */
.bi-seo-title {
  font-family: 'Cinzel', serif;
  font-size:   clamp(22px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  color:       #1A2B4A;
  margin:      0 0 10px;
}

.bi-seo-subtitle {
  font-family: 'Josefin Sans', sans-serif;
  font-size:   16px;
  color:       #4A5568;
  margin:      0 0 24px;
  line-height: 1.65;
}

/* =============================================================
   COUNTER
   ============================================================= */
.bi-counter-wrap {
  display:     inline-flex;
  align-items: baseline;
  flex-wrap:   wrap;
  gap:         6px;
  margin-bottom: 20px;
  font-family: 'Josefin Sans', sans-serif;
  font-size:   15px;
  font-weight: 600;
  color:       #4A5568;
}

.bi-counter-number {
  font-size:   clamp(28px, 4vw, 48px);
  font-weight: 700;
  color:       #C8A96E;
  line-height: 1;
  transition:  opacity .25s;
  font-variant-numeric: tabular-nums;
}

.bi-counter-number.loading { opacity: .35; }

.bi-counter-label {
  font-size:   14px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color:       #1A2B4A;
}

/* =============================================================
   SEO SUMMARY
   ============================================================= */
.bi-seo-summary {
  font-family: 'Josefin Sans', sans-serif;
  font-size:   14px;
  color:       #718096;
  margin:      0 0 24px;
  line-height: 1.6;
}

/* =============================================================
   POPULAR SEARCHES
   ============================================================= */
.bi-popular-searches {
  display:     flex;
  flex-wrap:   wrap;
  align-items: center;
  gap:         8px;
  margin-top:  14px;
}

.bi-popular-searches__label {
  font-family: 'Josefin Sans', sans-serif;
  font-size:   13px;
  font-weight: 600;
  color:       #718096;
  white-space: nowrap;
  flex-shrink: 0;
}

.bi-popular-searches__link {
  display:     inline-flex;
  align-items: center;
  gap:         5px;
  font-family: 'Josefin Sans', sans-serif;
  font-size:   13px;
  font-weight: 500;
  color:       #1A2B4A;
  background:  rgba(26,43,74,.05);
  border:      1px solid rgba(26,43,74,.12);
  border-radius: 20px;
  padding:     5px 14px;
  text-decoration: none;
  transition:  background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}

.bi-popular-searches__link::before {
  content:     '\2713';
  color:       #C8A96E;
  font-weight: 700;
  font-size:   11px;
  line-height: 1;
}

.bi-popular-searches__link:hover {
  background:  rgba(200,169,110,.12);
  border-color: #C8A96E;
  color:       #1A2B4A;
  text-decoration: none;
}

/* =============================================================
   LAYOUT — STANDARD
   ============================================================= */
.bi-layout-standard .bi-search-form-inner {
  background:    #FFFFFF;
  border-radius: 12px;
  padding:       12px;
  box-shadow:    0 4px 24px rgba(26,43,74,.08);
}

/* =============================================================
   LAYOUT — LANDING SEO
   ============================================================= */
.bi-layout-landing-seo .bi-seo-title { font-size: clamp(24px,3.5vw,42px); }

.bi-layout-landing-seo .bi-search-form-inner {
  background:    #FFFFFF;
  border-radius: 14px;
  padding:       14px;
  box-shadow:    0 8px 40px rgba(26,43,74,.12);
}

/* =============================================================
   LAYOUT — HERO PREMIUM
   ============================================================= */
.bi-layout-hero {
  position:      relative;
  padding:       72px 40px;
  border-radius: 20px;
  overflow:      hidden;
  background:    linear-gradient(135deg,#1A2B4A 0%,#2C4570 60%,#3D5A8A 100%);
}

.bi-layout-hero__bg {
  position:           absolute;
  inset:              0;
  background-size:    cover;
  background-position: center;
  background-repeat:  no-repeat;
}

.bi-layout-hero__overlay {
  position: absolute;
  inset:    0;
  background: linear-gradient(180deg,rgba(10,18,35,.45) 0%,rgba(10,18,35,.72) 100%);
}

.bi-layout-hero__content { position:relative; z-index:2; }

.bi-layout-hero .bi-seo-title  { color:#FFFFFF; font-size:clamp(26px,4vw,52px); margin-bottom:14px; }
.bi-layout-hero .bi-seo-subtitle { color:rgba(255,255,255,.85); }
.bi-layout-hero .bi-counter-number { color:#C8A96E; }
.bi-layout-hero .bi-counter-wrap   { color:rgba(255,255,255,.9); }
.bi-layout-hero .bi-seo-summary    { color:rgba(255,255,255,.75); }

.bi-layout-hero .bi-search-form-inner {
  background:    rgba(255,255,255,.96);
  border-radius: 14px;
  padding:       14px;
  box-shadow:    0 16px 60px rgba(0,0,0,.28);
}

.bi-layout-hero .bi-popular-searches__label    { color:rgba(255,255,255,.7); }
.bi-layout-hero .bi-popular-searches__link     { background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.2); color:#FFFFFF; }
.bi-layout-hero .bi-popular-searches__link:hover { background:rgba(200,169,110,.25); border-color:#C8A96E; color:#FFFFFF; }

/* =============================================================
   ELEMENTOR EDITOR MODE
   Ensures the widget renders faithfully in the editor preview.
   ============================================================= */
.bi-editor-mode .houzez-ele-search-form-wrapper {
  /* Keep grid in editor */
  display: grid !important;
}

.bi-editor-mode .elementor-field,
.bi-editor-mode .elementor-select-wrapper,
.bi-editor-mode .bootstrap-select > .dropdown-toggle.btn {
  /* Force correct height in editor */
  height: 56px !important;
  min-height: 56px !important;
}

/* Elementor adds extra padding to form field groups in editor */
.bi-editor-mode .elementor-field-group {
  padding: 0 !important;
  margin:  0 !important;
}

/* Fix elementor editor inner container interference */
.bi-editor-mode .elementor-element-overlay { display: none !important; }

/* =============================================================
   CONNECTED MODE loading
   ============================================================= */
.bi-loading { position:relative; transition:opacity .2s; }

.bi-loading::after {
  content: '';
  position: absolute;
  inset:    0;
  background: rgba(255,255,255,.75);
  z-index:    20;
  border-radius: 8px;
  pointer-events: none;
}

.bi-loading::before {
  content:   '';
  position:  absolute;
  top:       50%;
  left:      50%;
  transform: translate(-50%,-50%);
  width:     36px;
  height:    36px;
  border:    3px solid #E8EAF0;
  border-top-color: #C8A96E;
  border-radius: 50%;
  animation: bi-spin .7s linear infinite;
  z-index:   21;
  pointer-events: none;
}

@keyframes bi-spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* =============================================================
   CONNECTED PAGINATION
   ============================================================= */
.bi-connected-pagination { margin-top:32px; text-align:center; }

.bi-connected-pagination ul.page-numbers {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.bi-connected-pagination ul.page-numbers li a,
.bi-connected-pagination ul.page-numbers li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height:    40px;
  padding:   0 12px;
  border-radius: 8px;
  font-family: 'Josefin Sans', sans-serif;
  font-size:   14px;
  font-weight: 600;
  color:       #1A2B4A;
  border:      1.5px solid #E8EAF0;
  text-decoration: none;
  transition:  background .2s, color .2s, border-color .2s;
}

.bi-connected-pagination ul.page-numbers li a:hover {
  background: #C8A96E; color: #1A2B4A; border-color: #C8A96E; text-decoration: none;
}

.bi-connected-pagination ul.page-numbers li span.current {
  background: #C8A96E; color: #1A2B4A; border-color: #C8A96E;
}

.bi-connected-pagination ul.page-numbers li span.dots {
  border: none; background: transparent; color: #718096;
}

/* =============================================================
   STANDALONE RESULTS
   ============================================================= */
.bi-results-wrap { margin-top: 40px; }

.bi-results-loading {
  display:    none;
  text-align: center;
  padding:    48px 0;
  font-family: 'Josefin Sans', sans-serif;
  font-size:  15px;
  color:      #718096;
}

.bi-spinner {
  width: 36px; height: 36px;
  border: 3px solid #E8EAF0; border-top-color: #C8A96E;
  border-radius: 50%;
  animation: bi-spin .7s linear infinite;
  margin: 0 auto 16px;
}

.bi-no-results {
  display: none; text-align: center;
  font-family: 'Josefin Sans', sans-serif; font-size: 15px; color: #718096;
  padding: 48px 0;
}

.bi-results-footer { display:none; text-align:center; margin-top:32px; }

.bi-load-more-btn {
  background: transparent; color: #1A2B4A;
  font-family: 'Josefin Sans', sans-serif; font-size: 14px; font-weight: 600;
  border: 2px solid #1A2B4A; border-radius: 8px;
  padding: 14px 32px; cursor: pointer;
  transition: background .2s, color .2s;
}
.bi-load-more-btn:hover { background: #1A2B4A; color: #FFFFFF; }

/* =============================================================
   STICKY SEARCH BAR — Desktop
   ============================================================= */
.bi-sticky-bar {
  position:   fixed;
  left:       0;
  right:      0;
  z-index:    99990;
  background: #1A2B4A;
  box-shadow: 0 4px 32px rgba(0,0,0,.25);
  padding:    0 24px;
  display:    none; /* JS controls visibility */
  align-items: center;
  gap:        16px;
  height:     64px;
}

/* Shown when scrolled past trigger */
.bi-sticky-bar.bi-sticky-visible { display: flex; }

/* Positions */
.bi-sticky-bar.bi-sticky-pos-top    { top: 0; }
.bi-sticky-bar.bi-sticky-pos-bottom { bottom: 0; }

/* Animations */
.bi-sticky-bar.bi-sticky-anim-slide {
  transform:  translateY(-100%);
  transition: transform .35s cubic-bezier(.22,.68,0,1.2), opacity .25s;
  opacity:    0;
  display:    flex; /* always in DOM, hidden via transform */
}

.bi-sticky-bar.bi-sticky-pos-bottom.bi-sticky-anim-slide {
  transform: translateY(100%);
}

.bi-sticky-bar.bi-sticky-anim-fade {
  opacity:    0;
  transition: opacity .3s;
  display:    flex;
}

.bi-sticky-bar.bi-sticky-anim-none {
  display:    flex;
  visibility: hidden;
  transition: none;
}

.bi-sticky-bar.bi-sticky-visible.bi-sticky-anim-slide {
  transform: translateY(0);
  opacity:   1;
}

.bi-sticky-bar.bi-sticky-visible.bi-sticky-anim-fade {
  opacity: 1;
}

.bi-sticky-bar.bi-sticky-visible.bi-sticky-anim-none {
  visibility: visible;
}

/* Sticky inner layout */
.bi-sticky-inner {
  display:     flex;
  align-items: center;
  gap:         14px;
  max-width:   1400px;
  margin:      0 auto;
  width:       100%;
}

/* Sticky counter */
.bi-sticky-counter {
  display:     flex;
  align-items: baseline;
  gap:         5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.bi-sticky-count {
  font-family: 'Josefin Sans', sans-serif;
  font-size:   22px;
  font-weight: 700;
  color:       #C8A96E;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition:  opacity .2s;
}

.bi-sticky-count-lbl {
  font-family: 'Josefin Sans', sans-serif;
  font-size:   13px;
  font-weight: 600;
  color:       rgba(255,255,255,.7);
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* Sticky filter pills */
.bi-sticky-filters {
  display:   flex;
  flex-wrap: wrap;
  gap:       6px;
  flex:      1 1 0;
  min-width: 0;
}

.bi-sticky-pill {
  font-family:  'Josefin Sans', sans-serif;
  font-size:    13px;
  font-weight:  500;
  color:        rgba(255,255,255,.9);
  background:   rgba(255,255,255,.12);
  border:       1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding:      4px 12px;
  white-space:  nowrap;
}

/* Sticky buttons */
.bi-sticky-btn {
  display:     inline-flex;
  align-items: center;
  gap:         7px;
  height:      40px;
  padding:     0 20px;
  background:  #C8A96E;
  color:       #1A2B4A;
  font-family: 'Josefin Sans', sans-serif;
  font-size:   14px;
  font-weight: 700;
  border:      none;
  border-radius: 8px;
  cursor:      pointer;
  transition:  background .2s, transform .15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.bi-sticky-btn:hover {
  background: #b8955c;
  transform:  translateY(-1px);
}

.bi-sticky-desktop-btn { display: inline-flex; }
.bi-sticky-mobile-btn  { display: none; }

/* =============================================================
   MOBILE BOTTOM SHEET / OFFCANVAS
   ============================================================= */
.bi-mobile-overlay {
  position:    fixed;
  inset:       0;
  z-index:     99991;
  background:  rgba(0,0,0,0);
  pointer-events: none;
  transition:  background .3s;
}

.bi-mobile-overlay.bi-overlay-visible {
  background:  rgba(0,0,0,.5);
  pointer-events: all;
}

/* — Bottom Sheet — */
.bi-mobile-sheet.bi-sheet-bottom-sheet {
  position:     fixed;
  left:         0;
  right:        0;
  bottom:       0;
  z-index:      99992;
  background:   #FFFFFF;
  border-radius: 20px 20px 0 0;
  box-shadow:   0 -8px 40px rgba(0,0,0,.2);
  max-height:   90vh;
  display:      flex;
  flex-direction: column;
  transform:    translateY(100%);
  transition:   transform .35s cubic-bezier(.22,.68,0,1.2);
  will-change:  transform;
}

/* — Offcanvas (right side) — */
.bi-mobile-sheet.bi-sheet-offcanvas {
  position:    fixed;
  top:         0;
  right:       0;
  bottom:      0;
  z-index:     99992;
  width:       min(380px, 92vw);
  background:  #FFFFFF;
  box-shadow:  -8px 0 40px rgba(0,0,0,.2);
  display:     flex;
  flex-direction: column;
  transform:   translateX(100%);
  transition:  transform .35s cubic-bezier(.22,.68,0,1.2);
  will-change: transform;
}

/* Open state */
.bi-mobile-sheet.bi-sheet-open.bi-sheet-bottom-sheet {
  transform: translateY(0);
}
.bi-mobile-sheet.bi-sheet-open.bi-sheet-offcanvas {
  transform: translateX(0);
}

/* Sheet header */
.bi-sheet-header {
  display:     flex;
  align-items: center;
  justify-content: space-between;
  padding:     18px 20px 12px;
  border-bottom: 1px solid #F0F0F0;
  flex-shrink: 0;
}

/* Drag handle for bottom sheet */
.bi-sheet-bottom-sheet .bi-sheet-header::before {
  content:   '';
  position:  absolute;
  top:       10px;
  left:      50%;
  transform: translateX(-50%);
  width:     40px;
  height:    4px;
  background: #CBD5E0;
  border-radius: 2px;
}

.bi-sheet-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size:   16px;
  font-weight: 700;
  color:       #1A2B4A;
}

.bi-sheet-close {
  width:       36px;
  height:      36px;
  display:     flex;
  align-items: center;
  justify-content: center;
  background:  rgba(26,43,74,.06);
  border:      none;
  border-radius: 50%;
  cursor:      pointer;
  color:       #1A2B4A;
  transition:  background .2s;
  flex-shrink: 0;
}

.bi-sheet-close:hover { background: rgba(26,43,74,.12); }

/* Sheet body — scrollable, contains the moved form */
.bi-sheet-body {
  flex:       1;
  overflow-y: auto;
  padding:    16px 20px;
  -webkit-overflow-scrolling: touch;
}

/* Inside sheet: 1-column flex */
.bi-sheet-body .houzez-ele-search-form-wrapper {
  flex-wrap: wrap !important;
}
.bi-sheet-body .bi-field-group {
  width:     100% !important;
  max-width: 100% !important;
}

/* Sheet footer */
.bi-sheet-footer {
  padding:      12px 20px;
  border-top:   1px solid #F0F0F0;
  flex-shrink:  0;
}

.bi-sheet-submit {
  width:        100% !important;
  font-size:    16px !important;
}

/* Lock body scroll when sheet open */
body.bi-sheet-lock { overflow: hidden; }

/* =============================================================
   RESPONSIVE — TABLET (≤1024px) — Fallback grid cols
   ============================================================= */
@media (max-width: 1024px) {
  .bi-layout-hero { padding: 56px 24px; }

  /* Sticky adjustments */
  .bi-sticky-inner { gap: 10px; }
  .bi-sticky-filters { display: none; } /* hide pills on tablet */
}

/* =============================================================
   RESPONSIVE — MOBILE (≤767px)
   ============================================================= */
@media (max-width: 767px) {
  .bi-seo-title { font-size: clamp(20px,5vw,26px); }
  .bi-counter-number { font-size: 32px; }

  .bi-layout-hero {
    padding:       48px 16px;
    border-radius: 12px;
  }

  .bi-popular-searches { gap: 6px; margin-top: 12px; }
  .bi-popular-searches__link { font-size: 12px; padding: 4px 12px; }

  .bi-connected-pagination ul.page-numbers li a,
  .bi-connected-pagination ul.page-numbers li span {
    min-width: 36px; height: 36px; font-size: 13px;
  }

  /* Sticky — Mobile layout */
  .bi-sticky-bar {
    padding:  0 16px;
    height:   56px;
  }

  .bi-sticky-counter { gap: 3px; }
  .bi-sticky-count   { font-size: 18px; }

  .bi-sticky-desktop-btn { display: none; }
  .bi-sticky-mobile-btn  { display: inline-flex; }

  .bi-sticky-mobile-btn {
    flex:     1;
    justify-content: center;
    height:   40px;
    font-size: 14px;
  }

  .bi-sticky-count-lbl { display: none; }
}

/* ==========================================================/* =============================================================
   HOUZEZ-COMPATIBLE FIELD WIDTHS + EDITOR MODE
   Uses elementor-col-N / elementor-md-N / elementor-sm-N system
   (CSS already in Elementor frontend.css — no custom rules needed)
   ============================================================= */

/* bi-field-group base: same role as elementor-column */
/* Desktop width set via inline style='width:N%;max-width:N%' (specificity 1,0,0,0 — beats all class rules).
   Tablet/mobile overrides via CSS custom props + !important below. */
.bi-field-group {
  box-sizing:   border-box;
  flex-shrink:  0;
  padding-left: 3px;
  padding-right: 3px;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .bi-field-group {
    width:     var(--biw-t, var(--biw-d, 20%)) !important;
    max-width: var(--biw-t, var(--biw-d, 20%)) !important;
  }
}

/* Editor mode - make selects visible without Bootstrap-select JS */
.bi-editor-mode .selectpicker {
  display: block !important;
  width: 100%;
  -webkit-appearance: none;
}

.bi-editor-mode .bootstrap-select,
.bi-editor-mode .bootstrap-select .dropdown-toggle {
  width: 100% !important;
}

@media (max-width: 767px) {
  .bi-field-group {
    width:     var(--biw-m, 100%) !important;
    max-width: var(--biw-m, 100%) !important;
    padding:   0 2px;
  }
}
/* =============================================================
   EDITOR PREVIEW — force desktop column widths unconditionally
   (elementor-col-N requires min-width:768px which the editor
   preview panel is often narrower than — this override fixes it)
   ============================================================= */
.bi-editor-mode .elementor-form-fields-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}
.bi-editor-mode .elementor-column.elementor-col-5  { width: 5%; }
.bi-editor-mode .elementor-column.elementor-col-6  { width: 6%; }
.bi-editor-mode .elementor-column.elementor-col-7  { width: 7%; }
.bi-editor-mode .elementor-column.elementor-col-8  { width: 8%; }
.bi-editor-mode .elementor-column.elementor-col-9  { width: 9%; }
.bi-editor-mode .elementor-column.elementor-col-10 { width: 10%; }
.bi-editor-mode .elementor-column.elementor-col-11 { width: 11.111%; }
.bi-editor-mode .elementor-column.elementor-col-12 { width: 12.5%; }
.bi-editor-mode .elementor-column.elementor-col-14 { width: 14.285%; }
.bi-editor-mode .elementor-column.elementor-col-15 { width: 15%; }
.bi-editor-mode .elementor-column.elementor-col-16 { width: 16.666%; }
.bi-editor-mode .elementor-column.elementor-col-20 { width: 20%; }
.bi-editor-mode .elementor-column.elementor-col-25 { width: 25%; }
.bi-editor-mode .elementor-column.elementor-col-30 { width: 30%; }
.bi-editor-mode .elementor-column.elementor-col-33 { width: 33.333%; }
.bi-editor-mode .elementor-column.elementor-col-35 { width: 35%; }
.bi-editor-mode .elementor-column.elementor-col-40 { width: 40%; }
.bi-editor-mode .elementor-column.elementor-col-45 { width: 45%; }
.bi-editor-mode .elementor-column.elementor-col-50 { width: 50%; }
.bi-editor-mode .elementor-column.elementor-col-55 { width: 55%; }
.bi-editor-mode .elementor-column.elementor-col-60 { width: 60%; }
.bi-editor-mode .elementor-column.elementor-col-65 { width: 65%; }
.bi-editor-mode .elementor-column.elementor-col-66 { width: 66.666%; }
.bi-editor-mode .elementor-column.elementor-col-70 { width: 70%; }
.bi-editor-mode .elementor-column.elementor-col-75 { width: 75%; }
.bi-editor-mode .elementor-column.elementor-col-80 { width: 80%; }
.bi-editor-mode .elementor-column.elementor-col-83 { width: 83.333%; }
.bi-editor-mode .elementor-column.elementor-col-90 { width: 90%; }
.bi-editor-mode .elementor-column.elementor-col-100 { width: 100%; }

/* ============================================================
   CHIPS WIDGET V3 — Type de bien multi-sélection
   ============================================================ */

.bi-chips-widget {
  position: relative;
  width: 100%;
}

.bi-chips-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
  overflow: hidden;
}

.bi-chips-display {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  width: 100%;
  min-height: 52px;
  padding: 7px 10px 7px 12px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  box-sizing: border-box;
  font-family: "Josefin Sans", sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.bi-chips-display:focus,
.bi-chips-display[aria-expanded="true"] {
  border-color: #C8A96E;
  outline: none;
  box-shadow: 0 0 0 3px rgba(200,169,110,.15);
}

.bi-chips-placeholder {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 13px;
  font-family: "Josefin Sans", sans-serif;
  font-weight: 400;
  pointer-events: none;
  white-space: nowrap;
}

.bi-chips-arrow { opacity: 0.45; flex-shrink: 0; }

.bi-chips-tags { display: contents; }

.bi-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #C8A96E;
  color: #1A2B4A;
  font-family: "Josefin Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 4px 6px 4px 9px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1;
}

.bi-chip--hidden { display: none !important; }
.bi-chip-label   { pointer-events: none; }

.bi-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: rgba(26,43,74,.2);
  border: none;
  border-radius: 50%;
  color: #1A2B4A;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s;
}
.bi-chip-remove:hover { background: rgba(26,43,74,.38); }

.bi-chips-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1A2B4A;
  color: #fff;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.2s, transform 0.15s;
}
.bi-chips-add:hover { background: #2C4570; transform: scale(1.1); }

.bi-chips-more {
  font-family: "Josefin Sans", sans-serif;
  font-size: 12px;
  color: #718096;
  font-weight: 600;
  white-space: nowrap;
  align-self: center;
}

.bi-chips-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(26,43,74,.15);
  z-index: 9999;
  max-height: 260px;
  overflow-y: auto;
}

.bi-chips-option {
  padding: 10px 14px;
  font-family: "Josefin Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #1A2B4A;
  cursor: pointer;
  transition: background 0.15s;
}
.bi-chips-option:hover:not(.bi-chips-opt--active) { background: #f5f7fa; }

.bi-chips-opt--active {
  color: #9ca3af;
  cursor: default;
}
.bi-chips-opt--active::after { content: " \2713"; color: #C8A96E; }

/* Icon wrap — allow chips to grow beyond single line */
.bi-has-chips {
  height: auto !important;
  min-height: 52px;
}
.bi-has-chips .bi-field-icon {
  top: 17px;
  transform: none;
}
.bi-has-chips .bi-chips-display {
  padding-left: 36px;
}

@media (max-width: 767px) {
  .bi-chips-display { min-height: 48px; }
  .bi-chip { font-size: 11px; }
}
