/* lp-forecast.css: forecast section (js/lp-forecast.js). Keeps the livepow look:
   #2d5886 headers, zebra (day/night) columns, legacy series colours. */

.lp-fc { text-align: left; font-size: 14px; line-height: 1.35; }
.lp-fc .sn { color: #6481c1; }
.lp-fc .rn { color: #009933; }
.lp-fc .hi { color: #cc0000; }
.lp-fc .lo { color: #0000cc; }
.lp-fc .mut { color: #777; }
.lp-fc .warn { color: #cc0000; font-weight: 700; }

/* Model and level chips */
.lp-fc-bar { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.lp-fc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-fc-chip, .lp-fc-tog {
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  min-height: 32px; padding: 4px 11px; color: #2d5886; background: #b3cce6;
  border: 0; border-radius: 5px 10px 5px 10px; box-shadow: inset 0 0 5px #2d5886;
}
.lp-fc-chip:hover, .lp-fc-tog:hover { background: #9fbddf; }
.lp-fc-chip.on, .lp-fc-tog.on { background: #2d5886; color: #f2f2f2; box-shadow: inset 0 0 6px #fff; }
.lp-fc-chip.off { background: #eaeaea; color: #aaa; box-shadow: inset 0 0 4px #aaa; cursor: default; }
.lp-fc-chip small { font-weight: 400; font-size: 11px; opacity: .85; }
.lp-fc-chip:focus-visible, .lp-fc-tog:focus-visible, .lp-fc-scroll:focus-visible { outline: 2px solid #336699; outline-offset: 2px; }
.lp-fc-levels .lp-fc-chip { font-size: 12px; min-height: 28px; }
.lp-fc-levels .lp-fc-chip small { font-weight: 700; opacity: 1; }
/* Whistler + GFS: legacy livepow GFS points (scroll sideways on phones instead of wrapping into 4 rows) */
.lp-fc-gfsloc { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 1px 4px; scrollbar-width: thin; }
.lp-fc-gfsloc .lp-fc-chip { font-size: 12px; min-height: 28px; white-space: nowrap; flex: none; }
@media (min-width: 720px) { .lp-fc-gfsloc { flex-wrap: wrap; overflow-x: visible; } }

.lp-fc-info { font-size: 12px; color: #555; margin: 2px 0 4px; }
.lp-fc-elev { font-weight: 700; color: #222; }
.lp-fc-table .lp-fc-at b { font-weight: 700; font-size: 11px; }
.lp-fc-point { font-size: 12px; color: #2d5886; margin-top: 1px; }
.lp-fc-credit { font-size: 11px; color: #777; }
.lp-fc-totals { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 2px; font-size: 13px; margin: 2px 0 8px; }
.lp-fc-totals .w { white-space: nowrap; }
.lp-fc-totals b { font-weight: 700; color: #333; margin-right: 2px; }
.lp-fc-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.lp-fc-units { margin-left: auto; }
.lp-fc-loading, .lp-fc-note { color: #666; font-size: 13px; margin: 10px 0; }
.lp-fc-loading::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px;
  border: 2px solid #b3cce6; border-top-color: #2d5886; border-radius: 50%; animation: lp-fc-spin .8s linear infinite;
}
@keyframes lp-fc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lp-fc-loading::before { animation: none; } }
.lp-fc-small { font-size: 11px; color: #666; margin: 4px 0 0; }
.lp-fc-h { font-size: 14px; color: #2d5886; margin: 12px 0 4px; }

/* Table: scrolls inside its own box with a sticky label column. */
.lp-fc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; overscroll-behavior-x: contain; }
.lp-fc-table { border-collapse: separate; border-spacing: 0; font-size: 12px; text-align: center; white-space: nowrap; }
.lp-fc-table th, .lp-fc-table td { padding: 2px 3px; border-right: 1px solid rgba(0,0,0,.08); border-bottom: 1px solid rgba(0,0,0,.08); }
.lp-fc-table td { min-width: 46px; max-width: 52px; width: 52px; background: #f2f2f2; }
.lp-fc-table td.n { background: #e2e6ec; }
.lp-fc-sky td.now { box-shadow: inset 0 3px 0 #cc0000; }
.lp-fc-table td.now { background: #fff6dc; }
.lp-fc-table td.n.now { background: #ece6d2; }
.lp-fc-table thead th { background: #2d5886; color: #f2f2f2; font-weight: 700; padding: 5px 3px; border-right-color: rgba(255,255,255,.35); }
.lp-fc-table tbody th, .lp-fc-table .lp-fc-time th {
  position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; font-weight: 700;
  font-size: 11px; line-height: 1.2; min-width: 44px; padding-left: 5px; box-shadow: 1px 0 0 rgba(0,0,0,.12);
}
.lp-fc-table thead th:first-child { position: sticky; left: 0; z-index: 2; font-size: 10px; font-weight: 400; line-height: 1.15; }
.lp-fc-table th small, .lp-fc-table td small { font-size: 10px; font-weight: 400; color: #666; }
.lp-fc-time td { font-size: 10px; color: #555; }
.lp-fc-sky img { display: block; margin: 0 auto; width: 40px; height: 34px; }
.lp-fc-temp b { font-size: 13px; }
.lp-fc-frz span { font-size: 11px; }
.lp-fc-precip td { vertical-align: top; height: 76px; padding: 2px 1px; }
.lp-fc-pc { display: flex; flex-direction: column; align-items: center; height: 72px; font-size: 10px; font-weight: 700; line-height: 13px; }
.lp-fc-bars { flex: 1; width: 38px; display: flex; flex-direction: column; justify-content: flex-end; }
.lp-fc-bars i { display: block; width: 100%; }
.lp-fc-bars i.sn { background: #7491d1; }
.lp-fc-bars i.rn { background: #009933; }
.lp-fc-wind span { font-weight: 700; line-height: 1.15; }
.lp-fc-day td { background: #fff; font-size: 11px; font-weight: 700; white-space: normal; line-height: 1.25; }

/* Past forecast columns (left of the striped "Historical" bar) */
.lp-fc-table td.p { background: #e8e8e8; color: #555; }
.lp-fc-table td.p.n { background: #d8dbe1; }
.lp-fc-table thead th.p { background: #5f7898; }
.lp-fc-table td.p img { opacity: .8; }
.lp-fc-table .lp-fc-hdiv {
  width: 22px; min-width: 22px; max-width: 22px; padding: 0; text-align: center; vertical-align: middle;
  background: repeating-linear-gradient(135deg, #2d5886 0 5px, #b3cce6 5px 10px); border-right: 0;
}
.lp-fc-table thead th.lp-fc-hdiv { background: repeating-linear-gradient(135deg, #2d5886 0 5px, #b3cce6 5px 10px); }
.lp-fc-harr, .lp-fc-hv { display: block; margin: 0 auto; background: rgba(255,255,255,.94); color: #2d5886; font-weight: 700; }
.lp-fc-harr { width: 18px; height: 18px; line-height: 17px; border-radius: 50%; font-size: 13px; margin-bottom: 6px; }
.lp-fc-hv {
  writing-mode: vertical-rl; transform: rotate(180deg); width: 16px; padding: 8px 0; border-radius: 3px;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; line-height: 16px;
}
.lp-fc-pastnote { margin: 3px 0 0; }

/* Long-range lock (gate tier basic: doc.trimmed) */
.lp-fc-table .lp-fc-lockh { background: #5f7898; font-size: 11px; }
.lp-fc-table td.lp-fc-lock {
  width: 124px; min-width: 124px; max-width: 132px; white-space: normal; vertical-align: middle;
  background: repeating-linear-gradient(135deg, #f3f6fb 0 8px, #e6ecf5 8px 16px);
}
.lp-fc-lockin { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 6px; font-size: 12px; font-weight: 700; color: #2d5886; line-height: 1.3; }
.lp-fc-lockico { font-size: 22px; }
.lp-fc-lockbtn {
  display: inline-block; padding: 6px 10px; border-radius: 5px 10px 5px 10px; background: #2d5886; color: #f2f2f2 !important;
  text-decoration: none; font-size: 12px; box-shadow: inset 0 0 6px #fff;
}
.lp-fc-lockbtn:hover { background: #24476d; }
a.lp-fc-lockcta { display: inline-flex; align-items: center; text-decoration: none; white-space: normal; text-align: left; }

/* Hourly charts sub-section (LP.collapsible "fc-hourly", or the <details> fallback) */
.lp-fc-hourly { margin: 6px 0 0; }
.lp-fc-hourly[hidden] { display: none; }
.lp-fc-det > summary { cursor: pointer; font-weight: 700; color: #2d5886; font-size: 14px; padding: 6px 0; }
.lp-fc-det > summary:focus-visible { outline: 2px solid #336699; outline-offset: 2px; }

/* Charts: headings sit tight on the plots (legend above the temperature/precip plot) */
.lp-fc-charts[hidden] { display: none; }
.lp-fc-h.lp-fc-ch { margin: 2px 0 0; line-height: 1.2; }
.lp-fc-chart + .lp-fc-h.lp-fc-ch { margin-top: 4px; }
.lp-fc-lgtop .uplot { display: flex; flex-direction: column; }
.lp-fc-lgtop .u-legend { order: -1; margin: 0 0 1px; }
.lp-fc-chart .u-legend .u-series > * { padding: 1px 2px; }
.lp-fc-chart .u-legend tr { line-height: 1.25; }
.lp-fc-chart { width: 100%; min-height: 60px; overflow: hidden; }
/* Sideways scrolling: a native scroller whose sticky viewport holds the plot; the scroll position sets the time window. */
.lp-fc-cscroll { overflow-x: hidden; overflow-y: hidden; max-width: 100%; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.lp-fc-cscroll.on { overflow-x: auto; }
.lp-fc-cscroll:focus-visible { outline: 2px solid #336699; outline-offset: 2px; }
.lp-fc-ctrack { position: relative; }
.lp-fc-cview { position: sticky; left: 0; }
/* The "now" marker over the plot, pulsing */
.lp-fc-now {
  position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; pointer-events: none; z-index: 2;
  background: #cc0000; border-radius: 1px; animation: lp-fc-pulse 2.2s ease-in-out infinite;
}
@keyframes lp-fc-pulse {
  0%, 100% { opacity: .5; box-shadow: 0 0 0 0 rgba(204,0,0,0); }
  50% { opacity: 1; box-shadow: 0 0 5px 2px rgba(204,0,0,.35); }
}
@media (prefers-reduced-motion: reduce) { .lp-fc-now { animation: none; opacity: .85; } }
.lp-fc-chart .u-legend { font-size: 11px; text-align: left; }
.lp-fc-chart .u-legend .u-series { padding: 0 4px; }
.lp-fc-chart .u-legend th { font-weight: 400; }

@media (max-width: 480px) {
  .lp-fc { font-size: 13px; }
  .lp-fc-table td { min-width: 44px; width: 46px; }
  .lp-fc-chip, .lp-fc-tog { padding: 4px 9px; }
  .lp-fc-chart .u-legend { font-size: 10px; }
}
