/* =========================================================
   Part G water efficiency workspace

   Sits on the .wuv application shell, which supplies the frame, the columns,
   the modal and the form rows. Everything here is the water tool's own: the
   fitting blocks, the two-route verdict, the charts and the flow tools.
   ========================================================= */

.pgw-summary__row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 5px 0; border-bottom: 1px solid #eef2f5; font-size: 12px;
}
.pgw-summary__row:last-child { border-bottom: 0; }
.pgw-summary__row span { color: var(--wuv-muted); }
.pgw-summary__row strong { font-weight: 600; text-align: right; }

.pgw-stagehead h3 { margin: 0 0 2px; font-size: 15px; }

.pgw-canvas { overflow-y: auto; padding: 14px; align-items: stretch; }
.pgw-stage { display: flex; flex-direction: column; gap: 14px; width: 100%; }

/* ------------------------------------------------------------ input blocks */

.pgw-block {
  border: 1px solid var(--wuv-line); border-radius: 8px;
  padding: 13px 14px; background: #fff;
}
.pgw-block__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.pgw-block__head h4 { margin: 0; font-size: 14px; }
.pgw-block__head select { max-width: 170px; padding: 5px 7px; font-size: 12.5px; }
.pgw-block__foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 9px; }
.pgw-block__foot .btn { margin: 0; }

.pgw-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pgw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }

.pgw-add { padding: 5px 11px; font-size: 12.5px; }

.pgw-note { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--wuv-muted); }
.pgw-note strong { color: var(--wuv-ink, #1b2733); }
.pgw-hint { display: block; font-style: normal; font-size: 11.5px; color: var(--wuv-muted); margin-top: 3px; }

.pgw-list { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.55; color: #3f4b57; }
.pgw-list li { margin-bottom: 6px; }

.pgw-empty { margin: 0; padding: 18px; text-align: center; font-size: 13px; color: var(--wuv-muted); }

/* ----------------------------------------------------------- fitting rows */

.pgw-fittings { width: 100%; border-collapse: collapse; }
.pgw-fittings th {
  text-align: left; font-size: 11px; font-weight: 600; color: var(--wuv-muted);
  padding: 0 6px 4px 0; white-space: nowrap;
}
.pgw-fittings td { padding: 3px 6px 3px 0; }
.pgw-fittings input {
  width: 100%; padding: 6px 8px; border: 1px solid var(--wuv-line);
  border-radius: 4px; font: inherit; font-size: 13px; background: #fff;
}
.pgw-col-qty { width: 96px; }
.pgw-col-act { width: 34px; }

.pgw-x {
  width: 26px; height: 26px; border: 1px solid var(--wuv-line); border-radius: 4px;
  background: #fff; color: var(--wuv-muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.pgw-x:hover { border-color: var(--wuv-bad); color: var(--wuv-bad); }

.pgw-wc {
  border: 1px solid #e6ebf0; border-radius: 6px; padding: 10px 11px; margin-bottom: 9px;
  background: #fbfdff;
}
.pgw-wc__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pgw-wc__head strong { font-size: 12.5px; }
.pgw-wc__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

/* ----------------------------------------------------------------- chips */

.pgw-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.pgw-chip {
  border: 1px solid var(--wuv-line); border-radius: 20px; background: #fff;
  padding: 4px 11px; font-size: 12px; cursor: pointer; color: #46525e;
}
.pgw-chip:hover { border-color: #9fb2c4; }
.pgw-chip.is-on { background: var(--wuv-accent); border-color: var(--wuv-accent); color: #fff; }

.pgw-measurerow {
  display: flex; align-items: center; gap: 9px; margin-top: 8px;
  font-size: 11.5px; color: var(--wuv-muted);
}
.pgw-measure {
  border: 1px solid var(--wuv-accent); border-radius: 5px; background: #fff;
  color: var(--wuv-accent); padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer;
  flex: none;
}
.pgw-measure:hover { background: var(--wuv-accent); color: #fff; }

.pgw-limit {
  display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 20px;
  background: var(--wuv-okbg); color: var(--wuv-ok); font-weight: 600;
}
.pgw-limit.is-fail { background: var(--wuv-badbg); color: var(--wuv-bad); }

/* ---------------------------------------------------------- the two routes */

.pgw-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.pgw-routechip {
  border: 1px solid var(--wuv-line); border-radius: 6px; padding: 7px 9px;
  display: flex; flex-direction: column; gap: 2px;
}
.pgw-routechip span { font-size: 10.5px; color: var(--wuv-muted); }
.pgw-routechip strong { font-size: 14px; }
.pgw-routechip.is-pass { border-color: var(--wuv-ok); background: var(--wuv-okbg); }
.pgw-routechip.is-pass strong { color: var(--wuv-ok); }
.pgw-routechip.is-fail { border-color: var(--wuv-bad); background: var(--wuv-badbg); }
.pgw-routechip.is-fail strong { color: var(--wuv-bad); }
.pgw-routechip.is-off strong { color: var(--wuv-muted); }
/* The additional target needs a full line: it carries a name as well as a figure. */
.pgw-routechip--wide { grid-column: 1 / -1; }
.pgw-routechip--wide strong { font-size: 12.5px; }

.pgw-modalhead { margin: 16px 0 6px; font-size: 14px; }
.pgw-modalhead:first-child { margin-top: 0; }

.pgw-routes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pgw-route {
  border: 1px solid var(--wuv-line); border-left-width: 4px; border-radius: 8px;
  padding: 13px 15px; background: #fff;
}
.pgw-route h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--wuv-muted); font-weight: 600; }
.pgw-route__figure { margin: 0; font-size: 31px; font-weight: 700; line-height: 1.05; }
.pgw-route__figure span { font-size: 13px; font-weight: 400; color: var(--wuv-muted); }
.pgw-route__figure--small { font-size: 17px; line-height: 1.25; }
.pgw-route__verdict { margin: 7px 0 0; font-size: 12.5px; line-height: 1.5; color: #46525e; }
.pgw-route.is-pass { border-left-color: var(--wuv-ok); }
.pgw-route.is-pass .pgw-route__figure { color: var(--wuv-ok); }
.pgw-route.is-fail { border-left-color: var(--wuv-bad); }
.pgw-route.is-fail .pgw-route__figure { color: var(--wuv-bad); }
.pgw-route.is-off { border-left-color: #c3ced8; background: #fafbfc; }
.pgw-route.is-off .pgw-route__figure { color: var(--wuv-muted); }

.pgw-lever { border-left: 4px solid var(--wuv-accent); }
.pgw-lever h4 { margin: 0 0 6px; font-size: 14px; }
.pgw-lever p { margin: 0; font-size: 13px; line-height: 1.6; color: #3f4b57; }

/* ---------------------------------------------------------------- charts */

.pgw-chartcard {
  border: 1px solid var(--wuv-line); border-radius: 8px; padding: 13px 14px; background: #fff;
}
.pgw-chartcard h4 { margin: 0 0 8px; font-size: 14px; }
.pgw-svg { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------- tables */

.pgw-tablewrap { overflow-x: auto; border: 1px solid var(--wuv-line); border-radius: 6px; }
.pgw-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pgw-table th {
  text-align: left; font-size: 11px; font-weight: 600; color: var(--wuv-muted);
  padding: 8px 10px 6px; border-bottom: 1px solid var(--wuv-line);
  background: #f7f9fb; white-space: nowrap;
}
.pgw-table td { padding: 6px 10px; border-bottom: 1px solid #eef2f5; }
.pgw-table tr:last-child td { border-bottom: 0; }
.pgw-table tfoot th, .pgw-table tfoot td {
  background: #f7f9fb; border-top: 1px solid var(--wuv-line); border-bottom: 0; font-weight: 600;
}
.pgw-num { text-align: right; font-variant-numeric: tabular-nums; }

.pgw-tag {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px;
  background: #eef2f5; color: var(--wuv-muted);
}
.pgw-tag.is-pass { background: var(--wuv-okbg); color: var(--wuv-ok); }
.pgw-tag.is-fail { background: var(--wuv-badbg); color: var(--wuv-bad); }

/* ------------------------------------------------------------ flow tools */

.pgw-flowgrid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px;
}
.pgw-flowcell {
  border: 1px solid var(--wuv-line); border-radius: 7px; padding: 10px 11px;
  display: flex; flex-direction: column; gap: 6px;
}
.pgw-flowcell > span { font-size: 11.5px; color: var(--wuv-muted); }
.pgw-flowcell input, .pgw-flowcell select {
  width: 100%; padding: 6px 8px; border: 1px solid var(--wuv-line);
  border-radius: 4px; font: inherit; font-size: 13px; background: #fff;
}
.pgw-flowcell strong { font-size: 22px; font-weight: 700; color: var(--wuv-accent); line-height: 1.15; }
.pgw-flowcell.is-derived { background: #f4f8fb; border-color: var(--wuv-accent); }

.pgw-apply {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
  padding: 11px 12px; border: 1px solid var(--wuv-line); border-radius: 7px; background: #fbfdff;
}
.pgw-apply .btn { margin: 0; flex: none; }
.pgw-apply span { font-size: 11.5px; line-height: 1.5; color: var(--wuv-muted); }

.wuv-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------- narrow */

@media (max-width: 1100px) {
  .pgw-two, .pgw-grid, .pgw-routes-grid, .pgw-flowgrid { grid-template-columns: 1fr; }
  .pgw-wc__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
