/* Make search input and filter buttons the same height */
.miami-autocomplete-input,
.filter-button,
.miami-select {
  height: 44px !important;          /* fixed height for consistency */
  padding: 0 14px !important;       /* same horizontal padding */
  font-size: 16px !important;
  line-height: 1.2 !important;
  border-radius: 8px !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  display: flex;
  align-items: center;
}

/* ==================== Commercial Filters (For Sale / For Lease) ==================== */
/* Keep these overrides scoped to commercial so we don't disturb residential UI.
   IMPORTANT: mobile layout is handled in filters.css (grid). We only force the desktop
   flex row here to avoid overriding the mobile experience.
*/

/* Desktop: keep the commercial filter bar on a single line.
   We intentionally tighten fixed-width controls and allow the keyword field to flex.
   On smaller viewports, the bar can wrap for usability.
*/
@media (min-width: 900px) {
  /* Desktop: flex row */
  .rv-commercial-filters .miami-filters-row,
  .rv-commercial-filters .rv-commercial-filters-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 10px;
    /* Theme-safe: prevent inherited space-between from pushing fields too far right */
    justify-content: flex-start !important;
  }

  .rv-commercial-filters .miami-autocomplete-wrapper {
    /* Let the keyword field flex; keep enough minimum so other controls don't overlap */
    flex: 1 1 560px;
    min-width: 420px;
  }

  /* IMPORTANT: size the FLEX ITEMS (wrappers), not only the inner buttons.
     If we size only the button, the wrapper can collapse and the button will overflow/overlap.
  */
  .rv-commercial-filters select.rv-deal {
    flex: 0 0 125px;
    min-width: 125px;
  }

  .rv-commercial-filters #rv-asset-dd {
    flex: 0 0 200px;
    min-width: 200px;
  }

  .rv-commercial-filters #rv-price-dd {
    flex: 0 0 130px;
    min-width: 130px;
  }

  .rv-commercial-filters #rv-size-dd {
    flex: 0 0 115px;
    min-width: 115px;
  }

  .rv-commercial-filters .miami-filters-actions {
    margin-left: auto !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .rv-commercial-filters .miami-filters-actions .miami-btn-reset,
  .rv-commercial-filters .miami-filters-actions .miami-btn-save {
    font-size: 14px !important;
    padding: 0 14px !important;
  }
}

/* Make the keyword field a bit longer on desktop */
.rv-commercial-filters .miami-autocomplete-wrapper {
  flex: 1 1 420px;
  /* Allow the row to stay on one line on typical desktop widths */
  min-width: 260px;
  max-width: none;
}

/* Push Reset/Save to the far right */
.rv-commercial-filters .miami-filters-actions {
  margin-left: auto !important;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

/* Ensure price fields are not inadvertently auto-margined by theme styles */
.rv-commercial-filters #price-min,
.rv-commercial-filters #price-max,
.rv-commercial-filters #size-min,
.rv-commercial-filters #size-max {
  margin-left: 0 !important;
}

/* Match border width + radius + height across commercial controls */
.rv-commercial-filters .rv-pill-select,
.rv-commercial-filters .rv-pill-button {
  height: 44px !important;
  border-radius: 8px !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  padding: 0 14px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  box-sizing: border-box;
}

.rv-commercial-filters .rv-pill-select {
  -webkit-appearance: none;
  appearance: none;
}


/* Add dropdown chevrons (commercial only) */
.rv-commercial-filters .rv-pill-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23111' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px 8px !important;
  padding-right: 34px !important;
}

.rv-commercial-filters .rv-pill-button {
  position: relative;
  padding-right: 34px !important;
}

.rv-commercial-filters .rv-pill-button::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 12px;
  height: 8px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23111' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 12px 8px;
  pointer-events: none;
  opacity: 0.9;
}
.rv-commercial-filters .rv-pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start; /* left-align label */
  text-align: left;
}

/* IMPORTANT: The commercial filter row is a flex container.
   Do NOT set fixed widths/flex sizing on the inner buttons, otherwise the
   wrapper can collapse and the button will overflow/overlap adjacent controls.
   Widths are controlled on the flex items (wrappers) in the desktop media query above.
*/
.rv-commercial-filters select.rv-deal { width: 100%; }
.rv-commercial-filters #rv-asset-type-btn,
.rv-commercial-filters #rv-price-btn,
.rv-commercial-filters #rv-size-btn { width: 100%; }

/* Popover shell */
.rv-popover { position: relative; }
.rv-popover-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  display: none;
  min-width: 360px;
}
.rv-popover.open .rv-popover-panel { display: block; }
.rv-popover-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.rv-popover-row { display: flex; align-items: center; gap: 10px; }
.rv-popover-sep { font-size: 13px; color: #6b7280; }
.rv-popover-hint { margin-top: 8px; font-size: 12px; color: #6b7280; }

.rv-commercial-filters .rv-pill-input {
  height: 42px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 0 12px;
  font-size: 14px;
  width: 100%;
}

@media (max-width: 640px) {
  .rv-popover-panel { min-width: 300px; }
}

/* Prevent search box text from sitting off-center */
.miami-autocomplete-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.miami-filters-bar{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
}
.miami-filters-actions{
  display:flex;
  align-items:flex-end;
}
.miami-btn-save {
  border-radius: 8px !important;   /* override pill radius */
  background: var(--rv-navy, #0a1c2f) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  height: 44px !important;         /* match filter height */
  line-height: 1.2 !important;
  padding: 0 18px !important;      /* uniform padding */
  cursor: pointer;
  border: 1px solid var(--rv-navy, #0a1c2f) !important;
  transition: background .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.miami-btn-save:hover {
  background: var(--rv-gold, #c7ac6f) !important;
  border: 1px solid var(--rv-gold, #c7ac6f) !important;
  color: var(--rv-navy, #0a1c2f) !important;
}

.miami-btn-save:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(199,172,111,0.30);
}

/* Reset button (Commercial + Residential) */
.rv-commercial-filters .miami-btn-reset,
.rv-residential-filters .miami-btn-reset {
  box-shadow: 0 1px 2px rgba(0,0,0,.03) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--rv-navy, #0a1c2f) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  height: 44px !important;
  line-height: 1.2 !important;
  padding: 0 18px !important;
  cursor: pointer;
  border: 1px solid #e5e7eb !important;
  transition: background .2s ease, border .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}
.miami-btn-reset:hover {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
}

.rv-commercial-filters .miami-btn-reset:focus-visible,
.rv-residential-filters .miami-btn-reset:focus-visible {
  outline: none;
  border-color: var(--rv-gold, #c7ac6f) !important;
  box-shadow: 0 0 0 3px rgba(199,172,111,0.25);
}
button.miami-btn-save,
.miami-filters-bar .miami-btn-save,
.miami-btn-save {
  border-radius: 8px !important;
 margin-right:16px;    
    
}

/* Force 8px corners on the filters — higher specificity + important */
.miami-filters-bar .miami-filters--selects select.miami-select,
.miami-filters-bar .miami-filters--selects input.miami-input,
.miami-filters-bar .miami-filters--selects .miami-select,
.miami-filters-bar .miami-filters--selects .miami-input {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 8px !important;
}

/* If any residual buttons exist in the bar (e.g., Apply) */
.miami-filters-bar .apply-button,
.miami-filters-bar .filter-button {
  border-radius: 8px !important;
}

/* Mobile toggle buttons, if they picked up the pill style */
.miami-mobile-header .miami-toggle-btn {
  border-radius: 8px !important;
}

/* Prevent theme utility classes from re-rounding nested controls */
.miami-filters-bar *[class*="radius"],
.miami-filters-bar *[class*="rounded"] {
  border-radius: 8px !important;
}

/* --------------------------------------------------
   listings-grid-style.css (combined filters + grid styles)
   -------------------------------------------------- */
/* ==================== Filters Bar & Autocomplete ==================== */
.miami-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  padding: 0 10px 10px 10px;
  background: #fff;
    z-index:1001 !important;
    position:fixed !important;
    width:100%;
}

.miami-filters-bar input[type="text"] {
  padding: 10px;
  font-size: 14px;
  line-height: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
}
.filter-dropdown {
  position: relative;
}
.filter-button {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  line-height: 20px;
}
.filter-menu {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 16px;
  z-index: 9999;
  min-width: 220px;
  white-space: nowrap;
  box-sizing: border-box;
  text-align: left;
  direction: ltr;
}
.filter-dropdown.open .filter-menu {
  display: block;
}
.filter-menu label,
.filter-menu input[type="number"],
.filter-menu select {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}
.filter-menu input[type="checkbox"],
.filter-menu input[type="radio"] {
  margin-right: 8px;
}
.apply-button {
  background-color: #c7ac6f;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  padding: 10px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
}
.apply-button:hover {
  background-color: #0d0d0d;
}

/* Autocomplete wrapper & dropdown */
.miami-autocomplete-wrapper {
  position: relative;
  flex: 0 0 40%;
  min-width: 300px;
  max-width: 40%;
  overflow: visible;
  z-index: 1;
}
.miami-autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #fff;
  max-height: 350px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  isolation: isolate; /* Prevent z-index conflicts */
}
.miami-autocomplete-suggestions::-webkit-scrollbar {
  width: 10px;
}
.miami-autocomplete-suggestions::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 6px;
}
.miami-autocomplete-suggestions::-webkit-scrollbar-track {
  background: #eee;
}
.miami-autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f1f1f1;
  background-color: #fff;
}
.miami-autocomplete-item:hover {
  background: #f7f7f7;
}
.miami-autocomplete-heading {
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: #c7ac6f;
  border-bottom: 1px solid #e0e0e0;
  text-transform: uppercase;
  pointer-events: none;
}
.miami-autocomplete-item.no-match {
  color: #999;
  font-style: italic;
  text-align: center;
  padding: 12px;
  pointer-events: none;
}

/* ==================== Grid Header & Sort ==================== */
/* ── Grid header: title on its own line, controls below ── */
.miami-grid-header {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
  margin: 1.5rem 0 !important;
}
/* Title full-width */
.miami-grid-header > h1 {
  margin: 0 !important;
  width: 100% !important;
}

/* Controls row: count on left, sort label+select on right */
.miami-grid-header .miami-sort-container {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  margin-top:-20px;
}

/* Never wrap the count text */
.miami-sort-container .miami-listings-count {
  margin: 0 !important;
  white-space: nowrap !important;
  font-weight: normal !important;
}

/* Push “Sort” label and dropdown to the right */
.miami-sort-container label {
  margin: 0 10px 0 0 !important;
  margin-left: auto !important;
  font-weight: normal !important;
}

.miami-sort-container label::after {
  content: ":";
}

/* Tidy up the dropdown’s width */
.miami-sort-container select#miami-sort {
  flex: 0 0 220px !important;
  max-width: 220px !important;
  width: 100% !important;
  font-size: 14px !important; /* fit "Price (High to Low)" */
  padding-right: 34px !important;
}

/* ==================== Split Layout: Map + Grid ==================== */
@media (min-width: 769px) {
    
.miami-mobile-header {
  display: none;
}    
    
.miami-split-layout {
    display: block;
    overflow: visible;
  }

  /* 1) Pin the map between header and footer */
:root {
  --filters-height:  80px;   /* height of your filters bar */
  --footer-height:  130px;   /* height of your footer */
}

/* 1) FIXED LEFT MAP */
.miami-map-panel {
  position: fixed;                            /* pin it in place */
  top: 130px;
  left: 0;                                    /* flush to left edge */
  width: 50%;                                 /* half the viewport width */
  height: calc(100vh - var(--filters-height));/* fill to bottom of window */
  background: #e0e0e0;                        /* or transparent if you like */
  z-index: 10;     /* above the grid */
}
    

  /* 2) Push the grid out of the map’s left half */
  .miami-grid-panel {
margin-left: 50%;    /* carve out left half for map */
  height: 100%;
  overflow-y: auto;    /* only this side scrolls */
  -webkit-overflow-scrolling: touch; /* smooth on iOS */
  background: #fff;
  padding: 20px;
  box-sizing: border-box;
  z-index: 0;
  }

  /* 3) Restore normal page scrolling */
  body {
    overflow-y: auto;
  }
/* Top-left overlay with listing count */
#miami-map-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fff;
  color: #111;
  padding: 6px 12px;
  font-weight: bold;
  font-size: 14px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  z-index: 999;
}
}
/* ==================== Listings Grid & Cards ==================== */
.miami-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.miami-listing-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.miami-listing-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.miami-listing-card a {
  color: inherit;
  text-decoration: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.miami-listing-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.miami-listing-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.miami-listing-content h3 {
  font-size: 18px;
  margin: 0 0 8px 0;
  color: #333;
}
.miami-price {
  font-weight: bold;
  font-size: 16px;
  color: #0073aa;
  margin-bottom: 6px;
}
.miami-details {
  font-size: 14px;
  color: #666;
}

/* ==================== Pagination ==================== */
#miami-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 2rem 0;
}

.miami-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-weight: 500;
  color: #000;
  transition: background-color 0.2s;
}

.miami-page-link:hover {
  background-color: #f0f0f0;
}

.miami-page-current {
  background-color: #000;
  border-color: #000;
  color: #fff;
}
.miami-page-link.miami-page-current {
  background-color: #000;
  border-color: #000;
  color: #fff !important;
}

/* ==================== MOBILE FIX ==================== */
@media (max-width: 768px) {
  .miami-grid-header {
    display: none !important;
  }
  .miami-filters-bar {
    position: fixed;
    top: 58px;
    width: 100%;
    z-index: 1001;
    background: #fff;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #eee;
  }

  .miami-mobile-header {
    position: fixed;
    top: 180px;
    width: 100%;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: #fff;
    border-bottom: 1px solid #eee;
    height: auto;
    row-gap: 8px;
  }

  .miami-toggle-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    font-size: 14px;
  }

  .miami-toggle-btn.active {
    background: #000;
    color: #fff;
  }

  .miami-mobile-toggle {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
  }

  .miami-mobile-count {
    font-size: 14px;
    font-weight: bold;
  }

  .miami-mobile-sort select {
    font-size: 14px;
  }

  .miami-split-layout {
    position: relative;
    flex-direction: column;
    height: calc(100vh - 56px);
    overflow: hidden;
  }

  .miami-grid-panel,
  .miami-map-panel {
    position: absolute;
    top: var(--rv-mobile-top, 170px); /* below filters and header */
    left: 0;
    width: 100%;
    height: calc(100% - var(--rv-mobile-top, 170px));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .miami-split-layout.show-grid .miami-grid-panel {
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    /* Slightly tighten top spacing on mobile so the first card sits closer to the header row. */
    padding: 0.5rem 1rem 1rem;
    box-sizing: border-box;
  }

  .miami-split-layout.show-map .miami-map-panel {
    opacity: 1;
    pointer-events: auto;
    z-index: 0;
  }

  .miami-listings-grid {
    grid-template-columns: 1fr;
    padding-left: 12px;
    padding-right: 12px;
  }
}




/*=============================================
  1) Hide the built-in InfoWindow arrow
=============================================*/
/*—— Reset ALL InfoWindow wrapper spacing ——*/
.gm-style .gm-style-iw {
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important; /* allow our custom arrow to show */
}

.gm-style .gm-style-iw-s,
.gm-style .gm-style-iw-c,
.gm-style .gm-style-iw-d {
  margin: -17px 0 0 0 !important;
  padding: 0 !important;
  overflow: visible !important; /* allow our custom arrow to show */
}

/*———————————————————————————————————————
  hide Google’s default tip so it doesn’t double-up
———————————————————————————————————————*/
/* the little “sibling” DIV that actually draws the arrow */
.gm-style .gm-style-iw + div {
  display: none !important;
}

/* just in case, also target their pseudo-elements: */
.gm-style .gm-style-iw-t::after,
.gm-style .gm-style-iw-s::before {
  display: none !important;
}

/*—— Add YOUR single arrow at the bottom ——*/
.gm-style .gm-style-iw-d {
  position: relative !important;
}
.gm-style .gm-style-iw-d::after {
  content: "";
  position: absolute;
  bottom: -8px;       /* pulls the arrow just below the bubble */
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

/* hide the invisible close-button container */
.gm-style .gm-ui-hover-effect {
  display: none !important;
}
/* Make the Property Type dropdown wide enough to keep long items on one line (commercial only) */
.rv-commercial-filters #rv-asset-type-panel {
  width: 360px;
  left: 0;
  right: auto;
}

.rv-commercial-filters #rv-asset-type-panel .rv-checkbox-item span {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .rv-commercial-filters #rv-asset-type-panel {
    width: calc(100vw - 24px);
    max-width: 420px;
  }
}

/* Progressive "Load More" button (Map + Grid) */
#miami-pagination {
  display: flex;
  justify-content: center;
  padding: 16px 0 24px;
}

.miami-load-more-btn {
  background: var(--rv-navy, #001f3f);
  color: #fff;
  border: 1px solid var(--rv-navy, #001f3f);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}

.miami-load-more-btn:hover {
  background: var(--rv-gold, #c9a227);
  border-color: var(--rv-gold, #c9a227);
  color: var(--rv-navy, #001f3f);
}

.miami-load-more-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ==================== Residential Filters (For Sale / For Rent / Sold) ==================== */
/* Mirrors Commercial filter bar sizing and alignment so Residential can scale as we add more fields. */
@media (min-width: 900px) {
  .rv-residential-filters .miami-filters-row,
  .rv-residential-filters .rv-residential-filters-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 8px;
    justify-content: flex-start !important;
  }

  .rv-residential-filters .miami-autocomplete-wrapper {
    /* Give search more room so placeholder is readable. */
    flex: 1 1 640px;
    min-width: 520px;
  }

  .rv-residential-filters select.rv-deal {
    flex: 0 0 130px;
    min-width: 130px;
  }

  .rv-residential-filters #rv-price-dd {
    flex: 0 0 120px;
    min-width: 120px;
  }

  .rv-residential-filters #rv-size-dd {
    flex: 0 0 150px;
    min-width: 150px;
  }

  .rv-residential-filters #rv-bb-dd {
    flex: 0 0 175px;
    min-width: 175px;
  }

  .rv-residential-filters #rv-home-type-dd {
    flex: 0 0 150px;
    min-width: 150px;
  }

  .rv-residential-filters .miami-filters-actions {
    margin-left: auto !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .rv-residential-filters .miami-filters-actions .miami-btn-save {
    font-size: 14px !important;
    padding: 0 14px !important;
  }
}

.rv-residential-filters .miami-autocomplete-wrapper {
  flex: 1 1 420px;
  min-width: 260px;
  max-width: none;
}

.rv-residential-filters .miami-filters-actions {
  margin-left: auto !important;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

/* Match border width + radius + height across residential controls */
.rv-residential-filters .rv-pill-select,
.rv-residential-filters .rv-pill-button {
  height: 44px !important;
  border-radius: 8px !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  padding: 0 14px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  box-sizing: border-box;
}

/* Slightly tighter padding on longer residential labels so we can widen search.
   (Search placeholder should remain readable on desktop.) */
.rv-residential-filters #rv-bb-btn,
.rv-residential-filters #rv-price-btn {
  padding-left: 12px !important;
  padding-right: 32px !important; /* keep room for chevron */
}

.rv-residential-filters .rv-pill-select {
  -webkit-appearance: none;
  appearance: none;
}

/* Add dropdown chevrons (residential only) */
.rv-residential-filters .rv-pill-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23111' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px 8px !important;
  padding-right: 34px !important;
}

.rv-residential-filters .rv-pill-button {
  position: relative;
  padding-right: 34px !important;
}

.rv-residential-filters .rv-pill-button::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 12px;
  height: 8px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23111' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 12px 8px;
  pointer-events: none;
  opacity: 0.9;
}

.rv-residential-filters .rv-pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.rv-residential-filters select.rv-deal { width: 100%; }
.rv-residential-filters #rv-price-btn { width: 100%; }
.rv-residential-filters #rv-size-btn { width: 100%; }
.rv-residential-filters #rv-bb-btn { width: 100%; }
.rv-residential-filters #rv-home-type-btn { width: 100%; }

.rv-residential-filters .rv-pill-input {
  height: 42px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 0 12px;
  font-size: 14px;
  width: 100%;
}


/* Beds & Baths (Residential) */
.rv-bb-panel { min-width: 360px; }
.rv-bb-group { margin-top: 10px; }
.rv-bb-group-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #111827; }
.rv-bb-options { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-bb-option {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}
.rv-bb-option:hover { border-color: #cbd5e1; }
.rv-bb-option.active {
  background: var(--rv-navy, #0a1c2f);
  border-color: var(--rv-navy, #0a1c2f);
  color: #fff;
}
.rv-bb-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.rv-bb-clear {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  height: 38px;
  padding: 0 14px;
  font-weight: 600;
  cursor: pointer;
}
.rv-bb-clear:hover { border-color: #cbd5e1; }
.rv-bb-apply {
  background: var(--rv-navy, #0a1c2f);
  border: 1px solid var(--rv-navy, #0a1c2f);
  color: #fff;
  border-radius: 10px;
  height: 38px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}
.rv-bb-apply:hover {
  background: var(--rv-gold, #c7ac6f);
  border-color: var(--rv-gold, #c7ac6f);
  color: var(--rv-navy, #0a1c2f);
}

@media (max-width: 640px) {
  .rv-bb-panel { min-width: 300px; }
}
