/* orderguard.css -- Order Safety phase 2 (11-15-2026): the Order Check window + the layer-card chips.
   Uses builder-b.css tokens (--acc, --line, --text, --muted, --f-d). EL spacing rule: nothing touches, text wraps inside
   its box, every row and button keeps a gap; the window scrolls inside itself on short screens (960x620). */
.ogchip{display:inline-flex;align-items:center;margin-left:6px;padding:1px 7px;border-radius:999px;font-size:10.5px;
  font-weight:800;letter-spacing:.04em;line-height:1.5;border:1px solid currentColor;white-space:nowrap;cursor:help}
.ogchip.err{color:#ff6b6b;background:rgba(255,80,80,.10)}
.ogchip.fix{color:#ffc04d;background:rgba(255,190,60,.10)}
.ogchip.warn{color:#9fd8ff;background:rgba(120,200,255,.08)}
/* phase 2 (11-15): edge overlap = the customer's choice */
.ogchip.over{color:#ffb23e;background:rgba(255,170,40,.14)}
.ogchip.kept{color:#8fe3b0;background:rgba(120,230,170,.08)}
.ogover{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:2px 0 10px;padding:8px 10px;border-radius:10px;
  border:1px solid rgba(255,170,40,.55);background:rgba(255,170,40,.08);min-width:0}
.ogover.kept{border-color:rgba(120,230,170,.35);background:rgba(120,230,170,.05)}
.ogover-t{flex:1 1 180px;min-width:0;font-size:12px;line-height:1.4;color:var(--text,#f4f2ff);overflow-wrap:anywhere}
.ogover-b{display:flex;flex-wrap:wrap;gap:6px}
.ogm-sec.over{border-color:rgba(255,170,40,.5);background:rgba(255,170,40,.06)}
.ogm-sec.over h4{color:#ffb23e}
.ogm-sec.kept h4{color:#8fe3b0}
.ogm-btns{flex:none;display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.ognote{margin:6px 0 2px;padding:5px 8px;border-radius:8px;font-size:11.5px;line-height:1.35;color:var(--muted,#bdb8d9);
  background:rgba(255,255,255,.04);border:1px solid var(--line,rgba(255,255,255,.13));overflow-wrap:anywhere}

.ogm .ogm-box{max-width:640px;width:100%;max-height:calc(100vh - 48px);overflow:auto;display:flex;flex-direction:column;gap:12px}
.ogm .modalh{margin-bottom:0;gap:12px}
.ogm-sub{margin:0;font-size:14px;line-height:1.45;color:var(--text,#f4f2ff);overflow-wrap:anywhere}
.ogm-sec{display:flex;flex-direction:column;gap:8px;padding:10px;border-radius:12px;border:1px solid var(--line,rgba(255,255,255,.13));
  background:rgba(255,255,255,.03)}
.ogm-sec h4{margin:0 0 2px;font-family:var(--f-d,inherit);font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:#7ff0b0}
.ogm-sec.err{border-color:rgba(255,90,90,.45);background:rgba(255,70,70,.06)}
.ogm-sec.err h4{color:#ff7b7b}
.ogm-sec.warn h4{color:#9fd8ff}
.ogm-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:9px;background:rgba(0,0,0,.22);min-width:0}
.ogm-body{flex:none;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.05em;
  border:1px solid var(--line,rgba(255,255,255,.13))}
.ogm-body.m{color:#8fc8ff}
.ogm-body.f{color:#ff9fd4}
.ogm-txt{flex:1;min-width:0;font-size:13px;line-height:1.4;color:var(--text,#f4f2ff);overflow-wrap:anywhere}
.ogm-txt b{font-weight:700}
.ogm-row .btn{flex:none}
.ogm-act{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;padding-top:2px}
.ogm-act .btn{min-width:0}
.ogm-act .btn.primary[disabled]{opacity:.45;cursor:not-allowed}
@media (max-width:560px){
  .ogm-btns{flex:1 1 100%;justify-content:flex-start}
  .ogm-row{flex-wrap:wrap}
  .ogm-act .btn{flex:1 1 100%}
}
