/* ==========================================================================
   Ikabin — "Where we deliver" globe component
   Pairs with /assets/js/globe.js. No dependencies.

   Usage:
     <div class="globe" data-globe></div>              dark sections (default)
     <div class="globe" data-globe data-globe-light></div>   light sections

   Theme hooks (set on the container or an ancestor):
     --globe-dot          land dot colour
     --globe-marker       market marker colour
     --globe-home         UAE home marker colour
     --globe-arc          delivery arc colour
     --globe-sphere       faint sphere fill behind the dots
     --globe-halo         atmosphere glow at the limb
   ========================================================================== */

.globe {
  /* Dark-section defaults: near-black bg, soft blue-grey dots, warm markers */
  --globe-dot: #7f94ad;
  --globe-marker: #f0a868;
  --globe-home: #ffc98a;
  --globe-arc: #e8b27a;
  --globe-sphere: rgba(104, 134, 170, 0.10);
  --globe-halo: rgba(126, 160, 200, 0.22);

  position: relative;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.globe.is-ready {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .globe {
    transition: opacity 0.4s ease;
    transform: none;
  }
}

.globe canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y; /* vertical page scroll still works over the globe */
}

.globe.is-grabbing canvas {
  cursor: grabbing;
}

.globe.is-marker-hover canvas {
  cursor: pointer;
}

/* Light-section variant */
.globe[data-globe-light] {
  --globe-dot: #5d6b7e;
  --globe-marker: #d97b2f;
  --globe-home: #c2601c;
  --globe-arc: #d98b48;
  --globe-sphere: rgba(90, 120, 160, 0.07);
  --globe-halo: rgba(90, 120, 170, 0.14);
}

/* --------------------------------------------------------------------------
   Tooltip — small dark pill: country name + arrow line
   -------------------------------------------------------------------------- */

.globe-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  background: rgba(16, 18, 22, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 8px 13px 9px;
  white-space: nowrap;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  font-family: inherit;
}

.globe-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

.globe-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(16, 18, 22, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.globe-tooltip .globe-tooltip-country {
  display: block;
  color: #f5f6f7;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.globe-tooltip .globe-tooltip-link {
  display: block;
  margin-top: 1px;
  color: var(--globe-marker, #f0a868);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
}

.globe-tooltip.is-home .globe-tooltip-link {
  color: var(--globe-home, #ffc98a);
}
