/*
  The closing column is the globe, in the space the message form used.
  Labels use the page text and surface tokens so both themes clear 4.5:1.
  The marker colour is chosen in globe.js from the orange ramp.
*/

.globe-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.globe {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.globe > div {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.globe canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  cursor: grab;
  opacity: 0;
  touch-action: none;
  transition: opacity 1.2s ease;
}

.globe canvas.is-grabbing {
  cursor: grabbing;
}

.globe canvas:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 4px;
}

.globe-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.globe-pin {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, calc(-100% - 0.45rem));
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.7s ease, visibility 0s linear 0.7s;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.45rem 0.75rem;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.globe-pin.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.7s ease, visibility 0s linear 0s;
}

.globe-pin__name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.globe-pin__icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.globe-pin__detail {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.globe-pin:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

.globe-places {
  align-self: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.globe-places:not(.is-visible) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.globe-places.is-visible {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text);
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  .globe canvas,
  .globe-pin {
    transition: none;
  }
}
