/* Earth Globe Widget — drop-in styles.
   Copy this file (or inline these rules) into your site's CSS. */

.earth-globe-widget {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
}

.earth-globe-widget::before {
  /* soft ambient glow behind the globe — works on light or dark pages */
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(90,150,255,0.20), rgba(90,150,255,0) 68%);
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
}

.earth-globe-widget canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}

.earth-globe-widget canvas:active {
  cursor: grabbing;
}

.earth-globe-widget__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 500 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  color: oklch(55% 0.01 260);
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.earth-globe-widget__loading.is-hidden {
  opacity: 0;
}

.earth-globe-widget__loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: oklch(68% 0.15 45);
  animation: earth-globe-pulse 1.1s ease-in-out infinite;
}

@keyframes earth-globe-pulse {
  0%, 100% { transform: scale(0.7); opacity: 0.5; }
  50% { transform: scale(1); opacity: 1; }
}

.earth-globe-widget__label {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -100%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: oklch(99% 0.002 260 / 0.92);
  box-shadow: 0 6px 18px rgba(20, 25, 40, 0.16), 0 1px 2px rgba(20,25,40,0.08);
  font: 600 12.5px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: oklch(28% 0.02 260);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.25s ease;
  margin-top: -10px;
}

.earth-globe-widget__label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(68% 0.17 45);
  box-shadow: 0 0 0 3px oklch(68% 0.17 45 / 0.22);
  flex: none;
}

/* Hover card for company logos */
.earth-globe-widget__card {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  border-radius: 14px;
  background: oklch(99% 0.002 260 / 0.97);
  box-shadow: 0 10px 28px rgba(20, 25, 40, 0.18), 0 2px 6px rgba(20, 25, 40, 0.08);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-width: 260px;
}

.earth-globe-widget__card.is-visible {
  opacity: 1;
}

.earth-globe-widget__card.anchor-below {
  transform: translate(-50%, 0%);
}

.earth-globe-widget__card-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: oklch(95% 0.005 260);
}

.earth-globe-widget__card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.earth-globe-widget__card-name {
  font: 650 13.5px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: oklch(24% 0.01 260);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.earth-globe-widget__card-loc {
  font: 500 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: oklch(52% 0.01 260);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
