/* ============================================================
   VOLTARA — Solar Workbench styles
   Scoped .wb-* classes. Uses the global design tokens so it
   tracks the rest of the app. Reuses global input/.btn styling.
   ============================================================ */

#view-workbench .wrap{ max-width:1180px; }

/* preset launcher */
.wb-presets{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:16px; }
.wb-presets-l{ font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--txt-faint); margin-right:4px; }
.wb-preset{
  font-family:'Manrope',sans-serif; font-size:13px; font-weight:600; color:var(--txt-dim);
  background:var(--panel); border:1px solid var(--line); border-radius:100px;
  padding:8px 14px; cursor:pointer; transition:all .15s ease;
}
.wb-preset:hover{ border-color:var(--lime); color:var(--lime); transform:translateY(-1px); }

/* action bar */
.wb-bar{ display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:14px; flex-wrap:wrap; }
.wb-hint{ font-size:13px; color:var(--txt-dim); }
.wb-bar-actions{ display:flex; gap:8px; }
.btn.wb-mini{ width:auto; padding:9px 14px; font-size:13px; }

/* scenario cards */
.wb-scenarios{ display:grid; grid-template-columns:repeat(auto-fit,minmax(310px,1fr)); gap:14px; margin-bottom:24px; }
.wb-sc{ background:var(--panel); border:1px solid var(--line); border-top:3px solid var(--sc); border-radius:14px; padding:14px 16px 6px; }
.wb-sc-head{ display:flex; align-items:center; gap:9px; margin-bottom:10px; }
.wb-sc-dot{ width:9px; height:9px; border-radius:50%; background:var(--sc); flex:none; box-shadow:0 0 0 3px color-mix(in srgb,var(--sc) 18%,transparent); }
.wb-sc-title{
  flex:1; min-width:0; font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:15px; color:var(--txt);
  background:transparent; border:none; border-bottom:1px dashed transparent; padding:2px 0; outline:none;
}
.wb-sc-title:hover{ border-bottom-color:var(--line); }
.wb-sc-title:focus{ border-bottom-color:var(--sc); }
.wb-sc-actions{ display:flex; gap:4px; flex:none; }
.wb-iconbtn{ width:26px; height:26px; border-radius:7px; border:1px solid var(--line); background:var(--panel-2); color:var(--txt-faint); cursor:pointer; font-size:13px; line-height:1; transition:all .12s; }
.wb-iconbtn:hover{ color:var(--coral); border-color:var(--coral); }

/* input groups */
.wb-groups{ display:flex; flex-direction:column; gap:2px; }
.wb-grp{ border-bottom:1px solid var(--line-soft); }
.wb-grp:last-child{ border-bottom:none; }
.wb-grp-h{ display:flex; align-items:center; gap:9px; cursor:pointer; list-style:none; padding:10px 0; font-size:13.5px; font-weight:600; color:var(--txt); }
.wb-grp-h::-webkit-details-marker{ display:none; }
.wb-grp-h .acc-chev{ margin-left:auto; transition:transform .18s; color:var(--txt-faint); }
.wb-grp[open] .wb-grp-h .acc-chev{ transform:rotate(90deg); }
.wb-grp-body{ display:grid; grid-template-columns:1fr 1fr; gap:9px 10px; padding:2px 0 14px; }
.wb-f{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.wb-f span{ font-size:11.5px; color:var(--txt-dim); font-weight:500; }
.wb-f span b{ color:var(--txt-faint); font-weight:600; }
.wb-f input, .wb-f select{ width:100%; }
.wb-grp-body > .wb-f:first-child:nth-last-child(odd){ } /* layout hook */

/* section headers shared by compare + sweep */
.wb-sec-h{ font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:16px; color:var(--txt); margin-bottom:12px; display:flex; align-items:baseline; gap:10px; }
.wb-sec-sub{ font-family:'Manrope',sans-serif; font-size:12px; font-weight:500; color:var(--txt-faint); }

/* comparison table */
.wb-compare{ margin-bottom:26px; }
.wb-ctable{ display:grid; background:var(--panel); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.wb-ctr{ display:contents; }
.wb-metric, .wb-cell{ padding:11px 14px; border-bottom:1px solid var(--line-soft); display:flex; align-items:center; gap:8px; font-size:13px; }
.wb-metric{ color:var(--txt-dim); font-weight:500; background:var(--panel-2); }
.wb-cell{ justify-content:flex-end; text-align:right; flex-wrap:wrap; }
.wb-ctr-head .wb-metric, .wb-ctr-head .wb-cell{ background:var(--panel-2); border-bottom:1px solid var(--line); font-weight:700; color:var(--txt); }
.wb-chead{ font-family:'Bricolage Grotesque',sans-serif; font-size:13px; }
.wb-chead .wb-sc-dot{ background:var(--sc); box-shadow:0 0 0 3px color-mix(in srgb,var(--sc) 18%,transparent); }
.wb-val{ font-family:'Space Mono',monospace; font-size:13px; color:var(--txt); font-weight:700; }
.wb-delta{ font-family:'Space Mono',monospace; font-size:11px; font-weight:700; padding:1px 7px; border-radius:100px; white-space:nowrap; }
.wb-delta.good{ color:var(--lime); background:rgba(77,158,22,.12); }
.wb-delta.bad{ color:var(--coral); background:rgba(216,59,50,.12); }

/* sweep */
.wb-sweep{ margin-bottom:30px; }
.wb-sweep-controls{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px 12px; background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:14px 16px; margin-bottom:14px; }
.wb-chart{ background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:14px 10px 6px; height:360px; }
.wb-note{ margin-top:10px; font-size:13px; color:var(--txt-dim); }
.wb-note b{ color:var(--txt); }

@media (max-width:640px){
  .wb-grp-body{ grid-template-columns:1fr; }
  .wb-cell{ font-size:12px; }
}

/* ── OA additions ────────────────────────────────────────── */

/* Preset bar: category labels + OA colour accent */
.wb-presets-div{ color:var(--line); font-size:16px; margin:0 4px; }
.wb-preset-oa{ border-color:rgba(108,68,230,.35); }
.wb-preset-oa:hover{ border-color:var(--violet); color:var(--violet); }

/* Verified charge banner */
.wb-verified{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  font-size:12px; color:var(--txt-dim);
  background:rgba(77,158,22,.07); border:1px solid rgba(77,158,22,.25);
  border-radius:var(--border-radius-md,10px); padding:9px 13px;
  margin-bottom:16px;
}
.wb-verified-dot{
  width:7px; height:7px; border-radius:50%; background:var(--lime); flex:none;
}
.wb-verified b{ color:var(--txt); }
.wb-verified-src{ color:var(--txt-faint); font-size:11px; }
