/* ==========================================================
   FoneCity v1.6.23 — GUIA BRASIL SMOOTH DISCOVERY SAFE
   Mapa limpo -> hover explica -> clique revela cidades.
   ========================================================== */

/* Mata definitivamente os hotspots/siglas da ET anterior. */
.fcp-guide-brazil-map > .fcp-guide-map-state,
.fcp-guide-map-state{
  display:none !important;
}

/* Ferramentas: menos ruído. */
.fcp-guide-tools{
  grid-template-columns:minmax(0,1fr) auto !important;
  max-width:760px;
}
.fcp-guide-tools button{
  min-width:132px;
}

/* O mapa ocupa a cena sozinho até o clique. */
.fcp-guide-map-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) !important;
  gap:14px;
  transition:grid-template-columns .42s cubic-bezier(.2,.8,.2,1);
}

.fcp-guide-map-layout.has-state{
  grid-template-columns:minmax(0,1.18fr) minmax(310px,.82fr) !important;
}

.fcp-guide-brazil-map{
  position:relative;
  min-height:610px !important;
  display:grid;
  place-items:center;
  overflow:hidden;
}

.fcp-guide-brazil-map__shape{
  position:relative !important;
  inset:auto !important;
  width:min(92%,680px);
  height:560px;
  display:grid;
  place-items:center;
}

.fcp-guide-svg-map{
  width:100%;
  height:100%;
  display:block;
  overflow:visible;
}

/* Linhas reais de cada UF. */
.fcp-guide-svg-state{
  cursor:default;
  outline:none;
}

.fcp-guide-svg-state path:not(.circle){
  fill:var(--fcm-state-fill);
  stroke:var(--fcm-state-line) !important;
  stroke-width:1.15 !important;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
  transition:
    fill .28s cubic-bezier(.2,.8,.2,1),
    stroke .28s cubic-bezier(.2,.8,.2,1),
    opacity .28s ease,
    filter .28s ease,
    transform .28s cubic-bezier(.2,.8,.2,1);
  transform-origin:center;
}

/* Círculos do SVG original ficam invisíveis, mas ampliam hit-area de UFs pequenas. */
.fcp-guide-svg-state .circle{
  fill:transparent !important;
  stroke:transparent !important;
  opacity:0 !important;
  pointer-events:all;
}

.fcp-guide-svg-state.is-active{
  cursor:pointer;
}

.fcp-guide-svg-state.is-active path:not(.circle){
  fill:var(--fcm-state-active);
}

.fcp-guide-svg-state.is-active:hover path:not(.circle),
.fcp-guide-svg-state.is-active:focus-visible path:not(.circle),
.fcp-guide-svg-state.is-hovered path:not(.circle){
  fill:var(--fcm-state-hover);
  stroke:var(--fcm-state-line-hover) !important;
  filter:drop-shadow(0 7px 12px var(--fcm-state-glow));
}

.fcp-guide-svg-state.is-selected path:not(.circle){
  fill:var(--fcm-state-selected);
  stroke:var(--fcm-state-selected-line) !important;
  filter:drop-shadow(0 9px 16px var(--fcm-state-selected-glow));
}

.fcp-guide-svg-state.is-region-dim{
  opacity:.20;
}

.fcp-guide-svg-state.is-inactive{
  opacity:.80;
}

/* Tooltip elegante — esta é a única “etiqueta” do estado. */
.fcp-guide-map-tooltip{
  position:absolute;
  z-index:12;
  left:0;
  top:0;
  min-width:168px;
  max-width:230px;
  pointer-events:none;
  padding:10px 12px;
  border-radius:13px;
  opacity:0;
  transform:translate3d(var(--tip-x,0),var(--tip-y,0),0) translateY(6px) scale(.98);
  transition:opacity .16s ease,transform .18s cubic-bezier(.2,.8,.2,1);
  backdrop-filter:blur(14px);
}

.fcp-guide-map-tooltip.is-visible{
  opacity:1;
  transform:translate3d(var(--tip-x,0),var(--tip-y,0),0) translateY(0) scale(1);
}

.fcp-guide-map-tooltip strong{
  display:block;
  font-size:.77rem;
  line-height:1.15;
}

.fcp-guide-map-tooltip span{
  display:block;
  margin-top:4px;
  font-size:.63rem;
  line-height:1.4;
}

/* Dica discreta, sem legenda cheia de informação. */
.fcp-guide-map-hint{
  position:absolute;
  left:18px;
  bottom:16px;
  z-index:5;
  display:grid;
  gap:2px;
  pointer-events:none;
}

.fcp-guide-map-hint span{
  font-size:8px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.fcp-guide-map-hint strong{
  font-size:9px;
  font-weight:700;
}

/* Loader se servidor ainda não tiver cache do SVG. */
.fcp-guide-map-loader{
  display:grid;
  place-items:center;
  gap:10px;
  text-align:center;
  min-height:360px;
}

.fcp-guide-map-loader span{
  width:32px;
  height:32px;
  border:3px solid;
  border-right-color:transparent !important;
  border-radius:999px;
  animation:fcm-spin .8s linear infinite;
}

.fcp-guide-map-loader strong{
  font-size:10px;
}

/* Cidades só entram depois do clique. */
.fcp-guide-active-cities[hidden],
.fcp-guide-grid[hidden]{
  display:none !important;
}

.fcp-guide-active-cities{
  min-height:0 !important;
  opacity:0;
  transform:translateX(14px);
  animation:fcm-panel-in .34s cubic-bezier(.2,.8,.2,1) forwards;
}

.fcp-guide-state-cities a{
  opacity:0;
  transform:translateY(8px);
  animation:fcm-city-in .32s cubic-bezier(.2,.8,.2,1) forwards;
}
.fcp-guide-state-cities a:nth-child(2){animation-delay:40ms}
.fcp-guide-state-cities a:nth-child(3){animation-delay:80ms}
.fcp-guide-state-cities a:nth-child(4){animation-delay:120ms}
.fcp-guide-state-cities a:nth-child(5){animation-delay:160ms}
.fcp-guide-state-cities a:nth-child(n+6){animation-delay:190ms}

.fcp-guide-grid.is-revealed{
  display:grid !important;
  animation:fcm-grid-in .38s ease both;
}

/* Remove legenda antiga da ET anterior. */
.fcp-guide-map-legend{
  display:none !important;
}

/* LIGHT */
html[data-theme="light"] .fcp-guide-brazil-map{
  --fcm-state-fill:#e8edf2;
  --fcm-state-line:rgba(72,91,114,.36);
  --fcm-state-active:#dce9f7;
  --fcm-state-hover:#5c92d3;
  --fcm-state-line-hover:#2769b8;
  --fcm-state-glow:rgba(43,104,183,.22);
  --fcm-state-selected:#286ec3;
  --fcm-state-selected-line:#174f91;
  --fcm-state-selected-glow:rgba(43,104,183,.28);
}

html[data-theme="light"] .fcp-guide-map-tooltip{
  border:1px solid rgba(29,48,78,.10);
  background:rgba(255,253,249,.93);
  color:#10203b;
  box-shadow:0 13px 28px rgba(54,65,85,.14);
}
html[data-theme="light"] .fcp-guide-map-tooltip span{color:#66758a}
html[data-theme="light"] .fcp-guide-map-hint span{color:#9a6509}
html[data-theme="light"] .fcp-guide-map-hint strong{color:#657489}
html[data-theme="light"] .fcp-guide-map-loader span{border-color:#c98a12}
html[data-theme="light"] .fcp-guide-map-loader strong{color:#66758a}

/* DARK */
html[data-theme="dark"] .fcp-guide-brazil-map{
  --fcm-state-fill:#16273d;
  --fcm-state-line:rgba(105,132,161,.34);
  --fcm-state-active:#1c3e65;
  --fcm-state-hover:#327ccc;
  --fcm-state-line-hover:#75b3f5;
  --fcm-state-glow:rgba(53,135,220,.28);
  --fcm-state-selected:#d7971b;
  --fcm-state-selected-line:#ffd26a;
  --fcm-state-selected-glow:rgba(217,151,27,.24);
}

html[data-theme="dark"] .fcp-guide-map-tooltip{
  border:1px solid rgba(148,163,184,.14);
  background:rgba(12,24,41,.92);
  color:#f8fbff;
  box-shadow:0 15px 32px rgba(0,0,0,.22);
}
html[data-theme="dark"] .fcp-guide-map-tooltip span{color:#b5c4d5}
html[data-theme="dark"] .fcp-guide-map-hint span{color:#ffd16d}
html[data-theme="dark"] .fcp-guide-map-hint strong{color:#9eafc2}
html[data-theme="dark"] .fcp-guide-map-loader span{border-color:#d99a1b}
html[data-theme="dark"] .fcp-guide-map-loader strong{color:#b5c4d5}

/* Mobile: hover vira toque/foco, sem poluição. */
@media(max-width:900px){
  .fcp-guide-map-layout.has-state{
    grid-template-columns:1fr !important;
  }
  .fcp-guide-brazil-map{
    min-height:540px !important;
  }
  .fcp-guide-brazil-map__shape{
    height:500px;
    width:min(96%,620px);
  }
}

@media(max-width:680px){
  .fcp-guide-tools{
    grid-template-columns:1fr !important;
  }
  .fcp-guide-tools button{
    width:100%;
  }
  .fcp-guide-brazil-map{
    min-height:440px !important;
  }
  .fcp-guide-brazil-map__shape{
    width:100%;
    height:400px;
  }
  .fcp-guide-map-hint{
    left:12px;
    bottom:10px;
  }
  .fcp-guide-map-tooltip{
    min-width:145px;
  }
}

@media(max-width:420px){
  .fcp-guide-brazil-map{
    min-height:390px !important;
  }
  .fcp-guide-brazil-map__shape{
    height:350px;
  }
}

@media(prefers-reduced-motion:reduce){
  .fcp-guide-svg-state path,
  .fcp-guide-map-tooltip,
  .fcp-guide-active-cities,
  .fcp-guide-state-cities a,
  .fcp-guide-grid{
    animation:none !important;
    transition:none !important;
  }
}

@keyframes fcm-spin{to{transform:rotate(360deg)}}
@keyframes fcm-panel-in{to{opacity:1;transform:none}}
@keyframes fcm-city-in{to{opacity:1;transform:none}}
@keyframes fcm-grid-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}


/* v1.6.24 — tooltip delicado com destaque matriz */
.fcp-guide-map-tooltip small{
  display:block;
  margin-top:6px;
  font-size:.56rem;
  line-height:1.35;
  letter-spacing:.01em;
  opacity:.86;
}
html[data-theme="light"] .fcp-guide-map-tooltip small{ color:#8d6b27; }
html[data-theme="dark"] .fcp-guide-map-tooltip small{ color:#f3cf85; }
