/* ============================================================
   MAPAS TEMÁTICOS — painel (23/10/2026)
   Mesmo desenho do painel do Mapa de Calor (.hm-panel): fixo à direita,
   header azul do portal, arrastável (ModalDrag) e redimensionável.
============================================================ */
.mt-panel {
  position: fixed;
  top: 70px;
  right: 10px;
  width: 340px;
  min-width: 280px;
  max-height: calc(100vh - 90px);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, .25);
  display: flex;
  flex-direction: column;
  z-index: 9300;
  overflow: hidden;
  resize: both;
  font-size: 13px;
  color: #222;
}
.mt-panel.hidden { display: none; }
.mt-head {
  background: #003b73;
  color: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  font-weight: 600;
}
.mt-head button {
  background: transparent; border: 0; color: #fff; font-size: 18px; cursor: pointer; line-height: 1;
}
.mt-body { overflow: auto; padding: 8px 10px 12px; flex: 1; }
.mt-busca {
  width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid #ccd; border-radius: 6px; margin-bottom: 6px;
}
.mt-grupo { margin-top: 8px; font-size: 11px; font-weight: 700; color: #003b73; text-transform: uppercase; letter-spacing: .03em; }
.mt-tema {
  display: block; width: 100%; text-align: left; padding: 6px 8px; margin-top: 4px;
  border: 1px solid #dde3ea; border-radius: 6px; background: #f8fafc; cursor: pointer; font-size: 13px;
}
.mt-tema:hover { background: #eef4fb; }
.mt-tema.ativo { background: #003b73; color: #fff; border-color: #003b73; }
.mt-tema.bloqueado { opacity: .55; cursor: not-allowed; }
.mt-tema small { display: block; opacity: .75; font-size: 11px; margin-top: 2px; }
/* Tipo do mapa em destaque ("Mapa de Saneamento:") e o recorte logo depois */
.mt-tipo { font-size: 14px; font-weight: 700; color: #003b73; }
.mt-recorte { font-size: 13px; font-weight: 500; }
.mt-tema.ativo .mt-tipo { color: #fff; }
.mt-detalhe h4 .mt-tipo { display: block; font-size: 15px; }
.mt-detalhe h4 .mt-recorte { display: block; font-size: 13px; font-weight: 500; color: #335; }
.mt-detalhe { border: 1px solid #cfd9e4; background: #f7fafd; border-radius: 8px; margin: 4px 0 8px; padding: 8px; }
.mt-detalhe.hidden { display: none; }
.mt-detalhe h4 { margin: 0 0 4px; font-size: 14px; color: #003b73; }
.mt-status { margin: 6px 0; font-size: 12px; color: #555; }
.mt-aviso {
  background: #fff8e1; border: 1px solid #ffd54f; border-radius: 6px; padding: 8px; margin: 6px 0; font-size: 12px; line-height: 1.4;
}
.mt-aviso b { color: #8a5a00; }
.mt-nota { font-size: 11px; color: #666; margin: 6px 0; }
.mt-legenda { list-style: none; margin: 6px 0; padding: 0; }
.mt-legenda li { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 12px; }
.mt-legenda .sw { width: 16px; height: 12px; border: 1px solid rgba(0,0,0,.35); border-radius: 2px; flex: 0 0 auto; }
.mt-legenda .sw.linha { height: 4px; border: 0; }
.mt-legenda .sw.ponto { width: 12px; height: 12px; border-radius: 50%; }
.mt-legenda .qt { margin-left: auto; color: #666; font-variant-numeric: tabular-nums; }
.mt-grad { height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.3); margin: 4px 0 2px; }
.mt-grad-rot { display: flex; justify-content: space-between; font-size: 11px; color: #555; }
.mt-ctrl { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 12px; flex-wrap: wrap; }
.mt-ctrl input[type=range] { flex: 1; }
.mt-acoes { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.mt-acoes button {
  flex: 1; padding: 6px; border: 1px solid #c5d0db; border-radius: 6px; background: #f3f6f9; cursor: pointer; font-size: 12px;
}
.mt-acoes button:hover { background: #e6edf4; }
.mt-export { border-top: 1px dashed #c5d0db; margin-top: 8px; padding-top: 6px; }
.mt-export.hidden { display: none; }
.mt-export select { font-size: 12px; }
.mt-popup {
  background: #fff; border-radius: 8px; box-shadow: 0 3px 14px rgba(0,0,0,.3); padding: 8px 10px; font-size: 12px;
  min-width: 160px; max-width: 260px; position: relative;
}
.mt-popup b { color: #003b73; }
.mt-popup .x { position: absolute; top: 2px; right: 6px; cursor: pointer; color: #888; }
@media (max-width: 640px) {
  .mt-panel { right: 0; left: 0; top: auto; bottom: 0; width: 100%; max-height: 60vh; border-radius: 10px 10px 0 0; resize: none; }
}
