/* GovernoCerto — mapa territorial interativo (MapLibre + camadas de calor) */
.gt { position: relative; min-width: 0; }
.map-card .mapa-wrap.gt { padding: 0; background: #F3F0E8; overflow: hidden; }
.gt__palco { position: relative; width: 100%; aspect-ratio: 16 / 11; max-height: 620px; min-height: 340px; border-radius: inherit; overflow: hidden; background: #F3F0E8; }
.gt .gt__map, .gt-mini .gt-mini__map { position: absolute; inset: 0; }
.gt__map .maplibregl-canvas { outline: none; }

/* carregando / erro */
.gt__load { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 10px; color: rgba(10,27,61,.62); font: 500 .9rem/1.3 "Inter", system-ui, sans-serif; text-align: center; padding: 20px;
  background: linear-gradient(110deg, #F3F0E8 30%, #EAE5D8 50%, #F3F0E8 70%); background-size: 220% 100%; animation: gt-brilho 1.6s linear infinite; transition: opacity .6s ease, visibility .6s; }
.gt__load span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(11,47,107,.2); border-top-color: #0B2F6B; animation: gt-gira .8s linear infinite; }
.gt:not(.is-loading) .gt__load:not(.is-erro) { opacity: 0; visibility: hidden; }
.gt__load.is-erro { animation: none; background: #F3F0E8; }
.gt__load.is-erro span { display: none; }
@keyframes gt-gira { to { transform: rotate(360deg); } }
@keyframes gt-brilho { to { background-position: -120% 0; } }

/* controles */
.gt .maplibregl-ctrl-top-right { top: 6px; right: 6px; }
.gt .maplibregl-ctrl-group { border-radius: 10px; box-shadow: 0 4px 16px -6px rgba(4,18,44,.35); overflow: hidden; }
.gt .maplibregl-ctrl-group button { width: 34px; height: 34px; }
.gt__cidade { display: grid; place-items: center; color: #0B2F6B; }
.gt__cidade svg { width: 18px; height: 18px; }
.gt .maplibregl-cooperative-gesture-screen { font: 600 1rem/1.4 "Inter", system-ui, sans-serif; background: rgba(4,18,44,.55); }

/* atribuição */
.gt__attr, .gt-mini__attr { position: absolute; right: 6px; bottom: 5px; z-index: 2; font: 500 10px/1.3 "Inter", system-ui, sans-serif; color: rgba(10,27,61,.66); background: rgba(255,255,255,.8); padding: 2px 6px; border-radius: 6px; }
.gt__attr a { color: inherit; text-decoration: none; }
.gt__attr a:hover { text-decoration: underline; }

/* marcadores de campo pulsantes (sempre animados) */
.gt__pulso { position: relative; width: 10px; height: 10px; border-radius: 50%; background: #D4A017; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(4,18,44,.35); pointer-events: none; }
.gt__pulso::before, .gt__pulso::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; background: rgba(212,160,23,.55); animation: gt-pulso 2.6s cubic-bezier(.16,1,.3,1) infinite; animation-delay: var(--pd, 0s); }
.gt__pulso::after { animation-delay: calc(var(--pd, 0s) + 1.3s); }
@keyframes gt-pulso { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(4.2); opacity: 0; } }

/* cartão do bairro: flutuante no desktop, rodapé do mapa no celular */
.gt__card { display: grid; gap: 4px; padding: 12px 14px; background: #fff; color: #0A1B3D; font: .84rem/1.35 "Inter", system-ui, sans-serif; min-height: 54px; border-top: 1px solid rgba(10,27,61,.08); }
.gt__card strong { font-family: "Manrope", system-ui, sans-serif; font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 2px; }
.gt__card-dica { margin: 0; color: rgba(10,27,61,.6); align-self: center; }
.gt__card-k { display: flex; align-items: center; gap: 8px; color: rgba(10,27,61,.72); }
.gt__card-k b { margin-left: auto; color: #0A1B3D; font-variant-numeric: tabular-nums; }
.gt__card-k i { width: 22px; height: 6px; border-radius: 9px; flex: none; }
.gt__card-k[data-k="cobertura"] i { background: linear-gradient(90deg, #1F5FD1, #2BC48A, #E8D53A, #D7301F); }
.gt__card-k[data-k="atendimentos"] i { background: linear-gradient(90deg, #2E4FC4, #A94FCB, #E0509E, #8E1247); }
.gt__card-k[data-k="demandas"] i { background: linear-gradient(90deg, #3DB892, #B9C93A, #E5B82A, #9A4A12); }
.gt[data-camada="cobertura"] .gt__card-k[data-k="cobertura"], .gt[data-camada="atendimentos"] .gt__card-k[data-k="atendimentos"],
.gt[data-camada="demandas"] .gt__card-k[data-k="demandas"], .gt:not([data-camada]) .gt__card-k[data-k="cobertura"] { font-weight: 650; color: #0A1B3D; }
@media (min-width: 700px) {
  .gt__card { position: absolute; z-index: 2; top: 14px; left: 14px; width: 224px; border: 0; border-radius: 12px; box-shadow: 0 12px 32px -14px rgba(4,18,44,.5);
    opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s; pointer-events: none; }
  .gt__card.is-on { opacity: 1; transform: none; }
}
@media (max-width: 699px) { .gt__palco { aspect-ratio: 4 / 5; max-height: 520px; } }

/* legenda em gradiente */
.mt-leg__bar { display: block; height: 10px; border-radius: 99px; background: linear-gradient(90deg, #1B2A7A, #1F5FD1, #22A7D8, #2BC48A, #E8D53A, #F08A24, #D7301F); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.mt-leg__ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: .74rem; color: rgba(255,255,255,.65); }
.mt-leg__total { margin: 0; font-size: .86rem; color: rgba(255,255,255,.78); }
.mt-leg__total b { color: #fff; font-family: "Manrope", system-ui, sans-serif; font-size: 1.05rem; }

/* miniatura do hero */
.gt-mini { position: relative; width: 100%; aspect-ratio: 9 / 10; border-radius: .6em; overflow: hidden; background: #F3F0E8; }
.gt-mini__map { opacity: 0; transition: opacity .8s ease; }
.gt-mini.is-in .gt-mini__map { opacity: 1; }
.gt-mini.is-fallback img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gt-mini .maplibregl-canvas { outline: none; }
