/* --- Leaflet overrides for Execution Atlas --- */

.ea-map-popup-wrapper .leaflet-popup-content-wrapper {
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
}

.ea-map-popup-wrapper .leaflet-popup-content {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.ea-map-popup-wrapper .leaflet-popup-tip {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
}

/* --- 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;
}

.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;
}

/* --- 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;
}

/* --- Leaflet zoom control --- */

.leaflet-control-zoom a {
  font-family: Inter, system-ui, sans-serif !important;
  border-radius: 6px !important;
  border-color: #E5E7EB !important;
  color: #374151 !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 16px !important;
}

.leaflet-control-zoom a:hover {
  background: #F5F5F5 !important;
  color: #0B0B0B !important;
}

.leaflet-control-zoom {
  border: 1px solid #E5E7EB !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* --- Attribution --- */

.leaflet-control-attribution {
  font-size: 10px !important;
  background: rgba(255, 255, 255, 0.8) !important;
  font-family: Inter, system-ui, sans-serif !important;
  color: #6B7280 !important;
}

.leaflet-control-attribution a {
  color: #6B7280 !important;
}

/* --- 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;
}
