/* Macro Map · MODE · BRASIL DESK · fase 3 (PIB/pop/densidade SIDRA · zoom user) */

#ih-panel-macro-map[data-mm-mode="brasil_desk"] {
  --brdesk-terra: #E8B44A;
  --brdesk-bg: #07090c;
  --brdesk-panel: rgba(8, 10, 14, 0.96);
  --brdesk-line: rgba(232, 180, 74, 0.32);
  --brdesk-muted: #7a8494;
  --brdesk-text: #d4dce6;
  --brdesk-rail-w: 0px;
  --brdesk-dock-h: 168px;
  --brdesk-foot-h: 54px;
  --brdesk-film-h: 62px;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-map-stage {
  background: #05070a !important;
  border: 1px solid rgba(40, 48, 58, 0.95) !important;
  outline: none;
  overflow: hidden;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] #cal-map-host,
body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar #ih-panel-macro-map[data-mm-mode="brasil_desk"] #cal-map-host,
#view-caleco.ih-show-calendar #ih-panel-macro-map[data-mm-mode="brasil_desk"] #cal-map-host {
  /* inset shorthand depois do bottom zera a altura do host → canvas MapLibre preto */
  background: #0a121c !important;
  inset: auto !important;
  top: var(--brdesk-film-h) !important;
  left: 0 !important;
  right: 0 !important;
  bottom: calc(var(--brdesk-dock-h) + var(--brdesk-foot-h)) !important;
  height: auto !important;
  width: auto !important;
  max-height: none !important;
  min-height: 160px !important;
  z-index: 1 !important;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] #cal-map-host,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-maplibre,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] #cal-map-ml {
  background: #0a121c !important;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] #cal-map-host .ih-mm-maplibre,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] #cal-map-ml {
  bottom: 0 !important;
  height: 100% !important;
  left: 0 !important;
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  width: 100% !important;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] .maplibregl-canvas,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] canvas.maplibregl-canvas {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] .maplibregl-ctrl-attrib,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] .maplibregl-ctrl-bottom-left,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] .maplibregl-ctrl-bottom-right {
  display: none !important;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-kpi,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-sessions,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] #ih-mm-disaster-foot,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-module-bar,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] #ih-mm-data-source,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] #ih-mm-eq-legend,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-layer-menu {
  display: none !important;
  height: 0 !important;
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] #ih-mm-bmap {
  display: flex !important;
  height: auto !important;
  max-height: none !important;
  opacity: 1 !important;
  overflow: visible !important;
  pointer-events: none !important;
  visibility: visible !important;
  z-index: 130 !important;
}
#ih-panel-macro-map[data-mm-mode="brasil_desk"] #ih-mm-bmap .ih-mm-bmap__chrome,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] #ih-mm-bmap.is-open .ih-mm-bmap__list,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] #ih-mm-bmap.is-open .ih-mm-bmap__q {
  pointer-events: auto;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] #ih-mm-bmap-fab,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-bmap__fab {
  display: none !important;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-film {
  background: #07090c !important;
  border-bottom: 1px solid rgba(232, 180, 74, 0.28) !important;
  left: 0;
  padding: 0 !important;
  right: 0;
  z-index: 14;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-film__gct-word {
  color: var(--brdesk-terra);
  font: 800 24px/1 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.06em;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-film__gct-product {
  color: #ebe5d8;
  font: 600 16px/1.25 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-film__mode-center {
  color: var(--brdesk-terra) !important;
  font: 700 20px/1.2 "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
  letter-spacing: 0.16em !important;
}

#ih-panel-macro-map .ih-mm-brdesk-dock {
  align-items: stretch;
  background: var(--brdesk-panel, rgba(8, 10, 14, 0.96));
  border-top: 1px solid var(--brdesk-line, rgba(232, 180, 74, 0.32));
  bottom: var(--brdesk-foot-h, 46px);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 18px;
  height: var(--brdesk-dock-h, 168px);
  left: 0;
  overflow: hidden;
  padding: 10px 16px 8px;
  pointer-events: auto;
  position: absolute;
  right: 0;
  z-index: 12;
}

#ih-panel-macro-map .ih-mm-brdesk-rail {
  align-items: flex-start;
  background: transparent;
  border: 0;
  bottom: auto;
  display: flex;
  flex: 1 1 auto;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px 22px;
  left: auto;
  min-width: 0;
  overflow: auto;
  padding: 0;
  pointer-events: auto;
  position: relative;
  top: auto;
  width: auto;
  z-index: 1;
}

#ih-panel-macro-map .ih-mm-brdesk-rail > section {
  flex: 0 1 auto;
  min-width: 0;
}

#ih-panel-macro-map .ih-mm-brdesk-rail[hidden],
#ih-panel-macro-map .ih-mm-brdesk-dock[hidden],
#ih-panel-macro-map .ih-mm-brdesk-foot[hidden] {
  display: none !important;
}

#ih-panel-macro-map .ih-mm-brdesk-rail__hd {
  color: var(--brdesk-muted, #7a8494);
  font: 700 16px/1.2 "Segoe UI", sans-serif;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

#ih-panel-macro-map .ih-mm-brdesk-rail__empty,
#ih-panel-macro-map .ih-mm-brdesk-rail__stat {
  color: var(--brdesk-muted, #7a8494);
  font: 400 18px/1.4 "Segoe UI", sans-serif;
}

#ih-panel-macro-map .ih-mm-brdesk-rail__stat {
  color: #d4dce6;
}

#ih-panel-macro-map .ih-mm-brdesk-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#ih-panel-macro-map .ih-mm-brdesk-chip {
  background: rgba(18, 22, 28, 0.9);
  border: 1px solid rgba(74, 143, 160, 0.4);
  color: #c8d0da;
  cursor: pointer;
  font: 700 16px/1 "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
  padding: 10px 13px;
}

#ih-panel-macro-map .ih-mm-brdesk-chip.is-on {
  background: rgba(232, 180, 74, 0.18);
  border-color: #E8B44A;
  color: #ebe5d8;
}

#ih-panel-macro-map .ih-mm-brdesk-legend {
  align-items: center;
  color: #c8d0da;
  display: flex;
  font: 700 20px/1.2 "Segoe UI", sans-serif;
  gap: 10px;
  letter-spacing: 0.02em;
  margin-top: 6px;
}

#ih-panel-macro-map .ih-mm-brdesk-legend[hidden] {
  display: none !important;
}

#ih-panel-macro-map .ih-mm-brdesk-legend__bar {
  background: linear-gradient(90deg, #2a6a78, #4A8FA0, #74DEC6, #E8B44A);
  flex: 1;
  height: 8px;
  min-width: 88px;
  width: 110px;
}

#ih-panel-macro-map .ih-mm-brdesk-legend.is-growth .ih-mm-brdesk-legend__bar {
  background: linear-gradient(90deg, #EC7667, #a86a62, #4A8FA0, #74DEC6);
}

#ih-panel-macro-map .ih-mm-brdesk-dock__meta {
  align-items: flex-start;
  border-left: 1px solid rgba(232, 180, 74, 0.22);
  display: flex;
  flex: 0 0 auto;
  gap: 22px;
  margin-left: auto;
  padding-left: 18px;
}

#ih-panel-macro-map .ih-mm-brdesk-live {
  min-width: 0;
}

#ih-panel-macro-map .ih-mm-brdesk-live__row {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  margin-top: 4px;
}

#ih-panel-macro-map .ih-mm-brdesk-live__kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#ih-panel-macro-map .ih-mm-brdesk-live__kpi span {
  color: var(--brdesk-muted, #7a8494);
  font: 700 13px/1.2 "Segoe UI", sans-serif;
  letter-spacing: 0.1em;
}

#ih-panel-macro-map .ih-mm-brdesk-live__kpi strong {
  color: #E8B44A;
  font: 700 18px/1.2 "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
}
#ih-mm-br-desk-usdbrl {
  cursor: pointer;
}

#ih-panel-macro-map .ih-mm-brdesk-dock__hd {
  color: var(--brdesk-muted, #7a8494);
  font: 700 16px/1.2 "Segoe UI", sans-serif;
  letter-spacing: 0.12em;
}

#ih-panel-macro-map .ih-mm-brdesk-dock__name {
  color: var(--brdesk-text, #d4dce6);
  font: 600 18px/1.3 "Segoe UI", sans-serif;
  margin-top: 4px;
}

#ih-panel-macro-map .ih-mm-brdesk-dock__asof,
#ih-panel-macro-map .ih-mm-brdesk-clock {
  color: #E8B44A;
  font: 700 20px/1.2 "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  margin-top: 6px;
}

#ih-panel-macro-map .ih-mm-brdesk-clock-lab {
  color: var(--brdesk-muted, #7a8494);
  font: 700 16px/1.2 "Segoe UI", sans-serif;
  letter-spacing: 0.12em;
}

#ih-panel-macro-map .ih-mm-brdesk-foot {
  align-items: center;
  background: #07090c;
  border-top: 1px solid rgba(232, 180, 74, 0.22);
  bottom: 0;
  color: var(--brdesk-muted, #7a8494);
  display: flex;
  font: 600 16px/1 "Segoe UI", sans-serif;
  gap: 16px;
  height: var(--brdesk-foot-h, 54px);
  justify-content: flex-start;
  left: 0;
  letter-spacing: 0.08em;
  padding: 0 16px;
  pointer-events: auto;
  position: absolute;
  right: 0;
  z-index: 12;
}

#ih-panel-macro-map .ih-mm-brdesk-foot button {
  background: transparent;
  border: 0;
  color: #E8B44A;
  cursor: pointer;
  font: 700 16px/1 "Segoe UI", sans-serif;
  letter-spacing: 0.12em;
  margin-left: auto;
  text-transform: uppercase;
}

#ih-panel-macro-map .ih-mm-brdesk-search-wrap {
  min-width: 280px;
  position: relative;
  z-index: 20;
}

#ih-panel-macro-map .ih-mm-brdesk-search {
  background: rgba(18, 22, 28, 0.95);
  border: 1px solid rgba(232, 180, 74, 0.35);
  color: #ebe5d8;
  font: 600 18px/1.3 "Segoe UI", sans-serif;
  max-width: 320px;
  padding: 10px 12px;
  width: 100%;
}

#ih-panel-macro-map .ih-mm-brdesk-search::placeholder {
  color: #7a8494;
}

#ih-panel-macro-map .ih-mm-brdesk-suggest {
  background: #0c1016;
  border: 1px solid rgba(232, 180, 74, 0.42);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.55);
  max-height: calc(11 * 44px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 0;
  z-index: 80;
}

#ih-panel-macro-map .ih-mm-brdesk-suggest[hidden] {
  display: none !important;
}

#ih-panel-macro-map .ih-mm-brdesk-suggest button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #ebe5d8;
  cursor: pointer;
  display: flex;
  font: 600 20px/1.2 "Segoe UI", sans-serif;
  height: 44px;
  letter-spacing: 0.02em;
  min-height: 44px;
  padding: 0 16px;
  text-align: left;
  width: 100%;
}

#ih-panel-macro-map .ih-mm-brdesk-suggest button:hover,
#ih-panel-macro-map .ih-mm-brdesk-suggest button.is-on {
  background: rgba(232, 180, 74, 0.16);
  color: #E8B44A;
}

.ih-mm-brdesk-tip {
  color: #ebe5d8;
  display: flex;
  flex-direction: column;
  font: 400 20px/1.4 "Segoe UI", sans-serif;
  gap: 10px;
  max-width: 100%;
  width: 100%;
}
.ih-mm-brdesk-tip--dos {
  gap: 8px;
}
.ih-mm-brdesk-tip b {
  color: #E8B44A;
  display: block;
  font: 700 26px/1.25 "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
}
.ih-mm-brdesk-tip div {
  color: #c8d0da;
  font: 400 19px/1.4 "Segoe UI", sans-serif;
  word-break: break-word;
}
.ih-mm-brdesk-tip__row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.ih-mm-brdesk-tip__row span {
  color: #7a8494;
  flex: 0 0 auto;
  font: 700 16px/1.35 "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
}
.ih-mm-brdesk-tip__row strong {
  color: #ebe5d8;
  font: 600 19px/1.35 "Segoe UI", sans-serif;
  text-align: right;
}
.ih-mm-brdesk-tip__src {
  color: #7a8494 !important;
  font: 400 15px/1.4 "Segoe UI", sans-serif !important;
  margin-top: 6px;
}

.ih-mm-eq-popup--brdesk.maplibregl-popup,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-eq-popup--brdesk.maplibregl-popup {
  max-width: 360px !important;
  min-width: 0 !important;
  width: 360px !important;
}

.ih-mm-eq-popup--brdesk .maplibregl-popup-content,
#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-eq-popup--brdesk .maplibregl-popup-content {
  background: rgba(8, 10, 14, 0.97) !important;
  border: 1px solid rgba(232, 180, 74, 0.42) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55) !important;
  box-sizing: border-box !important;
  font: 400 20px/1.4 "Segoe UI", sans-serif !important;
  max-width: 360px !important;
  min-width: 0 !important;
  padding: 20px 20px 22px !important;
  width: 360px !important;
}

#ih-panel-macro-map[data-mm-mode="brasil_desk"] .ih-mm-eq-popup--brdesk .maplibregl-popup-tip {
  border-top-color: rgba(8, 10, 14, 0.97);
}

/* Region foot visível em todos os filmes · DATA SOURCE / docks sobem 60px */
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-brdesk-foot,
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-power-foot,
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-storm-foot,
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-cargo-foot,
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-ind-foot,
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-volc-foot {
  bottom: var(--mm-region-foot-h, 60px) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-brdesk-dock {
  bottom: calc(var(--brdesk-foot-h, 54px) + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-power-dock {
  bottom: calc(var(--power-foot-h, 40px) + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-storm-dock {
  bottom: calc(var(--storm-foot-h, 38px) + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-ind-dock {
  bottom: calc(34px + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-banks-dock,
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-banks-rail,
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-corridor-dock {
  bottom: var(--mm-region-foot-h, 60px) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-power-rail {
  bottom: calc(var(--power-dock-h, 92px) + var(--power-foot-h, 40px) + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-storm-rail {
  bottom: calc(var(--storm-dock-h, 280px) + var(--storm-foot-h, 38px) + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden])) .ih-mm-volc-compass {
  bottom: calc(52px + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden]))[data-mm-mode="brasil_desk"] #cal-map-host {
  bottom: calc(var(--brdesk-dock-h) + var(--brdesk-foot-h) + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden]))[data-mm-mode="power"] #cal-map-host {
  bottom: calc(var(--power-dock-h) + var(--power-foot-h) + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden]))[data-mm-mode="storms"] #cal-map-host {
  bottom: calc(var(--storm-dock-h) + var(--storm-foot-h) + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden]))[data-mm-mode="osm_assets"] #cal-map-host {
  bottom: calc(168px + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden]))[data-mm-mode="cargo_ships"] #cal-map-host {
  bottom: calc(96px + var(--mm-region-foot-h, 60px)) !important;
}
#ih-panel-macro-map:has(#ih-mm-region-foot:not([hidden]))[data-mm-mode="volcanoes"] #cal-map-host {
  bottom: calc(36px + var(--mm-region-foot-h, 60px)) !important;
}
