/* Mapa de cobertura interactivo — Telecom Cordillera
   Estados primero; al seleccionar uno se muestran sus municipios. */

.tcx-stage {
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

@media (min-width: 1000px) {
  .tcx-stage {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
    align-items: start;
  }
}

/* --- mapa --- */

.tcx-map {
  position: relative;
  width: 100%;
  aspect-ratio: 1184 / 864;
  background: #fff;
  border: 1px solid #dfeea8;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 22px 45px -30px rgba(22,40,19, 0.45);
}

.tcx-map svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tcx-map .st {
  transition: fill 0.25s ease, fill-opacity 0.25s ease;
}

/* estados con cobertura: interactivos */
.tcx-map .st.cov {
  cursor: pointer;
}

.tcx-map .st.cov:hover,
.tcx-map .st.cov:focus-visible {
  fill: #d3f369;
  outline: none;
}

.tcx-map .st.cov.is-active {
  fill: #162813;
}

/* cuando hay un estado activo, los demas se atenuan */
.tcx-map.has-active .st:not(.is-active) {
  fill-opacity: 0.45;
}

.tcx-map.has-active .st.cov:not(.is-active):hover {
  fill-opacity: 0.8;
}

/* --- pines de municipios --- */

.tcx-pin {
  /* el ancla es un punto sin dimensiones: asi el circulo queda exactamente
     sobre la coordenada y la etiqueta se dibuja a un lado sin moverlo */
  position: absolute;
  --tcx-dy: 0px;
  width: 0;
  height: 0;
  pointer-events: none;
  animation: tcx-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.tcx-pin i {
  position: absolute;
  left: -5.5px;
  top: calc(-5.5px + var(--tcx-dy));
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #162813;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(22,40,19, 0.45);
}

.tcx-pin b {
  position: absolute;
  left: 11px;
  top: calc(-9px + var(--tcx-dy));
  font-size: 11px;
  font-weight: 600;
  color: #162813;
  background: rgba(255, 255, 255, 0.92);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(22,40,19, 0.18);
}

.tcx-pin--left b {
  left: auto;
  right: 11px;
}

@keyframes tcx-pop {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.tcx-badge {
  position: absolute;
  left: 18px;
  bottom: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dfeea8;
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 11px;
  line-height: 1.5;
  color: #666;
  pointer-events: none;
}

.tcx-badge b {
  display: block;
  color: #162813;
  font-size: 12px;
}

/* --- panel lateral --- */

.tcx-panel {
  background: #fff;
  border: 1px solid #dfeea8;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 22px 45px -34px rgba(22,40,19, 0.4);
}

.tcx-panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.tcx-back {
  appearance: none;
  border: 1px solid #dfeea8;
  background: #fff;
  color: #162813;
  cursor: pointer;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  font-size: 15px;
  line-height: 1;
  flex: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tcx-back:hover {
  background: #dfeea8;
  border-color: #162813;
}

.tcx-panel h3 {
  font-size: 15px;
  font-weight: 700;
  color: #162813;
  margin: 0;
}

.tcx-panel__sub {
  font-size: 12px;
  color: #999;
  margin: 0 0 16px;
}

.tcx-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

.tcx-list button {
  width: 100%;
  appearance: none;
  cursor: pointer;
  text-align: left;
  background: #fff;
  border: 1px solid #dfeea8;
  border-radius: 11px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tcx-list button:hover,
.tcx-list button:focus-visible {
  border-color: #162813;
  box-shadow: 0 3px 10px -4px rgba(22,40,19, 0.35);
  outline: none;
}

.tcx-list button.is-active {
  border-color: #162813;
  background: #dfeea8;
}

.tcx-list .tcx-name {
  font-size: 14px;
  font-weight: 600;
  color: #162813;
}

.tcx-list .tcx-meta {
  font-size: 11px;
  color: #999;
}

.tcx-list li.tcx-item-static {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dfeea8;
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #162813;
}

.tcx-list li.tcx-item-static::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d3f369;
  flex: none;
}

.tcx-count {
  margin: 14px 0 0;
  font-size: 12px;
  color: #666;
}

.tcx-count b {
  color: #162813;
}
