
/* Last-cascade light theme: repair legacy fixed dark surfaces while preserving
   status semantics, selected commands, calculation logic and dark theme. */
body.wp-light {
  --wp-surface:#ffffff; --wp-surface-soft:#f4f7fb; --wp-surface-alt:#edf2f8;
  --wp-edge:#d2dde8; --wp-copy:#1c2939; --wp-copy-muted:#536477;
  --wp-choice:#e7f2fe;
}
body.wp-light :is(.ribbon,.ribbon-tools,.left-panel,.right-panel,.bottom-panel,.bottom-content,
  .calc-results-drawer,.calc-drawer-body,.calc-card,.calc-card-body,.calc-empty,.modal-box,.modal-body,
  .validation-modal-box,.validation-section,.validation-case-card,.southwire-card,.southwire-eq,
  .library-table-wrap,.library-editor-tabs,.validation-table-wrap,.validation-case-result>div,
  .southwire-values>div,.status-card,.calc-summary-card,.validation-kpi,.default-card,
  .validation-gallery,.library-modal-box) {
  background:var(--wp-surface)!important;
  color:var(--wp-copy)!important;
  border-color:var(--wp-edge)!important;
}
body.wp-light :is(.panel-header,.lib-cat,.bottom-tabs,.calc-drawer-head,.calc-card-head,.modal-head,
  .library-footer,.validation-case-head,.validation-table th,.library-table th,
  .validation-modal-box thead th,.calc-results-drawer thead th,.calc-results-drawer thead tr,
  .validation-modal-box thead tr,.calc-results-drawer .panel-header,.validation-modal-box .panel-header,
  .validation-modal-box .southwire-head,.calc-results-drawer .calc-card-head) {
  background:var(--wp-surface-soft)!important;
  color:var(--wp-copy)!important;
  border-color:var(--wp-edge)!important;
  text-shadow:none!important;
}
body.wp-light :is(.calc-results-drawer,.validation-modal-box,.modal-box,.library-modal-box,
  .calc-drawer-body,.modal-body) :is(h1,h2,h3,h4,h5,h6,b,strong,label,th,td,.calc-card-title,
  .calc-drawer-title,.calc-card-result,.validation-case-name,.validation-section h3,
  .southwire-head .name,.southwire-values b,.calc-kv .v,.modal-title) {
  color:var(--wp-copy)!important;
  text-shadow:none!important;
}
body.wp-light :is(.calc-results-drawer,.validation-modal-box,.modal-box,.library-modal-box)
  :is(.small,.muted,small,.note,.calc-kv .k,.calc-summary-card .small,.validation-ref,
  .validation-case-data,.validation-drawing-note,.southwire-inputs,.prop-label,.prop-group-label) {
  color:var(--wp-copy-muted)!important;
}
body.wp-light :is(.calc-results-drawer,.validation-modal-box,.modal-box,.library-modal-box)
 :is(input,select,textarea,.prop-input,.prop-select,.library-table input,.library-table select) {
  background:#fff!important;color:var(--wp-copy)!important;border-color:var(--wp-edge)!important;
  -webkit-text-fill-color:var(--wp-copy)!important;color-scheme:light!important;
}
body.wp-light :is(.calc-results-drawer,.validation-modal-box,.modal-box,.library-modal-box)
 :is(input,textarea)::placeholder {color:#718199!important;opacity:1!important}
body.wp-light :is(.calc-results-drawer,.validation-modal-box,.modal-box,.library-modal-box)
 :is(button,.prop-btn,.calc-btn,.calc-mini-btn,.library-secondary,.modal-close,.library-editor-tab) {
  background:#fff!important;color:var(--wp-copy)!important;border-color:var(--wp-edge)!important;
  text-shadow:none!important;
}
body.wp-light :is(.calc-results-drawer,.validation-modal-box,.modal-box,.library-modal-box)
 :is(button,.prop-btn,.calc-btn,.calc-mini-btn,.library-secondary,.modal-close,.library-editor-tab):hover {
  background:var(--wp-choice)!important;color:#175c99!important;border-color:#8bbce4!important;
}
/* Restore selected-state visuals after older generic light button overrides. */
body.wp-light .rtool.active,body.wp-light .ctool.active,
body.wp-light .angle-preset.active,body.wp-light .view-toggle .vtbtn.active,
body.wp-light .library-editor-tab.active,body.wp-light .dirbtn.active,
body.wp-light .library-primary,body.wp-light .btab.active {
  background:#e2f0ff!important;color:#175c99!important;border-color:#5c9bd0!important;
}
body.wp-light .library-primary,body.wp-light .dirbtn.active,body.wp-light .view-toggle .vtbtn.active,
body.wp-light .library-editor-tab.active{background:#236aa6!important;color:#fff!important}
body.wp-light .calc-results-drawer [onclick*="setRouteDirView"][style*="background:var(--blue)"],
body.wp-light .calc-results-drawer [onclick*="setRouteDirView"][style*="background: var(--blue)"]{
  background:#236aa6!important;color:#fff!important;border-color:#236aa6!important;
}
body.wp-light :is(.calc-results-drawer,.validation-modal-box,.modal-box)
 [style*="background:#121b24"],
body.wp-light :is(.calc-results-drawer,.validation-modal-box,.modal-box)
 [style*="background:#1d2a36"],
body.wp-light :is(.calc-results-drawer,.validation-modal-box,.modal-box)
 [style*="background:#17222d"]{
  background:var(--wp-surface)!important;color:var(--wp-copy)!important;
}
body.wp-light .calc-results-drawer table :is(th,td),
body.wp-light .validation-table :is(th,td),
body.wp-light .library-table :is(th,td){border-color:var(--wp-edge)!important;color:var(--wp-copy)!important}
body.wp-light :is(.validation-table,.library-table) tbody tr:nth-child(even) td{background:#f7fafd!important}
body.wp-light :is(.validation-table,.library-table) tbody tr:hover td{background:#edf5fd!important}
body.wp-light .report-page,body.wp-light .report-page :is(h1,h2,h3,th,td){color:#17283b!important}
body.wp-light .report-page{background:#fff!important}
body.wp-light .report-page th{background:#ecf2f8!important}
body.wp-light .report-note{background:#fff8e8!important;color:#5c481e!important}
body.wp-light .validation-pass,body.wp-light .pill.ok{color:#237748!important}
body.wp-light .validation-fail,body.wp-light .pill.err{color:#c33535!important}
body.wp-light .validation-info,body.wp-light .pill.warn{color:#956000!important}
body.wp-light .pill.ok{background:#e7f5e9!important}body.wp-light .pill.err{background:#fdeaea!important}
body.wp-light .pill.warn{background:#fff1d1!important}
body.wp-light .southwire-head .id,body.wp-light .calc-summary-card .big,
body.wp-light .validation-kpi .v,body.wp-light .calc-card-result{color:#216db0!important}
body.wp-light .ux-panel-toggle{background:#fff!important;color:#35475b!important}
body.wp-light #cr-themebtn{background:#1b436e!important;color:#fff!important;border-color:#4b7299!important}
body.wp-light #cr-themebtn:hover{background:#256096!important}
body.wp-light .canvas-hint{background:rgba(28,47,70,.87)!important;color:#fff!important}
body.wp-light .conn-pending{background:#236aa6!important;color:#fff!important}
body.wp-light .canvas-footer-brand{background:rgba(255,255,255,.92)!important;color:#44566a!important}
body.wp-light .ux-mode-indicator{background:rgba(255,255,255,.96)!important;color:#36475b!important}
body.wp-light .ux-mode-indicator b{color:#216db0!important}
body.wp-light .ribbon-tabs{background:#e9eef5!important}
body.wp-light .rtab.active{background:#f7f9fc!important;color:#216db0!important}
body.wp-light .rtool.active{background:#e2f0ff!important;color:#175c99!important}
/* Inline canvas title/footer and view overlays should follow the chosen mode. */
body.wp-light .nav-hint,body.wp-light .view3d-badge,body.wp-light .grid-coords,
body.wp-light .canvas-toolbar,body.wp-light .view-toggle{
  background:rgba(255,255,255,.96)!important;color:#33475d!important;border-color:var(--wp-edge)!important;
}
@media print{body.wp-light .report-page,body.wp-light .report-page *{background-color:#fff;color:#111}}
