/* Diamantes Realty Group — unified public map search (2026-08-17) */
:root {
  --map-ui-navy: #0b1f3a;
  --map-ui-red: #b00008;
  --map-ui-gold: #c8a45d;
  --map-ui-muted: #677386;
  --map-ui-line: rgba(11,31,58,.12);
}

.map-search-experience .map-page-toolbar.map-unified-toolbar {
  position: relative;
  z-index: 700;
  display: block !important;
  width: 100% !important;
  padding: 18px clamp(18px,3vw,44px) !important;
  background: rgba(250,249,245,.97) !important;
  border-bottom: 1px solid rgba(11,31,58,.1);
  box-shadow: 0 14px 32px rgba(11,31,58,.06);
}

.map-unified-searchbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px,1fr) 190px;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.map-unified-searchbar .public-map-search-control {
  position: relative;
  min-width: 0;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.map-unified-searchbar .map-search-input-row {
  min-height: 62px;
  width: 100%;
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) auto auto;
  align-items: center;
  gap: 0;
  padding: 0 12px 0 0;
  border: 1px solid var(--map-ui-line) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 10px 30px rgba(11,31,58,.055);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.map-unified-searchbar .map-search-input-row:focus-within {
  border-color: rgba(176,0,8,.38) !important;
  box-shadow: 0 13px 34px rgba(11,31,58,.08), 0 0 0 3px rgba(176,0,8,.05);
}

.map-unified-searchbar .map-search-icon {
  width: 54px;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--map-ui-red) !important;
}
.map-unified-searchbar .map-search-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.map-unified-searchbar #publicMapSearchInput {
  min-width: 0;
  width: 100% !important;
  height: 60px !important;
  padding: 0 12px 0 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--map-ui-navy) !important;
  font-family: var(--font-ui,"Plus Jakarta Sans",sans-serif) !important;
  font-size: clamp(.9rem,1.1vw,1rem) !important;
  font-weight: 500 !important;
  text-transform: none !important;
}
.map-unified-searchbar #publicMapSearchInput::placeholder {
  color: #8a93a0 !important;
  opacity: 1;
  letter-spacing: -.01em;
}

.map-unified-searchbar .map-search-clear {
  width: 36px;
  height: 36px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #f5f2ec !important;
  color: var(--map-ui-navy) !important;
  box-shadow: none !important;
}

.map-unified-searchbar .map-search-results {
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  border-radius: 10px !important;
  border: 1px solid var(--map-ui-line) !important;
  box-shadow: 0 22px 50px rgba(11,31,58,.15) !important;
  background: #fff !important;
  overflow: hidden;
}

/* The outer filter trigger is deliberately static on desktop so its panel is
   positioned against the entire search bar instead of expanding left from a
   190px button. This fixes clipping on common laptop/desktop widths. */
.map-unified-filter-popover {
  position: static;
  min-width: 190px;
}
.map-unified-filter-popover > summary {
  list-style: none;
  min-height: 62px;
  height: 100%;
  display: grid;
  grid-template-columns: 34px auto 18px;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-content: center;
  padding: 10px 16px;
  border: 1px solid var(--map-ui-navy);
  border-radius: 10px;
  background: var(--map-ui-navy);
  color: #fff !important;
  cursor: pointer;
  user-select: none;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 10px 26px rgba(11,31,58,.12);
}
.map-unified-filter-popover > summary::-webkit-details-marker { display: none; }
.map-unified-filter-popover > summary:hover { background: #132b4f; }
.map-unified-filter-popover > summary:active { transform: translateY(1px); }
.map-filter-summary-icon {
  grid-row: 1 / 3;
  align-self: center;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #e0c387 !important;
}
.map-filter-summary-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.map-unified-filter-popover > summary strong {
  color: #fff !important;
  font-size: .84rem;
  font-weight: 700 !important;
  line-height: 1.2;
}
.map-unified-filter-popover > summary small {
  color: rgba(255,255,255,.65) !important;
  font-size: .64rem;
  font-weight: 400 !important;
  line-height: 1.2;
}
.map-filter-chevron {
  grid-row: 1 / 3;
  grid-column: 3;
  align-self: center;
  justify-self: end;
  width: 16px;
  height: 16px;
  transition: transform .2s ease;
}
.map-filter-chevron svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.map-unified-filter-popover[open] .map-filter-chevron { transform: rotate(180deg); }

.map-filter-panel {
  position: absolute;
  z-index: 900;
  top: calc(100% + 10px);
  right: 0;
  width: min(860px,100%);
  max-height: min(620px, calc(100vh - var(--public-navbar-height,76px) - 130px));
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(11,31,58,.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(11,31,58,.17);
}
.map-filter-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 17px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(11,31,58,.09);
}
.map-filter-panel-header p,
.map-filter-panel-header h2 { margin: 0; }
.map-filter-panel-header p {
  color: var(--map-ui-red) !important;
  font-size: .66rem;
  font-weight: 700 !important;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.map-filter-panel-header h2 {
  margin-top: 3px;
  color: var(--map-ui-navy) !important;
  font-family: var(--font-ui,"Plus Jakarta Sans",sans-serif) !important;
  font-size: 1.08rem !important;
  font-weight: 700 !important;
  letter-spacing: -.025em !important;
}
.map-filter-panel-header span {
  max-width: 310px;
  color: var(--map-ui-muted) !important;
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: right;
}

.map-filter-panel .map-filter-strip {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  align-items: start;
}
.map-filter-panel .map-filter-strip > :not(dialog) {
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}

/* Direct select controls */
.map-filter-panel .map-filter-strip > label {
  display: grid !important;
  gap: 7px;
  min-height: 82px;
  padding: 11px 12px 12px;
  border: 1px solid rgba(11,31,58,.1) !important;
  border-radius: 9px !important;
  background: #fbfaf7 !important;
}
.map-filter-panel .map-filter-strip > label > span {
  color: #6d7786 !important;
  font-size: .67rem !important;
  font-weight: 700 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase;
}
.map-filter-panel .map-filter-strip > label select {
  width: 100% !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(11,31,58,.12) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: var(--map-ui-navy) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

/* Internal Price / Bedrooms dropdowns generated by properties.js now expand
   inside the panel instead of opening as legacy floating popovers. */
.map-filter-panel .map-filter-popover {
  position: relative !important;
  min-width: 0 !important;
  width: 100% !important;
  border: 1px solid rgba(11,31,58,.1) !important;
  border-radius: 9px !important;
  background: #fbfaf7 !important;
  box-shadow: none !important;
  overflow: hidden;
}
.map-filter-panel .map-filter-popover > summary {
  list-style: none;
  min-height: 82px !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--map-ui-navy) !important;
  font-family: var(--font-ui,"Plus Jakarta Sans",sans-serif) !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
  letter-spacing: -.02em !important;
  cursor: pointer;
  box-shadow: none !important;
}
.map-filter-panel .map-filter-popover > summary::-webkit-details-marker { display: none; }
.map-filter-panel .map-filter-popover > summary::after {
  content: '+';
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 50%;
  background: #fff;
  color: var(--map-ui-red);
  font-size: 1rem;
  font-weight: 500;
  transition: transform .2s ease;
}
.map-filter-panel .map-filter-popover[open] > summary::after { transform: rotate(45deg); }
.map-filter-panel .map-filter-popover > div {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px !important;
  padding: 0 12px 12px !important;
  border: 0 !important;
  border-top: 1px solid rgba(11,31,58,.08) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
.map-filter-panel .map-filter-popover > div input,
.map-filter-panel .map-filter-popover > div select {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  margin-top: 11px !important;
  padding: 0 11px !important;
  border: 1px solid rgba(11,31,58,.12) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: var(--map-ui-navy) !important;
  box-shadow: none !important;
}
.map-filter-panel .map-filter-popover > div button {
  grid-column: 1 / -1;
  min-height: 38px !important;
  margin-top: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: rgba(176,0,8,.07) !important;
  color: var(--map-ui-red) !important;
  font-size: .75rem !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.map-filter-panel .map-extra-filters-button,
.map-filter-panel .map-clear-filters {
  min-height: 46px !important;
  padding: 0 16px !important;
  border-radius: 8px !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
.map-filter-panel .map-extra-filters-button {
  border: 1px solid var(--map-ui-navy) !important;
  background: var(--map-ui-navy) !important;
  color: #fff !important;
}
.map-filter-panel .map-clear-filters {
  border: 1px solid rgba(176,0,8,.2) !important;
  background: #fff !important;
  color: var(--map-ui-red) !important;
}

.map-search-experience .map-split-shell { border-top: 0 !important; }

@media (max-width: 900px) {
  .map-search-experience .map-page-toolbar.map-unified-toolbar { padding: 12px 14px !important; }
  .map-unified-searchbar {
    grid-template-columns: minmax(0,1fr) 58px;
    gap: 8px;
  }
  .map-unified-searchbar .map-search-input-row {
    min-height: 56px;
    grid-template-columns: 46px minmax(0,1fr) auto auto;
    border-radius: 9px !important;
  }
  .map-unified-searchbar #publicMapSearchInput { height: 54px !important; font-size: .88rem !important; }
  .map-unified-searchbar .map-search-icon { width: 46px; }
  .map-unified-filter-popover { position: relative; min-width: 0; }
  .map-unified-filter-popover > summary {
    width: 58px;
    min-height: 56px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    border-radius: 9px;
  }
  .map-filter-summary-icon { grid-row: auto; width: auto; height: auto; }
  .map-unified-filter-popover > summary strong,
  .map-unified-filter-popover > summary small,
  .map-filter-chevron { display: none; }
  .map-filter-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(var(--public-navbar-height,68px) + 76px);
    width: auto;
    max-height: calc(100dvh - var(--public-navbar-height,68px) - 96px);
    overflow-y: auto;
    padding: 18px;
    border-radius: 11px;
  }
  .map-filter-panel .map-filter-strip { grid-template-columns: 1fr !important; }
  .map-filter-panel-header { align-items: start; flex-direction: column; gap: 5px; }
  .map-filter-panel-header span { text-align: left; }
  .map-filter-panel .map-filter-popover > div { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .map-unified-searchbar #publicMapSearchInput::placeholder { font-size: .8rem; }
  .map-filter-panel { left: 8px; right: 8px; padding: 15px; }
  .map-filter-panel-header { margin-bottom: 13px; padding-bottom: 12px; }
  .map-filter-panel .map-filter-strip > label,
  .map-filter-panel .map-filter-popover > summary { min-height: 72px !important; }
}
