/* Final Map UI handoff integration:
   adopts the four supplied design states while preserving RentAlot MVP scope. */

.map-page-mode .site-header {
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 1px 10px rgb(3 22 54 / 8%);
}

.v2-map {
  background: #dce5e8;
}

.v2-map-layer {
  inset: 0;
  background-color: #dce5e8;
  background-image:
    linear-gradient(rgb(255 255 255 / 5%), rgb(255 255 255 / 5%)),
    url("https://lh3.googleusercontent.com/aida-public/AB6AXuDfd3WqreDc_YX9kOkfLJfemuDZoTNzW452fat8oTCRKXZ2nPSiNg3NhaUGzxAZl-xHfsFsWS0h37wklv1DAuQjdFh6N0MzS7xvVV_N8oiar3zRR3tgSm5-MHCAM7XkCTKEwNxSw9QyFnFggs1Nu0w66F6suRt6W148e46sxFfQS5Pv40ZiygAedUvYO3s5qg80CJPuY73hju6RpOekCddFIqxa4RI-H37Pt5Jq45c4KoXJyCSK02yXDQ");
  background-position: center;
  background-size: cover;
}

/* The approved map artwork already contains its own roads and labels. */
.v2-water,
.v2-park,
.v2-road,
.v2-transit-line,
.v2-place-label {
  display: none;
}

.map-command-bar {
  top: 20px;
  width: min(calc(100% - 160px), 760px);
  display: block;
}

#v2-map-search {
  min-height: 56px;
  border-color: rgb(197 201 209 / 65%);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgb(3 22 54 / 18%);
}

#v2-map-search button {
  min-width: 92px;
  border-radius: 9px;
}

.map-command-bar .view-switch.compact {
  position: fixed;
  z-index: 70;
  right: auto;
  bottom: 24px;
  left: calc(50% - 86px);
  min-height: 52px;
  border: 1px solid rgb(197 201 209 / 70%);
  background: rgb(255 255 255 / 97%);
  box-shadow: 0 10px 28px rgb(3 22 54 / 20%);
  transform: translateX(-50%);
}

.map-quick-filters {
  top: 88px;
  width: min(calc(100% - 120px), 1040px);
  justify-content: center;
}

.map-filter-chip {
  min-height: 42px;
  border-color: rgb(117 119 126 / 65%);
  background: rgb(255 255 255 / 97%);
  box-shadow: 0 5px 16px rgb(3 22 54 / 14%);
}

.map-filter-chip.primary {
  border-color: var(--navy-950);
  background: var(--navy-950);
}

.map-results-toggle {
  top: auto;
  bottom: 24px;
  left: calc(50% + 96px);
  min-width: 184px;
  min-height: 52px;
  display: flex;
  grid-template-columns: none;
  justify-content: center;
  gap: 5px;
  padding: 9px 16px;
  border-radius: 10px;
  color: white;
  background: var(--navy-950);
  box-shadow: 0 10px 28px rgb(3 22 54 / 24%);
}

.map-results-toggle strong {
  grid-row: auto;
  font-size: 1rem;
}

.map-results-toggle small {
  margin-left: 5px;
  color: white;
  font-weight: 700;
}

.map-results-drawer {
  top: 16px;
  bottom: 16px;
  left: 16px;
  width: min(400px, calc(100% - 32px));
  border: 1px solid rgb(197 201 209 / 72%);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgb(3 22 54 / 24%);
  transform: translateX(calc(-100% - 36px));
}

.map-results-drawer.open {
  transform: translateX(0);
}

.map-results-drawer > header {
  min-height: 76px;
  background: rgb(255 255 255 / 98%);
}

.v2-result-card {
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: 142px;
  padding: 15px;
}

.v2-result-card img {
  width: 104px;
  height: 112px;
}

.v2-result-card:hover,
.v2-result-card:focus,
.v2-result-card.active {
  background: #eff8f7;
  box-shadow: inset 5px 0 0 var(--teal-700);
}

.v2-map-pin {
  min-height: 40px;
  padding: 7px 12px;
  border-radius: 10px 10px 10px 2px;
  box-shadow: 0 4px 13px rgb(3 22 54 / 34%);
}

.v2-map-pin:hover,
.v2-map-pin:focus,
.v2-map-pin.active {
  background: var(--teal-700);
  box-shadow: 0 9px 20px rgb(3 22 54 / 32%);
}

.v2-map-halo {
  width: 220px;
  height: 220px;
  border: 2px dashed rgb(52 103 98 / 65%);
  background: rgb(52 103 98 / 10%);
  box-shadow: none;
}

.v2-poi > b {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.v2-poi > span {
  border-radius: 8px;
  box-shadow: 0 6px 18px rgb(3 22 54 / 18%);
}

.v2-map-popover {
  right: 24px;
  bottom: 24px;
  width: min(480px, calc(100% - 48px));
  grid-template-columns: 160px 1fr;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgb(3 22 54 / 24%);
}

.v2-map-popover > img {
  width: 160px;
  min-height: 176px;
}

.v2-map-controls {
  top: 156px;
  right: 20px;
  border-color: rgb(197 201 209 / 72%);
  box-shadow: 0 8px 22px rgb(3 22 54 / 18%);
}

.v2-compass {
  top: 306px;
  right: 25px;
}

.v2-map-legend {
  bottom: 20px;
  left: 20px;
}

/* Filters are a temporary side sheet, never a permanent map sidebar. */
.map-filter-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(620px, 50vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border-radius: 16px 0 0 16px;
}

.map-filter-dialog[open] {
  display: block;
}

.map-filter-dialog::backdrop {
  background: rgb(11 28 48 / 44%);
  backdrop-filter: blur(2px);
}

.map-filter-card {
  height: 100%;
  max-height: none;
  grid-template-rows: auto 1fr auto;
}

.map-filter-card > header {
  min-height: 76px;
  padding: 18px 24px;
  background: rgb(255 255 255 / 97%);
}

.map-filter-grid {
  grid-template-columns: 1fr;
}

.map-filter-grid fieldset {
  padding: 24px;
  border-right: 0;
}

.map-filter-card > footer {
  padding: 16px 24px;
  background: white;
  box-shadow: 0 -6px 18px rgb(3 22 54 / 7%);
}

.map-filter-card > footer .button-primary {
  min-width: 230px;
  color: white;
  background: var(--orange-800);
}

@media (max-width: 900px) {
  .map-command-bar {
    top: 12px;
    width: calc(100% - 24px);
  }

  .map-quick-filters {
    top: 78px;
    width: calc(100% - 24px);
    justify-content: flex-start;
  }

  .map-results-toggle {
    top: auto;
  }
}

@media (max-width: 760px) {
  .map-command-bar {
    width: calc(100% - 20px);
  }

  #v2-map-search {
    min-height: 50px;
  }

  .map-command-bar .view-switch.compact {
    right: auto;
    bottom: 68px;
    left: 50%;
    transform: translateX(-50%);
  }

  .map-quick-filters {
    top: 70px;
    width: calc(100% - 20px);
  }

  .map-results-toggle {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    min-width: 0;
  }

  .map-results-drawer {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    height: min(65dvh, 580px);
    border-radius: 16px;
    transform: translateY(calc(100% + 20px));
  }

  .map-results-drawer.open {
    transform: translateY(0);
  }

  .v2-map-popover {
    right: 10px;
    bottom: 128px;
    left: 10px;
    width: auto;
    grid-template-columns: 96px 1fr;
  }

  .v2-map-popover > img {
    width: 96px;
    min-height: 132px;
  }

  .v2-map-controls {
    top: 134px;
  }

  .v2-compass {
    top: 284px;
  }

  .v2-map-legend {
    display: none;
  }

  .map-filter-dialog {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }
}

