.moemen-earth-map-wrap {
  position: relative;
  width: 100%;
}

.moemen-earth-map-widget {
  position: relative;
  width: 100%;
  min-height: 280px;
  height: 560px;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
  --moemen-earth-popup-background: #ffffff;
}

.moemen-earth-map-widget .maplibregl-canvas {
  outline: none;
}

.moemen-earth-map-loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(248, 250, 252, 0.55);
  backdrop-filter: blur(4px);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.moemen-earth-map-widget.is-loaded .moemen-earth-map-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.moemen-earth-map-loader span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.7);
  animation: moemen-earth-loader 1s infinite ease-in-out;
}

.moemen-earth-map-loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.moemen-earth-map-loader span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes moemen-earth-loader {
  0%, 80%, 100% {
    transform: scale(0.7);
    opacity: 0.45;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.moemen-earth-popup {
  max-width: 240px;
  font-family: inherit;
}

.moemen-earth-popup strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
  font-size: 14px;
  line-height: 1.3;
}

.moemen-earth-popup p {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.5;
}

.moemen-earth-map-widget .maplibregl-popup-content {
  background-color: var(--moemen-earth-popup-background, #ffffff);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
}

.moemen-earth-map-widget .maplibregl-popup-tip {
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.12));
}

.moemen-earth-map-widget .maplibregl-popup-anchor-top .maplibregl-popup-tip,
.moemen-earth-map-widget .maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.moemen-earth-map-widget .maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
  border-bottom-color: var(--moemen-earth-popup-background, #ffffff) !important;
}

.moemen-earth-map-widget .maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.moemen-earth-map-widget .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.moemen-earth-map-widget .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
  border-top-color: var(--moemen-earth-popup-background, #ffffff) !important;
}

.moemen-earth-map-widget .maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: var(--moemen-earth-popup-background, #ffffff) !important;
}

.moemen-earth-map-widget .maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: var(--moemen-earth-popup-background, #ffffff) !important;
}

.moemen-earth-map-widget .maplibregl-popup-close-button {
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #6b7280;
  background-color: transparent;
  line-height: 1;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.moemen-earth-map-widget .maplibregl-popup-close-button:hover,
.moemen-earth-map-widget .maplibregl-popup-close-button:focus {
  color: #111827;
  background-color: rgba(17, 24, 39, 0.08);
}

.moemen-earth-map-widget .maplibregl-ctrl-group {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.14);
}


.moemen-earth-popup-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #2563eb;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  transition-property: transform, background-color, color, border-color, box-shadow, opacity;
  transition-duration: 0.18s;
  transition-timing-function: ease;
}

.moemen-earth-popup-button:hover,
.moemen-earth-popup-button:focus {
  background-color: #1d4ed8;
  transform: translateY(-1px);
}


/* Individual zoom-direction controls. The map limits are also enforced in JS,
   while these rules remove unavailable buttons from the optional UI. */
.moemen-earth-map-widget.moemen-earth-no-zoom-in .maplibregl-ctrl-zoom-in,
.moemen-earth-map-widget.moemen-earth-no-zoom-out .maplibregl-ctrl-zoom-out {
  display: none !important;
}
