/* lp-stations.css: weather station cards + charts (js/lp-stations.js), the Live section's current-weather
 * text (LP.currentWeather) and lift status (js/lp-lifts.js). Loaded by the modules if the page did not link it. */

/* ---- header weather line (hdrwx): one line of values under the place line ---- */
.lp-hdr-wx { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; row-gap: 2px; margin: 2px 0 0; font-size: 14px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.lp-hdr-wx[hidden] { display: none; }
.lp-hw-i { white-space: nowrap; }
.lp-hw-ic { font-size: 15px; margin-right: 3px; }
.lp-hw-t .lp-hw-v { font-weight: 700; }
.lp-hw-sep { color: var(--lp-muted, #5f6670); }
@media (max-width: 420px) {
  .lp-hdr-wx { font-size: 13px; column-gap: 4px; }
  .lp-hw-ic { font-size: 13px; margin-right: 2px; }
}

/* ---- stations block ---- */
.lps { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.lps-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lps-summary { font-size: 13px; color: var(--lp-muted, #5f6670); flex: 1 1 200px; }
.lps-pill {
  border: 1px solid rgba(17,24,28,.18); background: #fff; color: inherit; border-radius: 16px; padding: 0 12px;
  min-height: 32px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.lps-pill:hover { background: var(--lp-hover, #cce6ff); }
.lps-pill-main { background: var(--lp-blue-2, #6699cc); color: #fff; border-color: transparent; }
.lps-pill-main:hover { background: var(--lp-blue-2h, #4477aa); }
.lps-pill-sm { min-height: 24px; font-size: 11px; padding: 0 8px; flex: none; }
.lps-pill[hidden] { display: none; }
.lps-list { display: flex; flex-direction: column; gap: 8px; }
.lps-card { border: 1px solid rgba(17,24,28,.14); border-radius: 10px; background: rgba(255,255,255,.75); padding: 8px 10px; min-width: 0; }
.lps-folded { padding: 0; }
.lps-silent { opacity: .55; }
.lps-line, .lps-headbtn {
  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 36px; padding: 0 10px 0 6px; border: 0;
  background: none; font: inherit; color: inherit; cursor: pointer; text-align: left;
}
.lps-headbtn { padding: 0; min-height: 28px; flex: 1; min-width: 0; }
.lps-line:hover .lps-line-name, .lps-headbtn:hover .lps-name { text-decoration: underline; }
.lps-chev { display: inline-block; width: 14px; flex: none; color: #8a9299; font-size: 18px; line-height: 1; transition: transform .15s; }
.lps-chev-open { transform: rotate(90deg); }
.lps-line-name, .lps-name { flex: 1 1 auto; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lps-line-name { font-size: 14px; }
.lps-name { font-size: 15px; }
.lps-line-temp { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.lps-depth { border-radius: 9px; padding: 1px 7px; min-width: 44px; text-align: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.lps-new { font-size: 12px; font-weight: 700; color: #2a78d6; white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; }
.lps-new[hidden] { display: none; }
.lps-chip { flex: none; font-size: 10.5px; font-weight: 700; line-height: 16px; padding: 0 6px; border-radius: 8px; background: var(--lp-blue-3, #b3cce6); color: #1d3a5a; }
.lps-dist { font-size: 13px; flex: none; font-variant-numeric: tabular-nums; }
.lps-head-row { display: flex; align-items: center; gap: 8px; }
.lps-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lps-sub { font-size: 12px; line-height: 16px; color: var(--lp-muted, #5f6670); }
a.lps-sub { font-weight: 400; color: var(--lp-muted, #5f6670); }
a.lps-sub:hover { color: var(--lp-link, #336699); }
.lps-where { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lps-stale { font-weight: 700; color: rgba(0,0,0,.87); }
.lps-readings { display: flex; flex-wrap: wrap; column-gap: 16px; row-gap: 4px; margin: 6px 0; }
.lps-rl { font-size: 10.5px; line-height: 14px; color: var(--lp-muted, #5f6670); }
.lps-rv { font-size: 14px; line-height: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lps-note { margin: 4px 0; font-size: 12px; line-height: 18px; color: var(--lp-muted, #5f6670); }
.lps-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; text-decoration: underline; color: inherit; cursor: pointer; }
.lps-loading { height: 120px; border-radius: 6px; background: linear-gradient(90deg, #eef2f6 0, #f8fafc 50%, #eef2f6 100%); background-size: 200% 100%; animation: lps-sweep 1.2s linear infinite; }
@keyframes lps-sweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .lps-loading { animation: none; } }
.lps-chart { min-width: 0; }
.lps-legend { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; min-height: 18px; }
.lps-lg-item { display: inline-flex; align-items: center; gap: 4px; }
.lps-lg-text, .lps-lg-stamp { font-size: 11px; line-height: 16px; color: var(--lp-muted, #5f6670); font-variant-numeric: tabular-nums; }
.lps-lg-stamp, .lps-lg-on { color: rgba(0,0,0,.87); }
.lps-lg-stamp[hidden] { display: none; }
.lps-swatch { width: 10px; height: 2.5px; border-radius: 1.5px; display: inline-block; }
.lps-plot { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: crosshair; overflow: hidden; }
.lps-plot svg { display: block; font-family: inherit; }
.lps-credit { margin: 0; font-size: 10.5px; line-height: 14px; color: var(--lp-muted, #5f6670); }

.lps-swatch-area { height: 8px; width: 8px; border-radius: 2px; opacity: .6; }
.lps-group { margin: 6px 0 -2px; font-size: 13px; font-weight: 700; color: var(--lp-blue, #2d5886); }
.lps-group:first-child { margin-top: 0; }

/* ---- legacy weather plot (livewx) ---- */
.lpx-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; margin: 0; }
.lpx-cell { border-radius: 6px; overflow: hidden; background: #f7f9fb; border: 1px solid rgba(17,24,28,.08); text-align: center; }
.lpx-now dt { background: var(--lp-blue, #2d5886); color: #f2f2f2; font-weight: 700; font-size: 11px; line-height: 14px; padding: 3px 4px; }
.lpx-now dd { margin: 0; padding: 3px 4px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lpx-sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }
.lpx { display: flex; flex-direction: column; gap: 4px; text-align: left; margin: 6px 0 2px; }
.lpx-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lpx-title { font-size: 14px; font-weight: 700; color: var(--lp-blue, #2d5886); }
.lpx-days { display: flex; gap: 4px; }
.lpx-chart { border: 1px solid rgba(17,24,28,.10); border-radius: 8px; background: rgba(255,255,255,.7); padding: 4px 6px 2px; }

/* ---- customize dialog ---- */
.lps-dlg-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 12px; }
.lps-dlg {
  width: min(520px, 100%); max-height: 100%; overflow: auto; background: #fff; border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 6px 30px rgba(0,0,0,.35); text-align: left; outline: none; display: flex; flex-direction: column; gap: 10px;
}
.lps-dlg h3 { margin: 0; font-size: 17px; color: var(--lp-blue, #2d5886); }
.lps-dlg-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; font-size: 14px; }
.lps-dlg select { font: inherit; font-size: 14px; min-height: 32px; padding: 0 6px; }
.lps-dlg-vars { border: 1px solid rgba(17,24,28,.15); border-radius: 8px; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.lps-dlg-vars legend { font-size: 12px; color: var(--lp-muted, #5f6670); padding: 0 4px; }
.lps-check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.lps-dlg-sub { font-size: 12px; color: var(--lp-muted, #5f6670); }
.lps-dlg-list { display: flex; flex-direction: column; gap: 2px; max-height: 40vh; overflow: auto; border-top: 1px solid #eee; border-bottom: 1px solid #eee; padding: 4px 0; }
.lps-dlg-row { display: flex; align-items: flex-start; gap: 8px; padding: 4px 2px; cursor: pointer; font-size: 14px; }
.lps-dlg-row input { margin-top: 3px; }
.lps-dlg-name { display: flex; flex-direction: column; min-width: 0; font-weight: 700; }
.lps-dlg-name small { font-weight: 400; font-size: 11.5px; color: var(--lp-muted, #5f6670); }
.lps-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; }

/* ---- lift status (Live) ---- */
.lpl { text-align: left; margin-top: 10px; }
.lpl-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lpl-title { margin: 0; font-size: 17px; color: var(--lp-blue, #2d5886); }
.lpl-sum { font-size: 14px; font-weight: 700; color: var(--lp-muted, #5f6670); }
.lpl-note { margin: 4px 0; font-size: 13px; color: var(--lp-muted, #5f6670); }
.lpl-warn { color: #c2410c; }
.lpl-group { margin-top: 8px; }
.lpl-area { margin: 6px 0 4px; font-size: 15px; }
.lpl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lpl-table th, .lpl-table td { padding: 5px 8px; text-align: left; vertical-align: top; }
.lpl-table td { white-space: nowrap; }
.lpl-table th.lpl-name { font-weight: 700; white-space: normal; min-width: 150px; background: transparent; color: inherit; }
.lpl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.lpl-state { font-weight: 700; }
.lpl-table .open { background: var(--lp-ok, #ccffe6); }
.lpl-table .hold { background: var(--lp-hold, #f8e9c4); }
.lpl-table .closed { background: var(--lp-closed, #f6d6d6); }
.lpl-table .scheduled { background: var(--lp-sched, #d8e7fa); }
.lpl-past { color: #3f464d; }
/* 3-day history: a light tint of the day's state */
.lpl-table td.lpl-d-open { background: #ecf8f0; }
.lpl-table td.lpl-d-hold { background: #fcf4e0; }
.lpl-table td.lpl-d-closed { background: #f9ecec; }
.lpl-table tbody tr { border-bottom: 1px solid #fff; }
.lpl-today { font-variant-numeric: tabular-nums; }
/* same column grid in every area table: Lift | Status | Today (hours) | 3 past days */
.lpl-table { table-layout: fixed; min-width: 560px; }
.lpl-table thead th:nth-child(1) { width: 25%; }
.lpl-table thead th:nth-child(2) { width: 17%; }
.lpl-table thead th:nth-child(3) { width: 14%; }
.lpl-table td.lpl-past { white-space: normal; }
.lpl-table th.lpl-dh { white-space: nowrap; }
.lpl-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.lpl-btn { border: 0; background: var(--lp-blue-2, #6699cc); color: #fff; border-radius: 16px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.lpl-btn:hover { background: var(--lp-blue-2h, #4477aa); }
.lpl-foot { margin: 8px 0 0; font-size: 12px; color: var(--lp-muted, #5f6670); }

@media (max-width: 480px) {
  /* open card header: the readings already say "+N cm 24 h"; give the name the room */
  .lps-headbtn .lps-new { display: none; }
  .lpl-table th, .lpl-table td { padding: 4px 6px; }
  .lpl-table { table-layout: auto; min-width: 0; }
  .lpl-table th.lpl-name { min-width: 112px; }
}
