/* R66.271 Stage26 — live regression closure for BUG-009/014/016/019/024. */

/* BUG-009: the expanded previous-order chooser owns its paint/hit-test layer.
 * The table/search/radio must not be visually painted over later form sections. */
body.ps-stage66-pcb-order-page .ps-pcb-order-reference[data-ps-pcb-runtime="r66.28"]
.ps-reference-past-orders-compact[open]{
  position:relative!important;z-index:30!important;isolation:isolate!important;
  overflow:visible!important;pointer-events:auto!important;
}
body.ps-stage66-pcb-order-page .ps-pcb-order-reference[data-ps-pcb-runtime="r66.28"]
.ps-reference-past-orders-compact[open] :is(.ps-reference-past-orders-body,.ps-reference-searchbar,.ps-repeat-orders-table,.ps-repeat-orders-table table,.ps-repeat-orders-table tbody,.ps-repeat-orders-table tr,.ps-repeat-orders-table td){
  position:relative!important;z-index:1!important;pointer-events:auto!important;
}
body.ps-stage66-pcb-order-page .ps-pcb-order-reference[data-ps-pcb-runtime="r66.28"]
.ps-reference-past-orders-compact[open] :is(input[data-ps-repeat-search],input[data-ps-repeat-select],button[data-ps-repeat-copy-current]){
  position:relative!important;z-index:3!important;pointer-events:auto!important;touch-action:manipulation!important;
}
body.ps-stage66-pcb-order-page .ps-pcb-order-reference[data-ps-pcb-runtime="r66.28"]
.ps-repeat-orders-table input[data-ps-repeat-select]{
  appearance:auto!important;-webkit-appearance:radio!important;opacity:1!important;visibility:visible!important;
  width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;
}

/* BUG-016: outrank the legacy R66.202 desktop 2+1 owner and keep all three
 * Assembly choices in one balanced row. */
@media (min-width:901px){
  body.ps-stage66-pcb-order-page .ps-pcb-order-reference[data-ps-pcb-runtime="r66.28"].ps-has-assembly-order
  .ps-pcb-field-grid--assembly>.ps-pcb-choice-field[data-ps-choice-count="3"]>.ps-pcb-inline-choices{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-flow:row!important;
    gap:8px!important;width:min(100%,760px)!important;max-width:760px!important;
  }
  body.ps-stage66-pcb-order-page .ps-pcb-order-reference[data-ps-pcb-runtime="r66.28"].ps-has-assembly-order
  .ps-pcb-field-grid--assembly>.ps-pcb-choice-field[data-ps-choice-count="3"]>.ps-pcb-inline-choices>.ps-pcb-inline-choice,
  body.ps-stage66-pcb-order-page .ps-pcb-order-reference[data-ps-pcb-runtime="r66.28"].ps-has-assembly-order
  .ps-pcb-field-grid--assembly>.ps-pcb-choice-field[data-ps-choice-count="3"]>.ps-pcb-inline-choices>.ps-pcb-inline-choice:last-child{
    grid-column:auto!important;width:100%!important;max-width:none!important;min-width:0!important;
  }
}

/* BUG-019: the audited production owner used a 46px fixed block-size. Provide
 * a real multi-line edit area for PCB/Assembly and Stencil, while preserving
 * vertical resize and responsive width. */
body.ps-stage66-pcb-order-page .ps-pcb-order-reference[data-ps-pcb-runtime="r66.28"] :is(
  [data-ps-field="notes"] textarea[name="notes"],
  [data-ps-field="stencil_notes"] textarea[name="stencil_notes"]
){
  display:block!important;width:100%!important;max-width:100%!important;
  height:132px!important;min-height:132px!important;max-height:none!important;
  min-block-size:132px!important;max-block-size:none!important;
  resize:vertical!important;box-sizing:border-box!important;
}

/* BUG-014/024: no-result dependent actions look and behave disabled. */
[data-ps-copy-all-codes]:disabled,[data-ps-copy-all-codes][aria-disabled="true"]{
  opacity:.52!important;cursor:not-allowed!important;pointer-events:none!important;
}
