/* ==========================================================================
   diseno-estacion.css · ficha de estación (templates/diseno/estacion.php) y listado
   de estaciones (templates/diseno/estaciones.php) en el diseño nuevo.
   Se apoya en sistema.css y diseno-lugar.css.
   ========================================================================== */

/* ---------- Cabecera ---------- */
.est-insignias { margin-top: calc(-1 * var(--e-4)); }
.est-aficionado { color: var(--ink-2); }
.est-error, .est-sinavisos { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.est-avisos .aviso__in { display: grid; gap: 2px; }

/* ---------- Ahora ---------- */
.est-ahora { display: grid; gap: var(--e-4); }
.est-ahora__cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px var(--e-4); }
.est-ahora__cab .rot { margin: 0; }
.est-hora { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.est-hora--vieja { color: var(--av-naranja-t); }
.est-ahora__ppal { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2) var(--e-6); }
.est-t { margin: 0; line-height: 1; }
.est-t small { font: 500 var(--t-3) var(--f-texto); color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.est-ahora__ext { min-width: min(100%, 260px); flex: 1 1 260px; }
.est-mm { display: flex; flex-wrap: wrap; gap: 4px var(--e-4); margin: 0; font-variant-numeric: tabular-nums; }
.est-mm b { font-weight: 700; }
.est-mm .min b { color: var(--ink-2); }
.est-nota-mod { color: var(--av-naranja-t); }
.est-cifras { grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); }
.est-cifras .l-cifra__v { display: flex; align-items: center; gap: 4px; }
.est-flecha { width: 18px; height: 18px; flex: none; }
.est-flecha .ico { width: 18px; height: 18px; }
.est-mes { margin: 0; }
.est-sin { margin: var(--e-2) 0 0; font-size: var(--t-3); }

/* ---------- Medido frente a previsto ---------- */
.est-prev { align-items: start; }
.est-cmp td, .est-cmp th { font-variant-numeric: tabular-nums; }
.est-dias { list-style: none; margin: 0; padding: 0; display: grid; }
.est-dias li + li { border-top: 1px solid var(--line); }
.est-dias a { display: grid; grid-template-columns: 4.5em 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; color: var(--ink); text-decoration: none; }
.est-dias a:hover .est-dias__d { text-decoration: underline; }
.est-dias__d { font-weight: 600; }
.est-dias__c { overflow-wrap: anywhere; }
.est-dias__t { font-variant-numeric: tabular-nums; white-space: nowrap; }
.est-dias__t .max { font-weight: 700; }
.est-dias__t .min { color: var(--muted); }

/* ---------- Gráficos ---------- */
#graficos .sec-cab { flex-wrap: wrap; }
.est-periodo { margin-left: auto; }
.est-fig .tit-4 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.est-fig__nota { font-weight: 400; }
.est-clave { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; }
.est-clave span { display: inline-flex; align-items: center; gap: 6px; }
.est-m { display: inline-block; width: 16px; height: 10px; flex: none; border-radius: 1px; }
.est-m--t { height: 0; border-top: 2px solid var(--ink); }
.est-m--tn { height: 0; border-top: 2px solid var(--muted); }
.est-m--banda { background: var(--line-2); opacity: .5; }
.est-m--r, .est-m--disc { height: 0; border-top: 2px dashed var(--ink); }
.est-m--disc { border-top-color: var(--muted); }
.est-m--sd { background: repeating-linear-gradient(135deg, var(--sunk) 0 3px, var(--line-2) 3px 4px); }
.est-m--sol { background: #f6c64c; border-top: 2px solid #c27c0e; height: 8px; }
.est-m--pt { width: 8px; height: 8px; border-radius: 50%; background: var(--senal); }
.graf--est .g-rot-tira { font-size: 12px; }

/* ---------- Sol por satélite ---------- */
.est-sol p { margin: 0; }
.est-sol__area { fill: #f6c64c; fill-opacity: .4; }
.est-sol__linea { fill: none; stroke: #c27c0e; stroke-width: 2; stroke-linejoin: round; }
.est-sol__desp { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 3 3; }
.est-sol__est { fill: var(--senal); stroke: var(--surface); stroke-width: 1; }

/* ---------- Plegables (récords mes a mes, territorios) ---------- */
.est-plegable { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.est-plegable > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; list-style-position: inside; }
.est-plegable[open] > summary { border-bottom: 1px solid var(--line); }
.est-plegable > .tabla-caja { margin: 0; }

/* ---------- Rosa de los vientos ---------- */
.est-rosa__caja { display: grid; gap: var(--e-4); align-items: center; }
@media (min-width: 700px) { .est-rosa__caja { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); } }
.est-rosa__svg { width: 100%; max-width: 360px; height: auto; justify-self: center; }
.est-rosa__aro { fill: none; stroke: var(--line); stroke-width: 1; }
.est-rosa__pct { fill: var(--ink-2); font: 600 12px var(--f-texto); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.est-rosa__card { fill: var(--muted); font: 700 13px var(--f-texto); }
.est-rosa__ley { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.est-rosa__ley span { display: inline-flex; align-items: center; gap: 6px; }
.est-rosa__ley .est-m { width: 12px; height: 12px; }
.est-rosa .nota { margin: 0; }

/* ---------- Estaciones cercanas ---------- */
.est-cerca th a { font-weight: 600; }
.est-cerca__red { display: block; font-weight: 400; }
.est-cerca td { white-space: nowrap; }
.est-pt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.est-pt--vieja { background: var(--sem-ojo); }
.est-pt--no { background: transparent; border: 1.5px solid var(--faint); }

/* ---------- Ficha técnica ---------- */
.est-dl { display: grid; gap: 0; margin: 0; }
.est-dl > div { display: grid; grid-template-columns: minmax(7em, 40%) minmax(0, 1fr); gap: var(--e-3); padding: 8px 0; border-top: 1px solid var(--line); }
.est-dl > div:first-child { border-top: 0; padding-top: 0; }
.est-dl dt { color: var(--muted); font-size: var(--t-1); }
.est-dl dd { margin: 0; overflow-wrap: anywhere; }
.est-fuente p, .est-recon p { margin: 0; }
.est-fuente a { overflow-wrap: anywhere; }
.est-sello { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.est-sello .ico { color: var(--sello, var(--ink)); }
.est-insignias-l { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.est-widget { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--e-3); color: var(--ink); text-decoration: none; }
.est-widget:hover { border-color: var(--ink); }
.est-widget b, .est-widget .nota { display: block; }

/* ---------- Listado ---------- */
.estl-form { display: grid; gap: var(--e-3); grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); align-items: end; }
.estl-campo { display: grid; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.estl-campo .campo { width: 100%; min-width: 0; }
.estl-campo--ancho { grid-column: span 2; }
.estl-alt { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; }
.estl-alt legend { grid-column: 1 / -1; padding: 0; margin-bottom: 4px; }
.estl-alt { grid-column: span 2; }
@media (max-width: 330px) { .estl-campo--ancho, .estl-alt { grid-column: auto; } }
.estl-acc { display: flex; }
.estl-activos { flex-wrap: wrap; align-items: center; }
.estl-tabla th a { font-weight: 600; }
.estl-lugar { display: block; font-weight: 400; }
.estl-tabla td { white-space: nowrap; }
.estl-tabla td.nota { white-space: normal; min-width: 9em; }
.estl-vieja td.num b { color: var(--muted); }
.estl-vivo { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; font-size: var(--t-1); }
.estl-vivo i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.estl-hace { color: var(--av-naranja-t); font-size: var(--t-1); }
.estl-pag { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--e-2); }
.estl-pag__n { min-width: 40px; justify-content: center; }
.estl-pag__n[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.estl-redes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--e-2); }
.estl-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip--activo .estl-n { color: inherit; opacity: .8; }
.estl-terr { display: grid; gap: var(--e-3); padding: 12px 14px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.estl-terr__c { display: grid; gap: 2px; min-width: 0; }
.estl-terr__com { font-weight: 600; }
.estl-terr a { color: var(--ink); }
.estl-sel { color: var(--senal-tinta) !important; font-weight: 700; }
.estl-tabla .estl-izq { text-align: left; }
.estl-movil { display: none; font-weight: 400; }
@media (max-width: 640px) {
  .estl-tabla .estl-ancho { display: none; }
  .estl-movil { display: block; }
  .estl-tabla th[scope="row"] { white-space: normal; }
}
.d2-est .graf .g-previsto { stroke-dasharray: 5 4; }
@media (max-width: 640px) {
  .est-cerca .est-ancho { display: none; }
  .est-cerca th[scope="row"] { white-space: normal; }
  .est-cerca th, .est-cerca td { padding-inline: 8px; }
}
