/* SPDX-License-Identifier: GPL-3.0-or-later · Trenalia */
/* Capa de infraestructura: selector en el panel de capas y leyenda compacta sobre el mapa */
.lp-infra { padding: 2px 0 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.lp-select { display: block; width: calc(100% - 20px); margin: 2px 10px 4px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.lp-select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.lp-infra-note { margin: 2px 10px 4px; font-size: 11.5px; color: var(--amber); line-height: 1.35; }
.lp-infra-note[hidden] { display: none; }
.lp-infra-note code, .inf-note code { font-family: var(--mono); font-size: 11px; background: var(--panel-2); padding: 1px 4px; border-radius: 4px; }

.inf-chip { position: absolute; z-index: 800; left: 12px; bottom: 96px; max-width: min(420px, calc(100% - 24px));
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; box-shadow: 0 8px 24px var(--shadow); font-size: 12.5px; }
/* Si también está la leyenda de tramos (análisis), esta sube para no taparla */
#map:has(.an-chip) .inf-chip { bottom: 148px; }
.inf-top { display: flex; align-items: center; gap: 6px; }
.inf-top b { flex: 1; font-size: 12.5px; }
.inf-top button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 14px; line-height: 1; cursor: pointer; flex: none; padding: 0; }
.inf-top button[aria-expanded="true"] { border-color: var(--blue); color: var(--blue); }
.inf-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.inf-leg span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.inf-leg i { width: 18px; height: 4px; border-radius: 2px; display: inline-block; flex: none; }
.inf-leg i.dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.inf-pop { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); max-height: 40vh; overflow-y: auto; }
.inf-pop[hidden] { display: none; }
.inf-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.inf-t td { padding: 3px 0; border-bottom: 1px solid var(--line); }
.inf-t td:last-child { text-align: right; font-family: var(--mono); white-space: nowrap; padding-left: 12px; }
.inf-sum { margin: 8px 0 4px; line-height: 1.4; }
.inf-note { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
@media (max-width: 760px) {
  .inf-chip { left: 8px; right: 72px; max-width: none; bottom: calc(var(--sheet-visible, 140px) + 12px); }   /* sitio para el botón de Trenalito */
  #map:has(.an-chip) .inf-chip { bottom: calc(var(--sheet-visible, 140px) + 64px); }
  body.sheet-open .inf-chip { display: none; }
}

.inf-unit { margin: 0 0 4px; font-size: 11.5px; color: var(--muted, #667); }
