/*
 * Dashboard do Homicide Monitor.
 * Medidas extraídas do site atual (ArcGIS) a 1440x900. Regras de escala observadas no original:
 *  - cabeçalho e rodapé: altura fixa (58px e 30px), conteúdo em px;
 *  - painel esquerdo: 28,6% da largura; textos em px fixos, posições verticais em % da altura;
 *  - painel direito: 311px de largura, colado na borda direita;
 *  - mapa: ocupa o espaço entre os dois painéis.
 * Fonte: o original usa Avenir Next (licença da Esri); aqui entra a Nunito Sans (livre), parecida.
 */
:root {
  --bg: #000;
  --hdr-bg: #001017;
  --hdr-line: #032a44;
  --ftr-bg: #00131c;
  --panel-left: #011016;
  --panel-right: #000c11;
  --panel-line: #064471;
  --row-title: #042a47;
  --bar: #efefef;
  --txt: #f0f0f0;
  --label: #89caf9;
  --cyan: #b2f0ff;
  --orange: #ffa83c;
  --gold: #f2b000;
  --menu: #e58e1e;
  --ui: "Nunito Sans", "Avenir Next", "Segoe UI", sans-serif;
  --left-w: 28.597vw;          /* 411,8px a 1440 */
  --left-h: calc(100vh - 158.3px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body.dash {
  position: relative;
  min-width: 1200px;
  min-height: 640px;
  overflow: hidden;
  background: var(--bg);
  color: #fff;
  font-family: var(--ui);
  font-size: 13px;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------------- Cabeçalho ---------------- */
.hdr {
  position: absolute; z-index: 5; left: 0; right: 0; top: 0; height: 58px;
  background:
    linear-gradient(var(--hdr-line), var(--hdr-line)) 254px 0 / 1px 100% no-repeat,
    linear-gradient(var(--hdr-line), var(--hdr-line)) 623px 0 / 1px 100% no-repeat,
    var(--hdr-bg);
  font-family: Arial, sans-serif;
}

.hdr__brand { position: absolute; left: 17px; top: 14.3px; margin: 0; font-size: 25px; line-height: 28px; font-weight: 400; white-space: nowrap; }
.hdr__brand strong { font-weight: 600; }

.hdr__sub { position: absolute; left: 266px; top: 10px; margin: 0; font-size: 12px; line-height: 16.9px; font-weight: 600; color: var(--cyan); }
.hdr__sub span { display: block; white-space: nowrap; }

.hdr__lbl { position: absolute; top: 6px; font-size: 12px; line-height: 14px; color: var(--txt); }
.hdr__lbl--search { left: 639px; }
.hdr__lbl--years { left: 949px; }

.search { position: absolute; left: 637px; top: 21.5px; height: 32px; display: flex; font-family: var(--ui); }
.search__list, .search__go { width: 32px; height: 32px; display: grid; place-items: center; color: #fff; }
.search__list { background: #444; border: 1px solid #444; border-radius: 4px 0 0 4px; }
.search__go { background: #0c91f0; border: 1px solid #0c91f0; border-radius: 0 4px 4px 0; }
.search__field { width: 228px; height: 32px; background: #181818; border: 1px solid #707070; border-left: 0; }
.search__field input { width: 100%; height: 100%; padding: 0 10px; background: transparent; border: 0; outline: 0; color: #fff; font: 400 14px var(--ui); }
.search__field input::placeholder { color: #8c8c8c; }
.search__field:focus-within, .years select:focus-visible { outline: 2px solid #0c91f0; outline-offset: -1px; }

.years { position: absolute; left: 945px; top: 20.9px; width: 200px; height: 32px; font-family: var(--ui); }
.years select {
  width: 100%; height: 100%; padding: 0 28px 0 8px; appearance: none; -webkit-appearance: none;
  background: #181818; border: 1px solid #707070; border-radius: 2px; color: #fff; font: 400 14px var(--ui);
}
.years__chev { position: absolute; right: 9px; top: 10px; color: #fff; pointer-events: none; }
.years__btn { width: 100%; height: 100%; padding: 0 28px 0 8px; text-align: left; background: #181818; border: 1px solid #707070; border-radius: 2px; color: #fff; font: 400 14px var(--ui); cursor: pointer; }
.years__btn:focus-visible { outline: 2px solid #0c91f0; outline-offset: -1px; }
.years__panel { position: absolute; left: 0; top: 38px; width: 200px; z-index: 30; background: #222; border: 1px solid #3a3a3a; box-shadow: 0 4px 14px rgba(0,0,0,.6); padding: 4px 0 6px; }
.years__panel[hidden] { display: none; }
.years__find { display: flex; align-items: center; gap: 6px; margin: 2px 4px 6px; padding: 0 8px; height: 26px; background: #181818; border: 1px solid #8a8a8a; color: #ccc; }
.years__find:focus-within { outline: 2px solid #0c91f0; outline-offset: -1px; }
.years__find input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font: 400 13px var(--ui); }
.years__find input::placeholder { color: #9a9a9a; }
.years__list { list-style: none; margin: 0; padding: 0; max-height: 208px; overflow-y: auto; }
.years__list li { padding: 0 0 0 28px; height: 27.5px; line-height: 27.5px; color: #fff; font: 400 14px/27.5px var(--ui); cursor: pointer; }
.years__list li:hover { background: #0c91f0; }
.years__list li[aria-selected] { background: #3a3a3a; }

.hdr__reset { position: absolute; left: 1160px; top: 21.1px; display: block; line-height: 0; }

/* Seletor de idioma (item novo; o original não tem um visível) */
.lang { position: absolute; right: 14px; top: 20px; display: flex; gap: 6px; align-items: center; font: 400 12px/16px Arial, sans-serif; color: var(--label); }
.lang a { padding: 2px 3px; }
.lang a[aria-current="true"] { color: #fff; font-weight: 700; }
.lang a:hover { color: #fff; }

/* ---------------- Mapa ---------------- */
.map { position: absolute; z-index: 1; left: var(--left-w); right: 329.7px; top: 34px; bottom: 14px; background: #000; overflow: hidden; }
.map__canvas { position: absolute; inset: 0; background: #000; }
.map__canvas .maplibregl-canvas { outline: none; }
.map .maplibregl-ctrl-attrib { font-size: 9px; background: rgba(0, 12, 17, .6); color: #8fa3ad; }
.map .maplibregl-ctrl-attrib a { color: #b2f0ff; }
.mapctl { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.mapctl__btn { pointer-events: auto; }

.mapctl__btn { position: absolute; left: 15.1px; width: 32px; height: 32px; display: grid; place-items: center; background: #444; color: #fff; }
.mapctl__btn--in { top: 16px; }
.mapctl__btn--out { top: 48px; border-top: 1px solid #000; height: 33px; }
.mapctl__btn--home { top: 88px; }
.mapctl__btn:hover { background: #555; }

.legend { position: absolute; z-index: 2; left: calc(var(--left-w) + 6px); bottom: 51px; width: 290px; color: var(--cyan); font-size: 11px; line-height: 15px; }
.legend__title { padding-left: 2px; height: 15px; white-space: nowrap; }
.legend__bar { display: flex; gap: 2px; margin-top: 5px; height: 10px; }
.legend__bar i { display: block; width: 29px; height: 10px; }
.legend__bar i.legend__nodata { width: 55px; background: #000; box-shadow: inset 0 0 0 1px #1c2b33; }
.legend__labels { display: flex; gap: 2px; margin-top: 3px; font-size: 10px; line-height: 13px; }
.legend__labels span { width: 29px; padding-left: 4px; white-space: nowrap; }
.legend__labels span:first-child { width: 55px; padding-left: 2px; }

.logo { position: absolute; z-index: 2; left: calc(14.3vw - 85.7px); bottom: 28px; width: 171px; height: 77px; object-fit: contain; }

/* ---------------- Painel esquerdo ---------------- */
.left {
  position: absolute; z-index: 2; left: 0; top: 58.1px; width: var(--left-w); height: var(--left-h); overflow: hidden;
  background: var(--panel-left); box-shadow: inset 0 0 0 2px var(--panel-line);
}
.left > * { position: absolute; margin: 0; }

.l-title { left: 18.2px; top: 7.1px; height: 30px; font-size: 17px; line-height: 30px; font-weight: 600; color: var(--cyan); white-space: nowrap; }
.l-lbl { font-size: 10px; line-height: 13px; color: var(--label); text-align: center; text-transform: none; }
.l-source-lbl { left: 18.6px; top: 43px; line-height: 18px; text-align: left; }
.l-source { left: 18.2px; top: 63.9px; font-size: 13px; line-height: 22px; color: var(--orange); white-space: nowrap; }
.l-year-lbl { right: 64.95px; top: 45.3px; line-height: 18px; transform: translateX(50%); }
.l-year { right: 64.95px; top: 70.9px; font-size: 13px; line-height: 13px; color: #fff; transform: translateX(50%); }

.l-sep { left: 0; right: 0; height: 0; margin: 0; border: 0; border-top: 1px solid #0c1c22; }
.l-sep--1 { top: 15.76%; }
.l-sep--2 { top: 27.4%; }

.l-count-lbl { left: 34.5px; top: 16.77%; width: 53px; }
.l-pop-lbl { left: 50%; top: 17.73%; transform: translateX(-50%); white-space: nowrap; }
.l-rate-lbl { right: 71.45px; top: calc(16.5% + 3px); transform: translateX(50%); white-space: nowrap; }

.l-info { width: 16px; height: 16px; background: url("../img/dashboard/icon-info.png") center / 16px 16px no-repeat; border-radius: 2px; }
.l-info--count { left: 108px; top: 17.57%; }
.l-info--rate { right: 6px; top: 17.18%; }

.l-val { top: 21.77%; font-size: 17px; line-height: 30px; color: #fff; white-space: nowrap; }
.l-val--count { left: 57.8px; transform: translateX(-50%); }
.l-val--pop { left: 50%; transform: translateX(-50%); }
.l-val--rate { right: 70.15px; transform: translateX(50%); }

.l-evo-lbl { left: 50%; top: 28.38%; line-height: 18px; transform: translateX(-50%); white-space: nowrap; }
.l-chart { left: 0; right: 0; top: 29.93%; height: 22.8%; }
.l-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.l-chart text { fill: #cfe3ee; font: 400 10px var(--ui); text-anchor: middle; }

.l-pill {
  left: 2px; width: 65.3px; height: 23px; display: grid; place-items: center; border: 2px solid #001820; border-radius: 50px;
  font-size: 10px; line-height: 10px; color: var(--label);
}
.l-pill::after { content: ""; position: absolute; left: 100%; top: 50%; width: 100vw; height: 0; border-top: 1px solid #0c1c22; }
.l-pill--weapon { top: 53.47%; }
.l-pill--gender { top: 65.8%; }
.l-pill--age { top: 79.42%; }

.l-block { left: 50%; width: 254px; transform: translate(-50%, -50%); text-align: center; font-size: 13px; line-height: 26px; color: var(--txt); white-space: nowrap; }
.l-block--weapon { top: 60.25%; }
.l-block--gender { top: 73.07%; }
.l-block--age { top: 86.99%; }

.l-more { right: 8.5px; width: 74.6px; height: 42px; display: grid; place-items: center; transform: translateY(-50%); font-size: 14px; font-weight: 700; color: var(--gold); border-radius: 2px; }
.l-more--weapon { top: 61.4%; }
.l-more--gender { top: 74.2%; }
.l-more--age { top: 87.6%; }
.l-more:hover { background: rgba(7, 26, 31, .5); }

.l-links { left: 5.7px; right: 13.3px; bottom: 4.1px; height: 35.4px; display: flex; gap: 8px; }
.l-links a {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex: 119.1 1 0; min-width: 0; border: 1px solid transparent; border-radius: 2px;
  background: rgba(7, 26, 31, .2); font-size: 14px; color: var(--label); white-space: nowrap;
}
.l-links a:last-child { flex-grow: 138.3; }
.l-links a:hover { background: rgba(12, 145, 240, .25); }
.l-links img { display: block; }

/* ---------------- Painel direito (ranking) ---------------- */
.right {
  position: absolute; z-index: 2; right: 2px; top: 60px; width: 311px; height: calc(100vh - 159.4px);
  background: var(--panel-right); overflow: hidden;
}
.r-title { margin: 0; height: 35.5px; padding-top: 6px; background: #002231; text-align: center; font: 600 14px/16px Arial, sans-serif; color: var(--gold); }
.r-head { display: flex; height: 33.7px; }
.r-head__cell { flex: 1; display: grid; place-items: center; border: 1px solid var(--panel-line); font-size: 7.4px; line-height: 7.8px; color: var(--label); text-align: center; }
.r-head__cell--two { display: flex; flex-direction: column; justify-content: center; }
.r-head__cell--two span { display: block; }
.r-list { height: calc(100% - 69.2px); overflow: hidden auto; border: 1px solid var(--panel-line); scrollbar-width: thin; scrollbar-color: #064471 transparent; }
.r-note { margin: 0; padding: 22px 18px; text-align: center; font-size: 12.5px; line-height: 18px; color: #9db2bd; }
.r-row { margin: 0 1px; height: 50px; border: 1px solid var(--panel-line); background: #001017; }
.r-row__name { height: 24px; background: var(--row-title); text-align: center; font-size: 13px; line-height: 24px; color: var(--txt); white-space: pre; }
.r-row__cells { display: flex; }
.r-row__cells span { flex: 1; height: 24px; border-top: 1px solid var(--panel-line); text-align: center; font-size: 13px; line-height: 23px; color: var(--txt); }
.r-row__cells span + span { border-left: 1px solid var(--panel-line); }

.r-toggle {
  position: absolute; z-index: 3; right: 315px; top: 410px; width: 14px; height: 40px; display: grid; place-items: center;
  background: var(--panel-right); border: 1px solid var(--panel-line); border-right: 0; color: #ffba34;
}
body.is-collapsed .right { display: none; }
body.is-collapsed .r-toggle { right: 2px; }
body.is-collapsed .r-toggle svg { transform: scaleX(-1); }
body.is-collapsed .map { right: 18px; }

/* ---------------- Rodapé ---------------- */
.ftr { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: 30px; background: var(--ftr-bg); font-size: 12px; }
.ftr__menu { position: absolute; left: calc(46.1vw - 46px); top: 0; height: 30px; display: flex; gap: 9.9px; }
.ftr__menu a { min-width: 98.3px; padding: 0 14px; display: grid; place-items: center; color: var(--menu); white-space: nowrap; }
.ftr__menu a:nth-child(3), .ftr__menu a:nth-child(5) { min-width: 152.4px; }
.ftr__menu a:hover { color: #fff; }
.ftr__social { position: absolute; right: 7.2px; top: 4.5px; display: flex; gap: 7.8px; }
.ftr__social a { display: block; line-height: 0; }

/* Balão (i): caixa escura com borda azul e seta apontando para o ícone */
.tip {
  position: absolute; z-index: 6; width: 140px; padding: 8px 12px 10px; background: #001017; border: 1px solid #0c91f0;
  font-size: 9px; line-height: 18.3px; color: var(--txt); text-align: left;
}
.tip strong { display: block; margin-bottom: 1px; font-size: 10px; line-height: 12px; font-weight: 700; color: var(--label); }
.tip p { margin: 0; }
.tip::before {
  content: ""; position: absolute; top: -6px; left: calc(var(--arrow, 68px) - 5px); width: 9px; height: 9px;
  background: #001017; border: 1px solid #0c91f0; border-right: 0; border-bottom: 0; transform: rotate(45deg);
}

/* ---------------- Busca: limpar e sugestões ---------------- */
.search__field { position: relative; }
.search__field input { padding-right: 30px; }
.search__clear { position: absolute; right: 7px; top: 50%; width: 18px; height: 18px; margin-top: -9px; display: grid; place-items: center; color: #d8d8d8; }
.search__clear:hover { color: #fff; }
.suggest {
  position: absolute; z-index: 10; left: 0; top: 35px; width: 292px; max-height: 340px; overflow-y: auto;
  background: #262626; border: 1px solid #5a5a5a; box-shadow: 0 6px 16px rgba(0, 0, 0, .55); font-family: var(--ui);
}
.suggest[hidden] { display: none; }
/* Seta da busca: Todos / País / Estado / Cidade com caixas de seleção */
.search__list.is-open { background: #5a5a5a; }
.scope { position: absolute; z-index: 11; left: 0; top: 33px; width: 160px; padding: 6px 0; background: #262626; border: 1px solid #5a5a5a; box-shadow: 0 6px 16px rgba(0, 0, 0, .55); font-family: var(--ui); }
.scope[hidden] { display: none; }
.scope__row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: #fff; font-size: 14px; cursor: pointer; }
.scope__row:hover { background: #3a3a3a; }
.scope__row--all { border-bottom: 1px solid #5a5a5a; margin-bottom: 4px; padding-bottom: 10px; }
.scope__row input { width: 16px; height: 16px; margin: 0; accent-color: #0c91f0; cursor: pointer; }
.l-source a { color: inherit; text-decoration: none; }
.l-source a:hover, .l-source a:focus-visible { text-decoration: underline; }
.suggest__group { padding: 8px 16px; background: #4a4a4a; color: #fff; font-size: 13px; font-weight: 700; }
.suggest__item { padding: 9px 16px; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.suggest__item.is-active, .suggest__item:hover { background: #0c91f0; }
.suggest__none { padding: 12px 16px; color: #a8a8a8; font-size: 13px; line-height: 18px; }

/* Bloco sem dados (arma, gênero, idade) */
.l-block--nodata { display: flex; flex-direction: column; align-items: center; gap: 4px; line-height: 18px; }
.l-block--nodata svg { display: block; }

/* ---------------- Fundo escurecido, painéis laterais e janela central ---------------- */
.backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(240, 240, 240, .5); }
.backdrop[hidden] { display: none; }

.dlg {
  position: fixed; z-index: 30; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100vw; display: flex; flex-direction: column;
  padding: 63px 16px 0; background: #031c21; font-family: Arial, sans-serif; box-shadow: -6px 0 24px rgba(0, 0, 0, .5);
}
.dlg[hidden] { display: none; }
.dlg--facts { width: 487px; }
.dlg__title { margin: 0 0 27px; font: 600 22px/31px Arial, sans-serif; color: #f0f0f0; }
.dlg__body { flex: 1; overflow-y: auto; padding: 0 10px 40px 0; font-size: 14px; line-height: 18.13px; color: #b3b3b3; scrollbar-width: thin; scrollbar-color: #3a5a66 transparent; }
.dlg--facts .dlg__body { font-size: 16px; line-height: 22.08px; }
.dlg__body p { margin: 0 0 18px; }
.dlg__body h3 { margin: 22px 0 12px; font: 600 15px/18px Arial, sans-serif; color: #f0f0f0; }
.dlg__body h3:first-child { margin-top: 0; }
.dlg__body ul { margin: 0 0 18px; padding-left: 20px; }
.dlg__body li { margin: 0 0 6px; }
.dlg__body strong { color: #fff; }
.dlg__body a { color: #f2b000; text-decoration: none; overflow-wrap: anywhere; }
.dlg__body a:hover { text-decoration: underline; }
.dlg__logo { position: absolute; left: 50%; bottom: -33px; width: 244px; height: auto; transform: translateX(-50%); pointer-events: none; }
.dlg__close, .modal__close, .pp__btn { cursor: pointer; }
.dlg__close { position: absolute; top: 11px; right: 11px; width: 24px; height: 24px; border-radius: 50%; background: #fff; }
.dlg__close::before, .dlg__close::after, .modal__close::before, .modal__close::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; margin: -.8px 0 0 -5.5px; background: #181818;
}
.dlg__close::before, .modal__close::before { transform: rotate(45deg); }
.dlg__close::after, .modal__close::after { transform: rotate(-45deg); }

.modal { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; pointer-events: none; }
.modal[hidden] { display: none; }
.modal__box { pointer-events: auto; position: relative; max-width: 94vw; max-height: 90vh; display: flex; flex-direction: column; background: #000d12; box-shadow: 0 8px 30px rgba(0, 0, 0, .6); font-family: var(--ui); }
.modal__box--chart { width: 711px; padding: 14px 16px 12px; }
.modal__box--list { width: 665px; height: 421px; }
.modal__title { margin: 0; font-size: 18px; line-height: 24px; font-weight: 400; color: #f0f0f0; text-align: center; }
.modal__box--list .modal__title { padding: 6px 12px; font-size: 13px; text-align: left; font-weight: 400; }
.modal__close { position: absolute; top: 14px; right: 16px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.modal__box--list .modal__close { top: 8px; right: 14px; }
.modal__close::before, .modal__close::after { width: 9px; margin-left: -4.5px; }
.modal__body { flex: 1; min-height: 0; overflow: hidden; }
.modal__box--list .modal__body { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3a5a66 transparent; }
.modal__empty { margin: 60px 0; text-align: center; color: #cfd8dc; font-size: 14px; }
.mc-tick { fill: #cfd8dc; font: 400 11px var(--ui); }
.mc-val { fill: #fff; font: 400 10px var(--ui); }
.mc-cat { fill: #dfe8ec; font: 400 11px var(--ui); }

.list { display: block; }
.list__row {
  width: 100%; min-height: 51px; padding: 0 8px; display: grid; grid-template-columns: minmax(0, 1fr) 70px 120px 80px 70px; align-items: center;
  background: #06222f; border: 0; border-bottom: 1px solid #0e3a4d; color: #fff; font: 400 13px var(--ui); text-align: center; cursor: pointer;
}
.list__row:nth-child(even) { background: #072a3a; }
.list__row:hover { background: #0a3a52; }
.list__row > div { padding: 0 6px; overflow-wrap: anywhere; }
.list__row--head { position: sticky; top: 0; z-index: 1; min-height: 30px; background: #001017; border-bottom: 1px solid #064471; font-size: 10px; font-weight: 700; cursor: default; }
.list__row--head:hover { background: #001017; }

/* ---------------- Popup (visual do ArcGIS) e pin ---------------- */
.hm-popup { z-index: 5; }
.hm-popup .maplibregl-popup-content { padding: 0; border-radius: 0; background: #2b2b2b; box-shadow: 0 2px 14px rgba(0, 0, 0, .65); color: #fff; font-family: var(--ui); }
.hm-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip, .hm-popup.maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .hm-popup.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: #2b2b2b; }
.hm-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .hm-popup.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .hm-popup.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: #2b2b2b; }
.hm-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: #2b2b2b; }
.hm-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: #2b2b2b; }
.pp { width: 420px; max-width: calc(100vw - 32px); }
.pp__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 12px 20px; }
.pp__title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; overflow-wrap: anywhere; }
.pp__btns { display: flex; gap: 2px; flex: none; }
.pp__btn { width: 30px; height: 30px; display: grid; place-items: center; color: #fff; }
.pp__btn:hover { background: #444; }
.pp__tools { display: flex; align-items: center; gap: 4px; padding: 3px 14px; border-top: 1px solid #444; border-bottom: 1px solid #444; }
.pp__act { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; color: #fff; font-size: 13px; cursor: pointer; }
.pp__act:hover { background: #444; }
.pp__body { max-height: 230px; padding: 16px 20px 20px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #777 #2b2b2b; }
.pp__body td a { color: #6cb8ff; text-decoration: none; }
.pp__body td a:hover { text-decoration: underline; }
.pp__foot { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; border-top: 1px solid #444; }
.pp__arrows { display: flex; gap: 6px; }
.pp__count { display: flex; align-items: center; gap: 8px; padding: 0 10px; border-left: 1px solid #444; font-size: 13px; color: #fff; }
.pp__body table { width: 100%; border-collapse: collapse; }
.pp__body th, .pp__body td { padding: 6px 9px; text-align: left; font-size: 14px; line-height: 20px; vertical-align: top; }
.pp__body th { width: 200px; font-weight: 400; color: #fff; }
.pp__body td { overflow-wrap: anywhere; }
.pp__body tr:nth-child(odd) { background: #3a3a3a; }
.pp.is-collapsed .pp__tools, .pp.is-collapsed .pp__body, .pp.is-collapsed .pp__foot { display: none; }
.star { width: 26px; height: 26px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon points='12,1.5 14.9,8.6 22.5,9.1 16.6,14 18.5,21.5 12,17.4 5.5,21.5 7.4,14 1.5,9.1 9.1,8.6' fill='%2318e6ff' stroke='%2302394a' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; pointer-events: none; filter: drop-shadow(0 0 4px rgba(24, 230, 255, .8)); }
.pp--docked { position: absolute; z-index: 6; right: 14px; top: 70px; width: 420px; background: #2b2b2b; box-shadow: 0 2px 14px rgba(0, 0, 0, .65); }
.pin { width: 28px; height: 40px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 42'%3E%3Cpath d='M15 40C15 40 3 26 3 15a12 12 0 0 1 24 0C27 26 15 40 15 40z' fill='%232bd62b' stroke='%230c5c0c' stroke-width='1.6'/%3E%3Ccircle cx='15' cy='15' r='4.4' fill='%23eaffea'/%3E%3C/svg%3E") center / contain no-repeat; pointer-events: none; }

/* Português e espanhol: textos mais longos que o inglês, que é a medida do original */
html:not([lang="en"]) .hdr__brand { font-size: 22px; }
html:not([lang="en"]) .l-count-lbl { left: 21.95px; width: 78px; }
html:not([lang="en"]) .ftr__menu { gap: 4px; }
html:not([lang="en"]) .ftr__menu a { min-width: 0; padding: 0 10px; }
html:not([lang="en"]) .legend__labels span:first-child { font-size: 9px; letter-spacing: -0.2px; }

.noscript { position: fixed; z-index: 50; left: 0; right: 0; top: 58px; margin: 0; padding: 12px 16px; background: #3a1a00; color: #ffd9a8; font: 400 14px/20px Arial, sans-serif; }

/*
 * Telas menores que 1200px: o site atual exige 1280x800 e corta o conteúdo abaixo disso.
 * Aqui os blocos ficam empilhados (cabeçalho, mapa, painel esquerdo, ranking, rodapé), com o mesmo visual.
 */
@media (max-width: 1199px) {
  html, body { height: auto; }
  body.dash { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; }
  .hdr { position: relative; height: auto; min-height: 58px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; background: var(--hdr-bg); }
  .hdr > * { position: static; left: auto; right: auto; top: auto; }
  .hdr__brand { font-size: 22px; line-height: 28px; }
  .hdr__sub { display: none; }
  .hdr__lbl { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .search { position: relative; left: auto; top: auto; flex: 1 1 260px; max-width: 520px; min-width: 0; }
  .years { position: relative; left: auto; top: auto; }
  .search__field { flex: 1; width: auto; min-width: 0; }
  .suggest { width: 100%; }
  .years { width: 150px; }
  .years__panel { width: 150px; }
  .hdr__reset { margin-left: auto; }
  .noscript { top: 0; }

  .map { position: relative; left: auto; right: auto; top: auto; bottom: auto; height: 72vh; min-height: 420px; }
  .left { position: relative; top: auto; left: auto; width: 100%; max-width: 520px; height: 780px; margin: 12px auto; }
  .right { position: relative; right: auto; top: auto; width: 100%; max-width: 420px; height: 740px; margin: 12px auto; }
  .r-toggle { display: none; }
  .legend { position: relative; left: auto; bottom: auto; margin: 10px 14px; }
  .logo { position: static; display: block; margin: 12px auto; }
  .ftr { position: relative; height: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; padding: 10px 14px; }
  .ftr__menu, .ftr__social { position: static; height: auto; flex-wrap: wrap; justify-content: center; }
  .ftr__menu a { min-height: 30px; }
  .dlg { width: 100vw; }
  .modal__box--list { height: 80vh; }
}
@media (max-width: 1199px) { .consent { bottom: 12px; } }
/* Celular: o balão do mapa fica preso à parte de baixo do mapa, na largura da tela (antes era cortado na lateral) */
@media (max-width: 600px), (max-height: 520px) {
  /* Tela cheia no celular: cabeçalho e rodapé ficam fixos e só a tabela rola por dentro (abaixo do banner de cookies, z-index 60) */
  .pp--docked { position: fixed; z-index: 40; left: 0; right: 0; top: 0; bottom: 0; width: auto; max-width: none; max-height: none; display: flex; flex-direction: column; box-shadow: none; }
  .pp--docked .pp__body { flex: 1 1 auto; min-height: 0; max-height: none; }
  .pp--docked .pp__head, .pp--docked .pp__tools, .pp--docked .pp__foot { flex: none; }
  .pp--docked .pp__body th { width: 42%; }
}

:focus-visible { outline: 2px solid #0c91f0; outline-offset: 2px; }

/* Popup: tela "Select feature" (lista de itens sobrepostos) */
.pp__btn.is-off { opacity: .45; cursor: default; }
.pp__head--select { justify-content: flex-start; padding: 12px 10px; border-bottom: 1px solid #444; }
.pp__head--select .pp__ttl { flex: 1; min-width: 0; }
.pp__sub { font-size: 14px; line-height: 20px; color: #fff; }
.pp__body--select { max-height: 260px; padding: 12px 20px; }
.pp__group h4 { margin: 12px 0 10px; font-size: 14px; line-height: 20px; font-weight: 700; }
.pp__radio { display: flex; align-items: center; gap: 10px; padding: 9px 0 9px 4px; font-size: 14px; border-bottom: 1px solid #444; cursor: pointer; }
.pp__radio:last-child { border-bottom: 0; }
.pp__radio input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1px solid #9a9a9a; border-radius: 50%; margin: 0; flex: none; }
.pp__radio input:checked { border: 5px solid #0c91f0; background: #fff; }
.pp__foot--back { justify-content: center; padding: 0; }
.pp__backbtn { width: 100%; height: 44px; color: #fff; font: 400 14px var(--ui); cursor: pointer; }
.pp__backbtn:hover { background: #444; }
