.villages-map-col {
  display: none;
}

.villages-map-canvas {
  width: 100%;
  height: 100%;
}

@media screen and (min-width: 1124px) {
  body.villages-map-open #villages-results {
    display: grid;
    grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }
  body.villages-map-open #villages-list-wrap .villages-grid {
    grid-template-columns: 100%;
    gap: 0;
  }
  body.villages-map-open #villages-list-wrap .villages-grid > * {
    grid-column: 1/-1;
  }
  body.villages-map-open #villages-list-wrap .villages-grid .village-card.wide {
    display: flex;
    flex-direction: column;
    gap: 1.1em;
    grid-column: auto;
    padding-bottom: 26px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--color-border);
  }
  body.villages-map-open #villages-list-wrap .villages-grid .village-card.wide .image .image-spacer {
    padding-top: 62%;
  }
  body.villages-map-open #villages-list-wrap .villages-grid .village-card.wide .name {
    font-size: 28px;
  }
  body.villages-map-open #villages-list-wrap .villages-grid .village-card.wide .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.villages-map-open #villages-list-wrap .villages-grid .village-card.wide .features .feature-sea {
    display: none;
  }
  body.villages-map-open #villages-list-wrap .villages-grid .village-card.wide .price strong {
    font-size: 24px;
  }
  body.villages-map-open #villages-list-wrap .villages-grid .village-card.wide .accent-link {
    margin-top: 1em;
  }
  body.villages-map-open #villages-list-wrap .villages-grid .summary {
    display: none;
  }
  body.villages-map-open #villages-list-wrap .villages-grid #village-club {
    padding: 22px 16px 22px 0 !important;
    margin: 0 0 26px !important;
  }
  body.villages-map-open #villages-list-wrap .villages-grid #village-club .wrap {
    display: none;
  }
  body.villages-map-open #villages-list-wrap .villages-grid #village-club .mobile-link {
    display: flex;
    font-size: 15px;
  }
  body.villages-map-open .villages-map-col {
    display: block;
    position: sticky;
    top: 16px;
    height: calc(100vh - 32px);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
  }
}
html.villages-map-fullscreen,
html.villages-map-fullscreen body {
  overflow: hidden;
}
html.villages-map-fullscreen .villages-map-col {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--color-light);
}

.villages-map-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 30px;
  background: var(--color-paper);
  color: var(--color-ink);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.villages-map-close .icon {
  width: 16px;
  height: 16px;
}
.villages-map-close:hover {
  color: var(--color-accent);
}

.villages-map-area,
.villages-map-busy,
.villages-map-note {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 200px);
  padding: 9px 16px;
  border-radius: 30px;
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: 14px;
  line-height: 1.3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.villages-map-area.show,
.villages-map-busy.show,
.villages-map-note.show {
  opacity: 1;
  visibility: visible;
}

.villages-map-area {
  z-index: 5;
  background: var(--color-accent);
  color: var(--color-paper);
  font-weight: 700;
  white-space: nowrap;
}
.villages-map-area .icon {
  width: 16px;
  height: 16px;
}
.villages-map-area:hover {
  filter: brightness(0.94);
}

.villages-map-note {
  top: 62px;
  max-width: calc(100% - 28px);
}

.villages-map-spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: villages-map-spin 0.8s linear infinite;
}

@keyframes villages-map-spin {
  to {
    transform: rotate(360deg);
  }
}
.imv-pin {
  position: relative;
  padding: 6px 10px;
  margin-bottom: 7px;
  border-radius: 20px;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.imv-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  margin-left: -6px;
  border: 6px solid transparent;
  border-bottom: 0;
  border-top-color: var(--color-paper);
  transition: border-color 0.15s ease;
}
.imv-pin:hover, .imv-pin.is-hover, .imv-pin.is-active {
  background: var(--color-accent);
  color: var(--color-paper);
  transform: scale(1.06);
}
.imv-pin:hover::after, .imv-pin.is-hover::after, .imv-pin.is-active::after {
  border-top-color: var(--color-accent);
}

.villages-map-pop {
  display: none;
  position: absolute;
  z-index: 6;
  width: 340px;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  padding: 16px;
  border-radius: 6px;
  background: var(--color-paper);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}
.villages-map-pop.show {
  display: block;
}
.villages-map-pop .village-card.wide {
  display: flex;
  flex-direction: column;
  gap: 1.1em;
  grid-column: auto;
  font-size: 13px;
}
.villages-map-pop .village-card.wide .image .image-spacer {
  padding-top: 62%;
}
.villages-map-pop .village-card.wide .name {
  font-size: 28px;
}
.villages-map-pop .village-card.wide .features {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.villages-map-pop .village-card.wide .features .feature-sea {
  display: none;
}
.villages-map-pop .village-card.wide .price strong {
  font-size: 24px;
}
.villages-map-pop .village-card.wide .accent-link {
  margin-top: 1em;
}
.villages-map-pop .village-card.wide .name {
  font-size: 24px;
  padding-right: 10px;
}
.villages-map-pop .village-card.wide .summary,
.villages-map-pop .village-card.wide .image .arrows {
  display: none;
}
.villages-map-pop .village-card.wide .features {
  font-size: 12px;
}
.villages-map-pop .village-card.wide .offer {
  flex-wrap: wrap;
  gap: 8px 14px;
  white-space: normal;
}

.villages-map-pop-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-paper);
  color: var(--color-ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.villages-map-pop-close .icon {
  width: 16px;
  height: 16px;
}

.villages-map-pop-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

@media screen and (max-width: 1123px) {
  .villages-map-pop {
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    width: auto;
    max-width: 480px;
    margin: 0 auto;
    max-height: 62%;
  }
  .villages-map-pop .village-card.wide {
    gap: 0.8em;
  }
  .villages-map-pop .village-card.wide .image .image-spacer {
    padding-top: 42%;
  }
  .villages-map-pop .village-card.wide .name {
    font-size: 22px;
  }
  .villages-map-pop .village-card.wide .features {
    display: none;
  }
  .villages-map-pop .village-card.wide .accent-link {
    margin-top: 0.6em;
  }
}