/**
 * @file
 * Behavioural styling only for the TNA priority map.
 *
 * The layout comes from the theme (scss/_layout.scss: .countries_tna_priority,
 * .countries_priority_map_view, .map_filters). This file covers the states the
 * static design has no markup for: an inert alphabet letter, the empty result
 * notice, the sector checkbox that sits in a group title, and giving the map
 * canvas a height before Highcharts measures it.
 */

.highcharts-map-canvas {
  min-height: 420px;
  width: 100%;
}

.alphabet a.is_empty {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.country_profiles_empty,
.countries_priority_map_empty {
  margin: 24px 0;
  font-style: italic;
}

/* The sector row doubles as a checkbox; keep it reading as a group heading. */
.map_filters_dropdown .checkbox_group_title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.map_filters_dropdown .checkbox_group_title label {
  font-weight: 700;
  cursor: pointer;
}

.tna_map_tooltip {
  font-weight: 700;
}

/* Country popup — positioned inside the map box, styled to match the homepage
   map's .map-tooltip-wrapper. */
.countries_priority_map_view_map {
  position: relative;
}

.tna_map_popup {
  position: absolute;
  z-index: 5;
  width: 280px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

/* The homepage map ships these header styles in unepccc_highcharts_map.css,
   which this page does not load — repeated here so the popup is self-contained
   rather than depending on another block's stylesheet being present. */
.tna_map_popup .tooltip-header-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.tna_map_popup .tooltip-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tna_map_popup .country-name {
  font-weight: 700;
  line-height: 1.2;
}

.tna_map_popup .country-region {
  font-size: 0.8125rem;
  color: #555;
}

.tna_map_popup .close-map-tooltip {
  flex: 0 0 auto;
  background: none;
  border: 0;
  padding: 0;
  line-height: 1;
  font-size: 0.875rem;
  cursor: pointer;
  color: #000;
}

.tna_map_popup_tabs {
  display: flex;
  gap: 4px;
  margin: 4px 0 12px;
  border-bottom: 1px solid #e0e0e0;
}

.tna_map_popup_tab {
  flex: 1;
  padding: 6px 4px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 0.875rem;
  cursor: pointer;
}

.tna_map_popup_tab.active {
  border-bottom-color: #009aef;
  font-weight: 700;
}

.tna_map_popup_sectors {
  margin-bottom: 16px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 0.875rem;
}

.tna_map_popup_sectors p {
  margin: 0 0 4px;
}

.tna_map_popup_empty {
  color: #666;
  font-style: italic;
}

.tna_map_popup .primary_cta {
  display: inline-block;
}
