/* --- Globe container --- */

.ea-globe {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.ea-globe__canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.ea-globe__canvas:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: -2px;
  border-radius: inherit;
}

.ea-globe__credit {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 10px;
  color: #9CA3AF;
  font-family: Inter, system-ui, sans-serif;
  pointer-events: none;
}

/* --- wheel-zoom hint (shown when scrolling without ⌘/Ctrl) --- */

.ea-globe__hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(11, 11, 11, 0.72);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 6;
}

.ea-globe__hint--visible {
  opacity: 1;
}

/* --- Zoom controls --- */

.ea-globe-controls {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  background: #FFFFFF;
}

.ea-globe-controls__btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #FFFFFF;
  color: #374151;
  font-size: 16px;
  font-family: Inter, system-ui, sans-serif;
  cursor: pointer;
  line-height: 1;
  transition: background 0.12s, color 0.12s;
}

.ea-globe-controls__btn + .ea-globe-controls__btn {
  border-top: 1px solid #E5E7EB;
}

.ea-globe-controls__btn:hover {
  background: #F5F5F5;
  color: #0B0B0B;
}

/* --- Tooltip --- */

.ea-map-tooltip {
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: #0B0B0B;
  background: #FFFFFF;
}

.ea-globe__tooltip {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 4;
}

/* --- Popup --- */

.ea-globe-popup {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  max-width: 300px;
  animation: ea-globe-popup-in 0.16s ease-out;
}

@keyframes ea-globe-popup-in {
  from { opacity: 0; transform-origin: bottom center; }
  to { opacity: 1; }
}

.ea-globe-popup__close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: #9CA3AF;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  z-index: 1;
}

.ea-globe-popup__close:hover {
  color: #0B0B0B;
  background: #F3F4F6;
}

/* --- Popup content --- */

.ea-map-popup {
  padding: 16px 18px;
  min-width: 200px;
}

.ea-map-popup__cat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-right: 16px;
}

.ea-map-popup__cat-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ea-map-popup__title {
  font-size: 15px;
  font-weight: 700;
  color: #0B0B0B;
  line-height: 1.4;
  margin-bottom: 8px;
}

.ea-map-popup__meta {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 4px;
}

.ea-map-popup__outcome {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

.ea-map-popup__outcome--success {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.ea-map-popup__outcome--failure {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.ea-map-popup__outcome--ongoing {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.ea-map-popup__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 650;
  color: #2563EB;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.ea-map-popup__link:hover {
  opacity: 0.7;
}

/* --- Map region filter (accordion drill-down) --- */

.ea-map-filter {
  margin-top: 12px;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
}

.ea-map-filter__group {
  border-bottom: 1px solid #F3F4F6;
}

.ea-map-filter__group:last-child {
  border-bottom: none;
}

.ea-map-filter__region {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: color 0.12s, background 0.12s;
  border-radius: 6px;
}

.ea-map-filter__region:hover {
  background: #F9FAFB;
  color: #0B0B0B;
}

.ea-map-filter__region--active {
  color: #0B0B0B;
  font-weight: 700;
}

.ea-map-filter__arrow {
  font-size: 9px;
  color: #9CA3AF;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}

.ea-map-filter__arrow--open {
  transform: rotate(90deg);
}

.ea-map-filter__region-label {
  flex: 1;
}

.ea-map-filter__count {
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
  font-variant-numeric: tabular-nums;
}

.ea-map-filter__countries {
  padding-left: 22px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.ea-map-filter__countries--open {
  max-height: 200px;
}

.ea-map-filter__country {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #6B7280;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}

.ea-map-filter__country:hover {
  background: #F3F4F6;
  color: #374151;
}

.ea-map-filter__country--active {
  color: #0B0B0B;
  font-weight: 650;
  background: #EFF6FF;
}

.ea-map-filter__country--active:hover {
  background: #DBEAFE;
}

.ea-map-filter__reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #2563EB;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 4px;
}

.ea-map-filter__reset:hover {
  text-decoration: underline;
}
