/*
 * /map-listing (WP page 772) and the marker popup (listing 775): docs/design/components/map-info-window.md.
 * Full-width band of three columns that are as tall as the viewport: filters 25 % (scrolls inside), list of cards 25 %
 * (scrolls inside) and the map 49.664 %. The Turbo frame and the map wrapper do not take part in the layout.
 */
.map-page {
  display: flex;
  width: 100%;
}
.map-page__frame,
.map-listing {
  display: contents;
}
.map-page__filters {
  width: 25%;
  max-height: 100vh;
  padding: 15px;
  overflow-y: auto;
}
.map-page__results {
  width: 25%;
  max-height: 100vh;
  padding: 0 15px;
  overflow-y: auto;
}
.map-page__map {
  width: 49.664%;
  padding: 0;
}
.map-list__item {
  padding: 15px 0;
}
.map-page .no-results {
  margin: 15px 0;
}

/* list card (listing 806): the grid card without the 370px cap, 270px image */
.property-card--map {
  max-width: none;
}
.property-card--map .property-card__image {
  margin-bottom: 10px;
}
.property-card--map .property-card__image img {
  width: 270px;
  max-width: 100%;
}
/* WP's icon list is 20px wider than the card content (its -10px item margins are inside the list box) */
.property-card--map .property-card__specs {
  width: calc(100% + 20px);
}
/* the map templates have no 20px widget spacing between the texts */
.property-card--map .property-card__title {
  margin-bottom: 2px;
}
.property-card--map .property-card__address {
  margin-bottom: 9px;
}

.map-canvas {
  width: 100%;
  height: 100vh;
}
.map-canvas--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: var(--gray-100);
  color: var(--color-text);
  text-align: center;
}

/* Marker popup: white card 230px wide, drawn inside Google's InfoWindow shell with its own chrome removed. */
.map-canvas .gm-style-iw-c {
  max-width: 230px !important;
  padding: 0 !important;
  border-radius: 0;
  box-shadow: var(--shadow-card);
}
.map-canvas .gm-style-iw-d {
  max-height: none !important;
  overflow: hidden !important;
}
.map-info {
  position: relative;
  width: 230px;
  padding: 0 18px 16px;
  background-color: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-sans);
}
.map-info__close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 24px;
  height: 24px;
  margin: 2px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-text);
  font-size: 18px;
  line-height: 24px;
  cursor: pointer;
}
.map-info__image {
  display: block;
  margin: 0 -18px 10px;
}
.map-info__image img {
  display: block;
  width: 194px;
  max-width: none;
  height: auto;
}
.map-info__title {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.25em;
}
.map-info__title a {
  color: var(--gray-700);
}
.map-info__title a:hover {
  color: var(--color-primary);
}
.map-info__address {
  margin-bottom: 8px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.map-info__price {
  color: var(--gray-700);
  font-size: var(--fs-h6);
  font-weight: 700;
  line-height: var(--lh-h6);
}
.map-info__specs {
  display: flex;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--gray-300);
  list-style: none;
}
.map-info__specs li {
  display: flex;
  align-items: center;
  margin-right: 20px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.map-info__icon {
  display: flex;
  padding-inline-end: 8px;
}
.map-info__icon svg {
  width: 16px;
  height: 16px;
  fill: var(--color-primary);
  color: var(--color-primary);
}

@media (max-width: 1024px) {
  .map-page {
    flex-wrap: wrap;
  }
  .map-page__filters,
  .map-page__results {
    width: 50%;
    max-height: 500px;
  }
  .map-page__map {
    width: 100%;
  }
  .property-card--map .property-card__image img {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .map-page__filters,
  .map-page__results {
    width: 100%;
  }
  .property-card--map .property-card__image img {
    width: 320px;
  }
}
