.wpyvr-community-map-wrap,
.wpyvr-map-shell,
.wpyvr-map {
  width: 100%;
}

.wpyvr-map-shell {
  position: relative;
}

.wpyvr-map-attrib {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 0 6px;
  border-bottom-right-radius: 18px;
  background: hsla(0, 0%, 100%, 0.82);
  color: rgba(0, 0, 0, 0.68);
  font-size: 10px;
  line-height: 18px;
  text-align: right;
  pointer-events: auto;
}

.wpyvr-map {
  height: 440px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--wp--preset--color--surface, #fff);
  border: 1px solid var(--wp--preset--color--border, #e4e3dd);
}

.wpyvr-map--preview {
  height: 220px;
  border-radius: 14px;
}

.wpyvr-map--edit {
  height: 320px;
  cursor: crosshair;
}

.wpyvr-map-shell:has(.wpyvr-map--preview) .wpyvr-map-attrib,
.wpyvr-map-shell:has(.wpyvr-map--edit) .wpyvr-map-attrib {
  border-bottom-right-radius: 14px;
}

.wpyvr-map-marker {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--wp--preset--color--brand, #5b50f6);
  box-shadow: 0 4px 12px rgba(16, 16, 17, 0.18);
  cursor: pointer;
  overflow: hidden;
}

.wpyvr-map-marker.is-gathering {
  width: 32px;
  height: 32px;
  border-color: var(--wp--preset--color--brand, #5b50f6);
  background: var(--wp--preset--color--brand, #5b50f6);
}

.wpyvr-map-pin {
  display: block;
  width: 10px;
  height: 10px;
  margin: 9px auto 0;
  border-radius: 50%;
  background: #fff;
}

.wpyvr-place-admin-map .wpyvr-map {
  height: 320px;
}

.wpyvr-map-marker img,
.wpyvr-map-dot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
}

.wpyvr-map-popup {
  position: relative;
  font: inherit;
  color: var(--wp--preset--color--ink, #101011);
}

.wpyvr-map-popup-photo {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 0 10px;
  background: #deddd7;
}

.wpyvr-map-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 28px;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.wpyvr-map-popup-close:hover {
  background: rgba(0, 0, 0, 0.22);
}

.wpyvr-map-popup:not(:has(.wpyvr-map-popup-photo)) .wpyvr-map-popup-close {
  color: var(--wp--preset--color--ink, #101011);
  text-shadow: none;
}

.wpyvr-map-popup:not(:has(.wpyvr-map-popup-photo)) .wpyvr-map-popup-close:hover {
  background: #f3f2ed;
}

.wpyvr-map-popup-kicker {
  margin: 0 0 4px;
  color: var(--wp--preset--color--muted, #797873);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wpyvr-map-popup-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.wpyvr-map-popup-meta,
.wpyvr-map-popup-place,
.wpyvr-map-popup-note {
  margin: 4px 0 0;
  color: var(--wp--preset--color--muted, #797873);
  font-size: 13px;
  line-height: 1.4;
}

.wpyvr-map-popup-place {
  color: var(--wp--preset--color--ink, #101011);
  font-weight: 560;
}

.wpyvr-map-popup-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--wp--preset--color--ink, #101011);
  font-weight: 560;
  text-decoration: none;
}

.wpyvr-map .maplibregl-marker {
  z-index: 1 !important;
}

.wpyvr-map .maplibregl-popup {
  z-index: 20 !important;
}

.wpyvr-map .maplibregl-popup-content {
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(16, 16, 17, 0.12);
}

.wpyvr-map .maplibregl-popup-close-button {
  display: none;
}

.wpyvr-place-media {
  margin: 0 0 1.25rem;
}

.wpyvr-place-media-preview img {
  display: block;
  max-width: 220px;
  height: auto;
  margin: 0 0 8px;
  border-radius: 8px;
}

.wpyvr-map .maplibregl-ctrl-attrib {
  display: none !important;
}

.wpyvr-map-attrib a {
  color: inherit;
  text-decoration: none;
}

.wpyvr-map-attrib a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 720px) {
  .wpyvr-map {
    height: 280px;
    border-radius: 14px;
  }

  .wpyvr-map--preview,
  .wpyvr-map--edit {
    height: 220px;
  }

  .wpyvr-map-attrib {
    border-bottom-right-radius: 14px;
  }
}
