.k1-globe {
  --k1-globe-city: #8e1b11;
  --k1-globe-ink: #1d2142;
  --k1-globe-purple: #502e91;

  cursor: grab;
  font-family: "Interstate", ui-sans-serif, system-ui, sans-serif;
  height: 100%;
  min-height: 290px;
  overflow: hidden;
  position: relative;
  touch-action: none;
  width: 100%;
}

.k1-globe:focus-visible {
  outline: 3px solid rgb(86 52 154 / 35%);
  outline-offset: -3px;
}

.k1-globe.is-dragging {
  cursor: grabbing;
}

.k1-globe__sphere,
.k1-globe__canvas,
.k1-globe__labels {
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.k1-globe__sphere {
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(
    circle,
    #000 0%,
    #000 82%,
    rgb(0 0 0 / 88%) 91%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle,
    #000 0%,
    #000 82%,
    rgb(0 0 0 / 88%) 91%,
    transparent 100%
  );
  pointer-events: none;
}

.k1-globe__canvas,
.k1-globe__labels {
  height: 100%;
  width: 100%;
}

.k1-globe__canvas {
  z-index: 1;
}

.k1-globe__labels {
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.k1-globe__label {
  color: var(--k1-globe-city);
  font-size: 13px;
  font-weight: 400;
  left: 0;
  line-height: 1;
  position: absolute;
  text-shadow:
    -2px -2px 0 white,
    2px -2px 0 white,
    -2px 2px 0 white,
    2px 2px 0 white,
    0 0 5px white;
  top: 0;
  white-space: nowrap;
  will-change: transform;
}

.k1-globe__label.is-priority {
  font-size: 14px;
}

.k1-globe::after {
  background:
    linear-gradient(
      to right,
      white 0,
      rgb(255 255 255 / 0%) 90px,
      rgb(255 255 255 / 0%) calc(100% - 90px),
      white 100%
    ),
    linear-gradient(
      to top,
      white 0,
      rgb(255 255 255 / 0%) 90px
    ),
    linear-gradient(
      to bottom,
      white 0,
      rgb(255 255 255 / 0%) 100px
    );
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 3;
}

.k1-globe__navigation {
  background: white;
  border: 1px solid rgb(29 33 66 / 12%);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
  display: flex;
  flex-direction: column;
  left: clamp(24px, 10vw, 120px);
  overflow: hidden;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}

.k1-globe__navigation-button {
  align-items: center;
  background: white;
  border: 0;
  border-bottom: 1px solid rgb(29 33 66 / 10%);
  color: #555b66;
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.k1-globe__navigation-button:last-child {
  border-bottom: 0;
}

.k1-globe__navigation-button:hover {
  background: #f6f7fa;
}

.k1-globe__navigation-button:focus-visible {
  outline: 2px solid var(--k1-globe-purple);
  outline-offset: -3px;
}

.k1-globe__navigation-button svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.k1-globe__navigation-button svg path[d^="M14.8"] {
  fill: currentColor;
  stroke: none;
}

.k1-globe__dataset-control {
  align-items: center;
  background: white;
  border-radius: 999px;
  bottom: 20px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
  display: inline-flex;
  gap: 8px;
  left: 50%;
  padding: 6px;
  position: absolute;
  transform: translateX(-50%);
  z-index: 5;
}

.k1-globe__dataset-pill {
  background: rgb(236 226 255 / 50%);
  border-radius: 999px;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  transition:
    left 0.4s ease,
    width 0.3s ease;
}

.k1-globe__dataset-option {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #6e6e73;
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 400;
  padding: 15px 20px;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
  z-index: 1;
}

.k1-globe__dataset-option:hover,
.k1-globe__dataset-option.is-active {
  color: var(--k1-globe-purple);
}

.k1-globe__dataset-option:focus-visible {
  outline: 2px solid var(--k1-globe-purple);
  outline-offset: -3px;
}

.k1-globe__status {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: absolute;
  text-align: center;
  z-index: 6;
}

.k1-globe__status[hidden],
.k1-globe__navigation[hidden],
.k1-globe__dataset-control[hidden] {
  display: none;
}

.k1-globe__status-card {
  align-items: center;
  background: rgb(255 255 255 / 92%);
  border: 1px solid rgb(29 33 66 / 8%);
  border-radius: 16px;
  box-shadow: 0 16px 42px rgb(52 23 106 / 10%);
  color: var(--k1-globe-ink);
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
  padding: 18px 22px;
}

.k1-globe__status-card span {
  color: #686873;
  font-size: 0.875rem;
}

.k1-globe__retry {
  background: #4c2358;
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  font: inherit;
  margin-top: 4px;
  padding: 9px 16px;
}

.k1-globe__accessible-list {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.k1-globe.is-compact::after {
  background:
    linear-gradient(
      to top,
      white 0,
      rgb(255 255 255 / 0%) 55px
    ),
    linear-gradient(
      to bottom,
      white 0,
      rgb(255 255 255 / 0%) 140px
    );
}

.k1-globe.is-compact .k1-globe__navigation {
  bottom: 100px;
  left: 16px;
  top: auto;
  transform: none;
}

.k1-globe.is-compact .k1-globe__dataset-control {
  bottom: 16px;
  padding: 6px;
}

.k1-globe.is-compact .k1-globe__dataset-option {
  font-size: 1.0625rem;
  padding: 15px 20px;
}

@media (max-width: 768px) {
  .k1-globe:not(.is-compact)::after {
    background:
      linear-gradient(
        to top,
        white 0,
        rgb(255 255 255 / 0%) 55px
      ),
      linear-gradient(
        to bottom,
        white 0,
        rgb(255 255 255 / 0%) 140px
      );
  }

  .k1-globe:not(.is-compact) .k1-globe__navigation {
    bottom: 100px;
    left: 16px;
    top: auto;
    transform: none;
  }

  .k1-globe:not(.is-compact) .k1-globe__dataset-control {
    bottom: 16px;
    padding: 6px;
  }

  .k1-globe:not(.is-compact) .k1-globe__dataset-option {
    font-size: 1.0625rem;
    padding: 15px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .k1-globe__dataset-pill {
    transition: none;
  }
}
