/* Mapbox locations Block Styles */
.mapbox-locations {
  position: relative;
  width: 100%;
  margin: var(--wp--style--block-gap, 2rem) 0;
}

.mapbox-locations__canvas {
  width: 100%;
  height: auto; /* Hardcoded block height */
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
}

/* Error overlay for repeated 403s */
.mapbox-locations__error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font: 600 14px/1.4 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI,
    Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  text-align: center;
  padding: 24px;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mapbox-locations__error.is-active {
  opacity: 1;
}

/* Location marker styling */
.mapbox-locations .location-marker {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.mapbox-locations .location-marker:hover {
  transform: translateY(-4px) scale(1.05);
}

.mapbox-locations .location-marker__label {
  display: block;
  background: #ffda64;
  color: #222;
  font: 600 12px/1.2 system-ui, sans-serif;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  position: relative;
}

.mapbox-locations .location-marker__label::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #ffda64;
}

/* Improve mapbox controls layering */
.mapboxgl-ctrl-top-right .mapboxgl-ctrl {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}
