.ew-har-search[data-ew-search-version="1"] {
  --ew-search-blue: #003da5;
  --ew-search-card: #fffcf5;
  --ew-search-cream: #f7f5ee;
  --ew-search-hairline: rgba(0, 14, 53, 0.14);
  --ew-search-ink: #232323;
  --ew-search-muted: #656b78;
  --ew-search-navy: #000e35;
  --ew-search-red: #cc0000;
  color: var(--ew-search-ink);
  font-family: Montserrat, Arial, sans-serif;
  margin: 0 auto;
  max-width: 1440px;
  min-height: 420px;
  width: 100%;
}

.ew-har-search[data-ew-search-version="1"] *,
.ew-har-search[data-ew-search-version="1"] *::before,
.ew-har-search[data-ew-search-version="1"] *::after {
  box-sizing: border-box;
}

.ew-har-search[data-ew-search-version="1"] button,
.ew-har-search[data-ew-search-version="1"] input,
.ew-har-search[data-ew-search-version="1"] select {
  font: inherit;
}

.ew-har-search[data-ew-search-version="1"] button,
.ew-har-search[data-ew-search-version="1"] select {
  cursor: pointer;
}

/*
 * Astra/theme paints EVERY button bright blue via:
 *   button:not(.menu-toggle):not(...×8 more): { background:#0043FF !important }
 * That selector is specificity (0,9,1) and beats class-only rules.
 * An ID (#ew-houston-search) is (1,0,0)+ and wins. Mirror the EW Listings reset.
 */
#ew-houston-search button {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
  max-width: none !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: auto !important;
}

.ew-har-search[data-ew-search-version="1"] a:focus-visible,
.ew-har-search[data-ew-search-version="1"] button:focus-visible,
.ew-har-search[data-ew-search-version="1"] input:focus-visible,
.ew-har-search[data-ew-search-version="1"] select:focus-visible,
.ew-har-search[data-ew-search-version="1"] summary:focus-visible {
  outline: 3px solid rgba(0, 61, 165, 0.36);
  outline-offset: 3px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-skip {
  background: #fff;
  border: 2px solid var(--ew-search-blue);
  color: var(--ew-search-navy) !important;
  font-size: 12px;
  font-weight: 800;
  left: -10000px;
  padding: 10px 14px;
  position: absolute;
  text-decoration: none !important;
  top: 16px;
  z-index: 100;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-skip:focus {
  left: 16px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-dock {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--ew-search-hairline);
  border-radius: 16px;
  box-shadow: 0 20px 50px -34px rgba(0, 14, 53, 0.55);
  margin: 0 clamp(16px, 3vw, 42px);
  padding: clamp(16px, 2.4vw, 26px);
  position: sticky;
  top: var(--ew-search-sticky-offset, 86px);
  z-index: 18;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-primary-row {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) auto;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-location-wrap {
  min-width: 0;
  position: relative;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-label {
  color: var(--ew-search-blue);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-location-field {
  align-items: center;
  background: var(--ew-search-card);
  border: 1px solid var(--ew-search-hairline);
  border-radius: 999px;
  display: flex;
  min-height: 54px;
  padding: 0 18px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-location-field:focus-within {
  border-color: var(--ew-search-blue);
  box-shadow: 0 0 0 3px rgba(0, 61, 165, 0.12);
}

.ew-har-search[data-ew-search-version="1"] .ew-search-location-icon {
  color: var(--ew-search-blue);
  flex: 0 0 auto;
  font-size: 18px;
  margin-right: 10px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-location-input {
  background: transparent;
  border: 0;
  color: var(--ew-search-navy);
  font-size: 15px;
  min-height: 52px;
  min-width: 0;
  outline: 0;
  padding: 0;
  width: 100%;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-location-input::placeholder {
  color: #777d88;
}

#ew-houston-search button.ew-search-submit {
  align-items: center;
  background: var(--ew-search-red) !important;
  background-color: var(--ew-search-red) !important;
  border: 1px solid var(--ew-search-red) !important;
  border-radius: 999px;
  color: #fff !important;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0.1em;
  min-height: 54px !important;
  padding: 0 26px;
  text-transform: uppercase;
  transition: background 160ms ease, transform 160ms ease;
  width: auto !important;
}

#ew-houston-search button.ew-search-submit:hover {
  background: #ac0000 !important;
  background-color: #ac0000 !important;
  transform: translateY(-1px);
}

.ew-har-search[data-ew-search-version="1"] .ew-search-autocomplete {
  background: #fff;
  border: 1px solid var(--ew-search-hairline);
  border-radius: 12px;
  box-shadow: 0 24px 56px -24px rgba(0, 14, 53, 0.44);
  display: none;
  left: 0;
  list-style: none;
  margin: 8px 0 0 !important;
  max-height: 360px;
  overflow: auto;
  padding: 8px !important;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 30;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-autocomplete[data-open="true"] {
  display: block;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-option {
  align-items: center;
  border-radius: 8px;
  color: var(--ew-search-navy);
  display: flex;
  gap: 12px;
  min-height: 48px;
  padding: 9px 10px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-option[aria-selected="true"],
.ew-har-search[data-ew-search-version="1"] .ew-search-option:hover {
  background: var(--ew-search-cream);
}

.ew-har-search[data-ew-search-version="1"] .ew-search-option-mark {
  align-items: center;
  background: var(--ew-search-navy);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 13px;
  height: 32px;
  justify-content: center;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-option-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-option-copy strong {
  font-size: 13px;
  line-height: 1.35;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-option-copy span {
  color: var(--ew-search-muted);
  font-size: 11px;
  line-height: 1.4;
  margin-top: 2px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-quick-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-select,
.ew-har-search[data-ew-search-version="1"] .ew-search-more summary {
  appearance: none;
  /* WP host page: Astra stretches select { width: 100% } globally, which
     stacked every filter full-width and grew the sticky dock over the
     results. Natural width keeps the quick filters on one row. */
  width: auto;
  background: #fff;
  border: 1px solid var(--ew-search-hairline);
  border-radius: 999px;
  color: var(--ew-search-navy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  min-height: 44px;
  padding: 0 16px;
  text-transform: uppercase;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-select {
  padding-right: 34px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-more {
  position: relative;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-more summary {
  align-items: center;
  display: inline-flex;
  list-style: none;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-more summary::-webkit-details-marker {
  display: none;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-more-panel {
  background: #fff;
  border: 1px solid var(--ew-search-hairline);
  border-radius: 12px;
  box-shadow: 0 22px 48px -26px rgba(0, 14, 53, 0.48);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  left: 0;
  margin-top: 8px;
  padding: 18px;
  position: absolute;
  right: auto;
  width: min(440px, calc(100vw - 40px));
  z-index: 22;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-field label {
  color: var(--ew-search-muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-field input,
.ew-har-search[data-ew-search-version="1"] .ew-search-field select {
  background: #fff;
  border: 1px solid var(--ew-search-hairline);
  border-radius: 7px;
  color: var(--ew-search-navy);
  min-height: 44px;
  padding: 0 10px;
  width: 100%;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-check {
  align-items: center;
  color: var(--ew-search-navy);
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 9px;
  grid-column: 1 / -1;
  min-height: 44px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-check input {
  accent-color: var(--ew-search-blue);
  height: 18px;
  width: 18px;
}

#ew-houston-search button.ew-search-reset {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  color: var(--ew-search-navy) !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  margin-left: auto;
  min-height: 44px !important;
  padding: 0 8px;
  text-transform: uppercase;
  width: auto !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-results-shell {
  padding: 28px clamp(16px, 3vw, 42px) 50px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-results-head {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-results-kicker {
  color: var(--ew-search-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  margin: 0 0 5px !important;
  text-transform: uppercase;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-results-title {
  color: var(--ew-search-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(27px, 3vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-results-title em {
  color: var(--ew-search-blue);
  font-weight: 500;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-summary {
  color: var(--ew-search-muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 7px 0 0 !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-sort-wrap {
  align-items: center;
  display: flex;
  gap: 8px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-sort-wrap label {
  color: var(--ew-search-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card {
  background: var(--ew-search-card);
  border: 1px solid var(--ew-search-hairline);
  border-radius: 18px;
  box-shadow: 0 18px 40px -28px rgba(0, 14, 53, 0.48);
  min-width: 0;
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card:hover {
  border-color: rgba(0, 61, 165, 0.42);
  box-shadow: 0 28px 52px -28px rgba(0, 14, 53, 0.55);
  transform: translateY(-3px);
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-link {
  color: inherit !important;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card:first-child {
  grid-column: span 2;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card:first-child .ew-search-card-link {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-media {
  aspect-ratio: 4 / 3;
  background: #dfe5ef;
  display: block;
  overflow: hidden;
  position: relative;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card:first-child .ew-search-card-media {
  aspect-ratio: auto;
  min-height: 360px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-media img {
  display: block;
  height: 100%;
  margin: 0 !important;
  object-fit: cover;
  transition: transform 260ms ease;
  width: 100%;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card:hover img {
  transform: scale(1.025);
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-badge {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  color: var(--ew-search-blue);
  font-size: 9px;
  font-weight: 800;
  left: 12px;
  letter-spacing: 0.1em;
  padding: 7px 10px;
  position: absolute;
  text-transform: uppercase;
  top: 12px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-photo-fallback {
  align-items: center;
  color: var(--ew-search-blue);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 100%;
  justify-content: center;
  min-height: 250px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 19px 20px 20px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-price {
  color: var(--ew-search-blue);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0 !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-address {
  color: var(--ew-search-navy);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  margin: 13px 0 0 !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-location {
  color: var(--ew-search-muted);
  font-size: 11px;
  line-height: 1.45;
  margin: 3px 0 0 !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-facts {
  border-bottom: 1px solid rgba(0, 14, 53, 0.09);
  border-top: 1px solid rgba(0, 14, 53, 0.09);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, 1fr);
  margin: 16px 0 0;
  padding: 12px 0;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-fact {
  border-left: 1px solid rgba(0, 14, 53, 0.09);
  color: var(--ew-search-muted);
  display: flex;
  flex-direction: column;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 0 9px;
  text-transform: uppercase;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-fact:first-child {
  border-left: 0;
  padding-left: 0;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-fact strong {
  color: var(--ew-search-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 5px;
  text-transform: none;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-meta {
  color: var(--ew-search-muted);
  font-size: 10px;
  line-height: 1.45;
  margin: 12px 0 0 !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-card-cta {
  color: var(--ew-search-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  margin-top: auto;
  padding-top: 15px;
  text-transform: uppercase;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-message {
  align-items: center;
  background: var(--ew-search-cream);
  border: 1px dashed rgba(0, 61, 165, 0.34);
  border-radius: 14px;
  color: var(--ew-search-muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: 1 / -1;
  justify-content: center;
  min-height: 260px;
  padding: 30px;
  text-align: center;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-message strong {
  color: var(--ew-search-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-retry {
  background: var(--ew-search-navy);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-height: 44px;
  padding: 0 18px;
  text-transform: uppercase;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-skeleton {
  background: var(--ew-search-card);
  border: 1px solid var(--ew-search-hairline);
  border-radius: 14px;
  min-height: 370px;
  overflow: hidden;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-skeleton::before {
  animation: ew-search-pulse 1.3s ease-in-out infinite;
  background: #dfe5ef;
  content: "";
  display: block;
  height: 230px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-pagination {
  align-items: center;
  display: none;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-pagination[data-visible="true"] {
  display: flex;
}

#ew-houston-search button.ew-search-page-button {
  background: #fff !important;
  background-color: #fff !important;
  border: 1px solid var(--ew-search-hairline) !important;
  border-radius: 999px;
  color: var(--ew-search-navy) !important;
  font-size: 11px;
  font-weight: 800;
  min-height: 44px !important;
  padding: 0 18px;
  text-transform: uppercase;
}

#ew-houston-search button.ew-search-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-page-status {
  color: var(--ew-search-muted);
  font-size: 11px;
  font-weight: 700;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-compliance {
  border-top: 1px solid var(--ew-search-hairline);
  color: var(--ew-search-muted);
  font-size: 10px;
  line-height: 1.65;
  margin: 34px 0 0;
  padding-top: 18px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@keyframes ew-search-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@media (max-width: 1080px) {
  .ew-har-search[data-ew-search-version="1"] .ew-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .ew-har-search[data-ew-search-version="1"] .ew-search-dock {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    margin-inline: 0;
    position: static;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-primary-row {
    grid-template-columns: 1fr;
  }

  #ew-houston-search button.ew-search-submit {
    width: 100% !important;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-quick-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-select,
  .ew-har-search[data-ew-search-version="1"] .ew-search-more summary {
    width: 100%;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-more-panel {
    left: 0;
    right: auto;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-reset {
    margin-left: 0;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-grid {
    grid-template-columns: 1fr;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-card:first-child {
    grid-column: auto;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-card:first-child .ew-search-card-link {
    display: flex;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-card:first-child .ew-search-card-media {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .ew-har-search[data-ew-search-version="1"] .ew-search-quick-filters {
    grid-template-columns: 1fr;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-more-panel {
    grid-template-columns: 1fr;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-check {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ew-har-search[data-ew-search-version="1"] *,
  .ew-har-search[data-ew-search-version="1"] *::before,
  .ew-har-search[data-ew-search-version="1"] *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}


/* Batch 2a — list / map toggle */
.ew-har-search[data-ew-search-version="1"] .ew-search-head-controls {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: flex-end;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-view-toggle {
  display: inline-flex;
  border: 1px solid var(--ew-search-hairline);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

#ew-houston-search button.ew-search-view-button {
  appearance: none;
  background: transparent !important;
  background-color: transparent !important;
  border: 0;
  color: var(--ew-search-navy) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  min-height: 40px !important;
  padding: 0 16px;
  text-transform: uppercase;
  width: auto !important;
}

#ew-houston-search button.ew-search-view-button.is-active,
#ew-houston-search button.ew-search-view-button[aria-pressed="true"] {
  background: var(--ew-search-navy) !important;
  background-color: var(--ew-search-navy) !important;
  color: #fff !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-stage {
  margin: 0;
}

/*
 * Astra / theme author rules set `display: grid` on `.ew-search-grid` and beat
 * the HTML `hidden` attribute (no UA `!important` in this stack). Drive
 * list/map visibility from stage data-view with explicit !important.
 */
.ew-har-search[data-ew-search-version="1"] .ew-search-stage[data-view="map"] .ew-search-grid,
.ew-har-search[data-ew-search-version="1"] .ew-search-grid[hidden] {
  display: none !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-stage[data-view="list"] .ew-search-map-pane,
.ew-har-search[data-ew-search-version="1"] .ew-search-map-pane[hidden] {
  display: none !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-map-pane {
  margin: 0 0 18px;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-map {
  background: #e8edf5;
  border: 1px solid var(--ew-search-hairline);
  border-radius: 16px;
  height: min(68vh, 720px);
  min-height: 420px;
  overflow: hidden;
  width: 100%;
}

/*
 * Astra/theme `button { background:#0043FF }` paints Google Maps chrome and
 * stretches controls into blue bars. Reset map UI to neutral white controls.
 * ID selectors required — see #ew-houston-search button reset above.
 */
#ew-houston-search .ew-search-map .gm-style button,
#ew-houston-search .ew-search-map .gm-style .gm-control-active,
#ew-houston-search .ew-search-map .gm-style .gm-fullscreen-control,
#ew-search-results .ew-search-map .gm-style button,
#ew-search-results .ew-search-map .gm-style .gm-control-active {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 2px !important;
  box-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.3) !important;
  color: #000e35 !important;
  height: 40px !important;
  max-width: 40px !important;
  min-height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  width: 40px !important;
}

#ew-houston-search .ew-search-map .gm-style button[title="Keyboard shortcuts"],
#ew-houston-search .ew-search-map .gm-style a[href^="https://"][target="_blank"],
#ew-search-results .ew-search-map .gm-style button[title="Keyboard shortcuts"],
#ew-search-results .ew-search-map .gm-style a[href^="https://"][target="_blank"] {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: #1a73e8 !important;
  height: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: auto !important;
}

#ew-houston-search .ew-search-map .gm-style .gmnoprint > div,
#ew-houston-search .ew-search-map .gm-style .gm-bundled-control,
#ew-houston-search .ew-search-map .gm-style .gm-bundled-control > div,
#ew-search-results .ew-search-map .gm-style .gmnoprint > div,
#ew-search-results .ew-search-map .gm-style .gm-bundled-control,
#ew-search-results .ew-search-map .gm-style .gm-bundled-control > div {
  background: transparent !important;
  background-color: transparent !important;
}

.ew-har-search[data-ew-search-version="1"] .ew-search-map-note {
  color: var(--ew-search-muted);
  font-size: 13px;
  margin: 10px 2px 0;
}

@media (max-width: 720px) {
  .ew-har-search[data-ew-search-version="1"] .ew-search-head-controls {
    justify-content: stretch;
    width: 100%;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-view-toggle,
  .ew-har-search[data-ew-search-version="1"] .ew-search-sort-wrap {
    width: 100%;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-view-button {
    flex: 1;
  }

  .ew-har-search[data-ew-search-version="1"] .ew-search-map {
    min-height: 360px;
  }
}
