/* ==========================================================================
   Visor /mapas · ficha del punto pulsado (punto.js). Dos variantes:
   .vp--hoja    cuerpo de la hoja inferior del móvil (la hoja la mueve movil.js)
   .vp--bandeja bandeja del escritorio (la coloca escritorio.js; aquí va su interior)
   Usa las clases de sistema.css (cifra, cinta, conf, pest, seg, tabla--calor, graf,
   chip, proc, aviso, btn, enlace) tal cual; aquí solo lo propio.
   ========================================================================== */

.vp { min-width: 0; color: var(--ink); }
.vp button { font: inherit; color: inherit; cursor: pointer; }
.vp :focus-visible { outline: 2px solid var(--senal); outline-offset: 2px; }
.vp .vp--cargando { color: var(--muted); }

/* ---------- Variante hoja (móvil) ---------- */
.vp--hoja { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; }
.vp__cab { display: grid; grid-template-columns: auto minmax(0, 1fr) 44px 36px; align-items: center; gap: 0 12px; min-height: 54px; touch-action: none; cursor: grab; position: relative; z-index: 1; }
.vp--vacia .vp__cab { grid-template-columns: minmax(0, 1fr); }
.vp--vacia .vp__cifra, .vp--vacia .vp__flecha, .vp--vacia .vp__cinta, .vp--vacia .vp__dia, .vp--vacia .vp__mas, .vp--vacia .vp__quitar { display: none; }
.vp--hoja .vp__quitar { height: 44px; width: 36px; margin-right: -10px; justify-self: end; color: var(--muted); }
.vp__cifra { white-space: nowrap; line-height: 1; min-width: 52px; margin: 0; }
.vp__cifra:empty { display: none; }
.vp__quien { min-width: 0; }
.vp__n { display: flex; align-items: baseline; gap: 8px; min-width: 0; line-height: 1.2; }
.vp--hoja .vp__n h2 { flex: 0 1 auto; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--t-3); font-weight: 600; letter-spacing: -.005em; }
.vp--hoja .vp__n h2 small { font: 400 var(--t-1) var(--f-texto); color: var(--muted); letter-spacing: 0; }
.vp__mm { flex: none; margin-left: auto; font-size: var(--t-1); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vp__mm .max { font-weight: 600; }
.vp__frase { margin: 0; font-size: var(--t-1); line-height: 1.2; color: var(--ink-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.vp__frase strong { font-weight: 600; color: var(--ink); }
.vp__flecha { height: 44px; width: 44px; margin-right: -10px; justify-self: end; }
.vp__flecha svg { transition: transform .2s; transform: rotate(180deg); }               /* recogida y media: apunta arriba */
.vm[data-hoja="abierta"] .vp__flecha svg { transform: none; }                           /* abierta: apunta abajo */
.vp .cinta__tramos { height: 30px; }
.vp .cinta__tr { padding: 0 6px; gap: 4px; }
.vp .cinta__horas { line-height: 15px; }
.vp .cinta__tr.vp-sin { background: var(--sunk); }
/* de noche, las nubes y la lluvia también van en tono de noche */
.vp .cinta__tr--nubes-altas.vp-n { background: #3a4a6e; color: #e6ecf7; } .vp .cinta__tr--nuboso.vp-n { background: #4a566e; color: #eef1f6; } .vp .cinta__tr--cubierto.vp-n { background: #545d6c; color: #f1f3f6; }
.vp .cinta__tr--lluvia.vp-n { background: #2a79b0; color: #fff; } .vp .cinta__tr--lluvia-f.vp-n { background: #2c4fae; color: #fff; } .vp .cinta__tr--nieve.vp-n { background: #8a63a8; color: #fff; }
.vp .cinta__tr--niebla.vp-n { background: repeating-linear-gradient(0deg, #4a566e 0 3px, #5b6780 3px 6px); color: #eef1f6; }
.vp .cinta__tr--tormenta.vp-n { background: #3d1488; color: #fff; }
.vp__dia { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 18px; margin: 0; font-size: var(--t-1); line-height: 18px; color: var(--ink-2); white-space: nowrap; }
.vp__dia > span:first-child { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vp__mas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 6px; }
.vp__accesos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.vp__accesos .btn { min-width: 0; height: 44px; padding: 0 10px; font-size: var(--t-1); }
.vp__accesos .btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vp__accesos .btn--pri { grid-column: 1 / -1; font-size: var(--t-2); }
.vp__accesos [hidden] { display: none; }
.vp--hoja .vp__pest { margin-inline: calc(-1 * var(--margen, 16px)); padding-inline: 6px; }

/* ---------- Variante bandeja (escritorio) ---------- */
/* la bandeja dibuja su propio panel: el hueco de escritorio.js (.v-bandeja-hueco) solo la coloca, en flujo.
   Entornada mide --peek (lo fija visor.css cuando hay punto); abierta, hasta 392 px */
.vp--bandeja { position: relative; display: flex; flex-direction: column; min-height: 0; max-height: var(--peek, 122px); overflow: hidden; container-type: inline-size;
  background: var(--surface); border-radius: var(--r-3); box-shadow: var(--s-mapa); transition: max-height .22s ease; }
.vp--bandeja.es-abierta { max-height: min(392px, calc(100dvh - 240px)); }
.vp--bandeja:not(.es-abierta)::after { content: ""; position: absolute; inset: auto 0 0 0; height: 14px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.vp--bandeja.vp--vacia { display: none; }
.vp--bandeja:not(.es-abierta) .vp__cuerpo { overflow: hidden; }
/* recogida: cabecera y avisos; el panel no asoma a medias (la fila «Por horas / Por días» salía cortada) */
.vp--bandeja:not(.es-abierta) :is(.vp__panel, .vp__proc) { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .vp--bandeja { transition: none; } }
.vp__asa { all: unset; display: grid; place-items: center; height: 14px; flex: none; cursor: ns-resize; }
.vp__asa::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); }
.vp__asa:hover::before, .vp__asa:focus-visible::before { background: var(--ink); }
.vp__bcab { display: flex; align-items: center; gap: 4px 12px; padding: 0 6px 0 14px; flex: none; border-bottom: 1px solid var(--line); }
.vp__lugar { flex: 0 1 auto; min-width: 0; overflow: hidden; }
/* el nombre tiene sitio: provincia y altitud bajan a otra línea antes de cortar el nombre («Tol…») */
.vp--bandeja .vp__lugar { flex: 1 1 auto; min-width: min(220px, 34%); }
.vp--bandeja .vp__n { white-space: nowrap; flex-wrap: wrap; row-gap: 0; }
.vp--bandeja .vp__n h2 { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.vp--bandeja .vp__n .nota { flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vp__lect { margin: 0; font-size: var(--t-1); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.vp__lect strong { font-weight: 600; color: var(--ink); }
.vp__bcab .pest { border-bottom: 0; flex: none; margin-bottom: -1px; }
.vp__bcab .pest__it { height: 40px; }
.vp__fin { display: flex; align-items: center; gap: 6px; flex: none; white-space: nowrap; margin-left: auto; }
.vp__fin .enlace[hidden] { display: none; }
.vp__abre svg { transform: rotate(180deg); transition: transform .2s; }
.vp--bandeja.es-abierta .vp__abre svg { transform: none; }
.vp__cuerpo { padding: 8px 12px 10px; overflow: auto; scrollbar-width: thin; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 0; }
.vp--bandeja .vp__tabla { border: 0; border-radius: 0; }
.vp--bandeja .tabla--calor tbody th { padding: 0 10px; height: 30px; }
@container (max-width: 800px) { .vp__largo { display: none; } }
@container (max-width: 640px) {
  .vp--bandeja .vp__n .nota { display: none; }
  .vp__bcab { flex-wrap: wrap; }
  .vp__bcab .pest { order: 3; flex: 1 0 100%; margin-inline: -6px; }
}

/* ---------- Contenido común: avisos, pestañas, tabla, gráficos, procedencia ---------- */
.vp__avisos:empty { display: none; }
.vp__aviso .aviso__in { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; font-size: var(--t-1); line-height: 1.35; }
.vp__aviso .aviso__in > .ico { flex: none; margin-top: 1px; color: var(--ct, var(--ink)); }
.vp__aviso b { color: var(--ct, var(--ink)); }
.vp__aviso ul { margin: 4px 0 0; padding-left: 18px; }
.vp__aviso .av-det { color: var(--ink-2); }
.vp__sinav { display: flex; align-items: center; gap: 6px; margin: 0; }
.vp__barra { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.vp__seg .seg__op { height: 32px; }
.vp__panel { display: grid; gap: 8px; min-width: 0; }
.vp__panel .nota { margin: 0; }

.vp__tabla { position: relative; }
.vp .tabla--calor th[scope="row"] { padding: 4px 8px; font-weight: 500; color: var(--ink-2); min-width: 84px; }
.vp .tabla--calor td { height: 36px; min-width: 44px; cursor: pointer; }               /* columnas de 44 px: se tocan */
.vp .tabla--calor thead th { min-width: 44px; height: 30px; cursor: pointer; }
.vp .tabla--calor thead th:first-child { cursor: default; }
.vp .tabla--calor thead th.noche { background: var(--noche); }
.vp .tabla--calor th.sel { color: var(--senal-tinta); font-weight: 700; }
.vp .tabla--calor .vp__dias th { height: 24px; padding: 2px 0; text-align: left; font-weight: 600; color: var(--ink-2); background: var(--raised); cursor: default; }
.vp .tabla--calor .vp__dias th span { position: sticky; left: 92px; padding: 0 8px; }
.vp .tabla--calor .vp__dias th:first-child { z-index: 4; }
.vp .tabla--calor thead tr:nth-child(2) th { top: 24px; }
.vp__tdias thead th { line-height: 1.15; }
.vp__nada { font-style: normal; color: var(--faint); }
.vp__dir { display: inline-block; width: 8px; height: 10px; margin-left: 3px; vertical-align: -1px; opacity: .75;
  background: linear-gradient(currentColor, currentColor) center 3px / 1.5px 7px no-repeat, conic-gradient(from 150deg at 50% 100%, currentColor 0 60deg, transparent 60deg) center bottom / 8px 5px no-repeat; }
.vp__dir { transform: rotate(calc(var(--d) + 180deg)); }                                 /* la flecha apunta hacia donde va el viento */
.vp__clave { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: var(--t-1); color: var(--muted); }
.vp__clave span { display: inline-flex; align-items: center; gap: 6px; }
.vp__clave .vp__k-a { width: 2px; height: 12px; background: var(--senal); flex: none; }
.vp__clave .vp__k-n { width: 14px; height: 10px; background: var(--noche); border: 1px solid var(--line); flex: none; }
.vp__sol { color: var(--ink-2); align-items: center; gap: 6px; }

.vp__graf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 20px; }
@container (min-width: 720px) { .vp__graf { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.vp--hoja .vp__graf { grid-template-columns: minmax(0, 1fr); }
.vp__gt { font-size: var(--t-1); font-weight: 600; color: var(--ink-2); margin: 0 0 2px; }
.vp__gl { font-weight: 400; color: var(--muted); }
.vp__panel .g-barra { fill: #318be6; }
.vp__comp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vp__comp .chip { gap: 7px; }
.vp__comp .chip svg { flex: none; overflow: visible; }
.vp__panel .graf .sonda { font-size: var(--t-1); }
.vp__proc { margin: 0; }
.vp__proc a { color: inherit; }
.vp__proc:empty { display: none; }
