/* Atlas Studio — módulo meteorológico (Open‑Meteo) */

/* ---------- Panel izquierdo ---------- */
.wx-panel { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.wx-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.wx-head .eyebrow { margin: 0; }
.wx-live { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--muted); padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.wx-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.wx-live b { font-weight: 700; }
.wx-live[data-state="ready"] { color: #c9f3ec; border-color: rgba(73,214,197,.3); }
.wx-live[data-state="ready"] i { background: var(--aqua); box-shadow: 0 0 0 0 rgba(73,214,197,.6); animation: wx-pulse 2.2s ease-out infinite; }
.wx-live[data-state="loading"] i { animation: wx-blink 1s ease-in-out infinite; }
.wx-live[data-state="error"] { color: #ffc7c7; border-color: rgba(255,123,123,.35); }
.wx-live[data-state="error"] i { background: var(--danger); }

.wx-vars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wx-vars button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 4px 7px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--muted); cursor: pointer; transition: background .18s, border-color .18s, color .18s, transform .18s; }
.wx-vars button svg { width: 17px; height: 17px; }
.wx-vars button span { font-size: 11px; font-weight: 700; color: var(--ink); }
.wx-vars button small { font-size: 9.5px; color: var(--muted-2); }
.wx-vars button:hover { background: rgba(255,255,255,.06); border-color: var(--line-strong); color: var(--ink); }
.wx-vars button[aria-checked="true"] { border-color: rgba(73,214,197,.6); background: linear-gradient(160deg, rgba(73,214,197,.2), rgba(73,214,197,.05)); color: var(--aqua); box-shadow: inset 0 0 0 1px rgba(73,214,197,.18), 0 6px 18px rgba(0,0,0,.18); }
.wx-vars button[aria-checked="true"] small { color: #9fe9df; }

.wx-time { margin-top: 4px; }
.wx-time-row { display: flex; align-items: center; gap: 9px; margin-top: 7px; }
.wx-time-row input[type="range"] { flex: 1; }
.wx-play { width: 36px; min-width: 36px; min-height: 34px; height: 34px; padding: 0; border-radius: 50%; color: var(--aqua); border-color: rgba(73,214,197,.4); }
.wx-play svg { width: 16px; }
.wx-play.playing { background: var(--aqua); color: #05201e; border-color: transparent; }
.wx-play:disabled { opacity: .45; cursor: not-allowed; }
.wx-ticks { display: flex; justify-content: space-between; margin: 4px 0 0 45px; font-size: 9px; color: var(--muted-2); }
.wx-when { display: flex; align-items: flex-start; gap: 7px; margin: 9px 0 2px; padding: 8px 10px; border-radius: 9px; background: rgba(242,184,75,.07); border: 1px solid rgba(242,184,75,.2); font-size: 11.5px; line-height: 1.35; color: #e9dcc0; }
.wx-when svg { flex: none; width: 15px; height: 15px; color: var(--gold); margin-top: 1px; }
.wx-when strong { color: #fff3d6; font-weight: 700; }
.wx-when small { color: var(--muted); font-size: 10px; }
.wx-sub { padding-left: 10px; margin-left: 2px; border-left: 2px solid rgba(73,214,197,.18); }
.wx-sub[hidden] { display: none; }
.wx-sub .row-control { margin-top: 9px; }
.wx-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 11px; border-top: 1px dashed var(--line); }
.wx-meta p { margin: 0; font-size: 10px; line-height: 1.45; color: var(--muted-2); }
.wx-refresh { flex: none; min-height: 32px; padding: 0 10px; font-size: 12px; }
.wx-refresh svg { width: 14px; }

/* ---------- Capa SVG ---------- */
.wx-field { pointer-events: none; image-rendering: auto; }
.wx-borders { fill: none; stroke: rgba(236, 246, 250, .62); stroke-width: .8; vector-effect: non-scaling-stroke; pointer-events: none; stroke-linejoin: round; }
.wx-isolines { pointer-events: none; }
.wx-isoline { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: .75; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.wx-isoline.major { stroke: rgba(255, 255, 255, .78); stroke-width: 1.1; }
.wx-isolabel { fill: #ffffff; font-family: Manrope, "DM Sans", sans-serif; font-weight: 800; text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: rgba(4, 16, 26, .82); stroke-linejoin: round; letter-spacing: .02em; }
.wx-arrows { pointer-events: none; }
.wx-arrow { fill: none; stroke: rgba(255, 255, 255, .92); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 1.5px rgba(0, 10, 18, .9)); }
.wx-arrow.calm { stroke: rgba(255, 255, 255, .45); }

/* ---------- Superposiciones del tablero ---------- */
.wx-particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.wx-particles[hidden] { display: none; }

.wx-readout { position: absolute; right: 18px; top: 58px; z-index: 6; width: 232px; padding: 11px 13px 10px; border-radius: 13px; border: 1px solid rgba(73,214,197,.28); background: rgba(5, 20, 31, .88); backdrop-filter: blur(12px); box-shadow: 0 15px 38px rgba(0,0,0,.34); pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity .16s ease, transform .16s ease; }
.wx-readout.show { opacity: 1; transform: none; }
.wx-readout .eyebrow { margin-bottom: 2px; }
.wx-readout-coord { display: block; font: 750 12.5px Manrope, sans-serif; color: var(--ink); margin-bottom: 6px; }
.wx-readout dl { margin: 0; display: grid; gap: 1px; }
.wx-readout dl div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 6px; margin: 0 -6px; border-radius: 6px; }
.wx-readout dl div.active { background: rgba(73,214,197,.12); }
.wx-readout dt { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.wx-readout dt svg { width: 13px; height: 13px; color: var(--aqua); }
.wx-readout dd { margin: 0; font: 750 12.5px Manrope, sans-serif; color: #f4fbfd; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.wx-readout dl div.active dd { color: var(--aqua); }
.wx-dir { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; color: var(--gold); }
.wx-dir svg { width: 11px; height: 11px; fill: var(--gold); }
.wx-readout-empty { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.wx-readout-foot { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted-2); }

.wx-timebadge { position: absolute; left: 50%; top: 16px; z-index: 5; transform: translate(-50%, -6px); display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 99px; border: 1px solid rgba(242,184,75,.3); background: rgba(5, 20, 31, .84); backdrop-filter: blur(10px); box-shadow: 0 10px 28px rgba(0,0,0,.3); font-size: 11.5px; color: #dce9ee; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s ease, transform .2s ease; }
.wx-timebadge.show { opacity: 1; transform: translate(-50%, 0); }
.wx-timebadge.compact { display: none; }
.wx-timebadge strong { font: 800 13px Manrope, sans-serif; color: var(--gold); }
.wx-badge-var { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 99px; background: rgba(73,214,197,.14); color: var(--aqua); font-weight: 700; font-size: 11px; }
.wx-badge-var svg { width: 13px; height: 13px; }

.wx-status { position: absolute; left: 50%; top: 56px; z-index: 7; transform: translate(-50%, -8px); display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px; border: 1px solid rgba(73,214,197,.3); background: rgba(5,20,31,.9); backdrop-filter: blur(10px); color: #cfe1e7; font-size: 11px; opacity: 0; pointer-events: none; transition: .2s ease; white-space: nowrap; }
.wx-status.show { opacity: 1; transform: translate(-50%, 0); }
.wx-status.error { border-color: rgba(255,123,123,.5); color: #ffc7c7; }
.wx-status svg { width: 14px; height: 14px; }
.wx-spinner { width: 12px; height: 12px; border: 2px solid rgba(73,214,197,.25); border-top-color: var(--aqua); border-radius: 50%; animation: wx-spin .8s linear infinite; }

@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-blink { 50% { opacity: .3; } }
@keyframes wx-pulse { 0% { box-shadow: 0 0 0 0 rgba(73,214,197,.55); } 70% { box-shadow: 0 0 0 7px rgba(73,214,197,0); } 100% { box-shadow: 0 0 0 0 rgba(73,214,197,0); } }

@media (max-width: 900px) {
  .wx-timebadge { top: auto; bottom: 12px; font-size: 10.5px; }
  .wx-readout { width: 200px; right: 10px; top: 52px; }
}
@media (max-width: 640px) {
  .wx-timebadge span:last-child { display: none; }
  .wx-readout dl div:not(.active):nth-child(n+4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wx-live i, .wx-spinner { animation: none !important; }
  .wx-readout, .wx-timebadge, .wx-status { transition: none; }
}
