/* 地図の配置・ピン・モーダル用。本文の文字組みは設置先テーマから継承します。 */
.property-map {
  --map-pin-color: var(--gmc-accent, #333);
  --map-height: clamp(420px, 55vw, 720px);
  isolation: isolate;
}
.property-map,
.property-map *,
.property-map *::before,
.property-map *::after {
  box-sizing: border-box;
}
.property-map button,
.property-map select {
  font: inherit;
}
.property-map a:focus-visible,
.property-map button:focus-visible,
.property-map select:focus-visible {
  outline: 3px solid var(--gmc-focus, #2563eb);
  outline-offset: 4px;
}
.property-map [hidden] {
  display: none !important;
}
.property-map__header {
  padding: 24px 0 32px;
}
.property-map__heading {
  margin: 0 0 24px;
}
.property-map__filter {
  display: flex;
  align-items: center;
  gap: 20px;
}
.property-map__select {
  width: min(100%, 360px);
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--gmc-border, #ddd);
  border-radius: var(--gmc-radius, 6px);
  background: #fff;
  color: inherit;
  font: inherit;
}
.property-map__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
}
.property-map__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.property-map__pin {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 42px;
  flex: 0 0 auto;
  padding: 7px;
  border: 2px solid var(--map-pin-color);
  border-radius: 8px 8px 8px 0;
  background: var(--map-pin-color);
  color: #fff;
  transform: rotate(-45deg);
}
.property-map__pin svg {
  display: block;
  width: 24px;
  height: 24px;
  transform: rotate(45deg);
}
.property-map__pin--outline {
  background: #fff;
  color: var(--map-pin-color);
}
.property-map__pin--map {
  position: absolute;
  margin: 0;
  width: 46px;
  height: 50px;
  cursor: pointer;
  transform: translate(-50%, -100%) rotate(-45deg);
  transform-origin: center;
}
.property-map__pin--map:hover {
  filter: drop-shadow(0 3px 4px #0003);
}
.property-map__pin--map:hover,
.property-map__pin--map:focus-visible,
.property-map__cluster:hover,
.property-map__cluster:focus-visible {
  z-index: 100000 !important;
}
.property-map__cluster {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  margin: 0;
  padding: 0 8px;
  border: 2px solid #fff;
  border-radius: 20px;
  background: var(--map-pin-color);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transform: translate(-50%, -100%);
}
.property-map__canvas {
  height: var(--map-height);
  width: 100%;
  background: var(--gmc-surface, #f5f5f5);
  border-radius: var(--gmc-radius, 6px);
  overflow: hidden;
}
.property-map__message {
  margin: 0 0 16px;
}
.property-map__dialog {
  inset: 0;
  width: min(760px, calc(100% - 32px));
  max-height: 90vh;
  max-height: 90dvh;
  padding: 0;
  margin: auto;
  overflow: auto;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  box-shadow: 0 20px 70px #0004;
}
.property-map__dialog::backdrop {
  background: #0009;
}
.property-map__close {
  position: absolute;
  right: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #fff;
  color: #222;
  cursor: pointer;
  z-index: 1;
}
.property-map__photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
}
.property-map__body {
  padding: 32px;
}
.property-map__dialog:not(:has(.property-map__image)) .property-map__body {
  padding-top: 64px;
}
.property-map__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}
.property-map__gallery-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.property-map__badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 10px;
  background: var(--gmc-surface, #f5f5f5);
  border-radius: 3px;
}
.property-map__title {
  margin: 0 0 20px;
  overflow-wrap: anywhere;
}
.property-map__details {
  display: grid;
  grid-template-columns: 110px 1fr;
  margin: 0 0 24px;
}
.property-map__details dt,
.property-map__details dd {
  margin: 0;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--gmc-border, #ddd);
  overflow-wrap: anywhere;
}
.property-map__description {
  margin: 0 0 24px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.property-map__link,
.property-map__return {
  display: block;
  width: fit-content;
  padding: 12px 18px;
  border: 1px solid var(--map-pin-color);
  border-radius: var(--gmc-radius, 6px);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.property-map__link {
  margin-bottom: 12px;
  color: var(--map-pin-color);
  background: #fff;
}
.property-map__return {
  color: #fff;
  background: var(--map-pin-color);
}
@media (max-width: 600px) {
  .property-map__filter {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .property-map__select {
    width: 100%;
  }
  .property-map__body {
    padding: 24px;
  }
  .property-map__details {
    grid-template-columns: 90px 1fr;
  }
}
