.order-table .sheet-cell:has(> .row-drag-handle) > .sheet-input { padding-left: 40px; }
.row-drag-handle {
  position: absolute;
  z-index: 2;
  left: 5px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
  cursor: grab;
  touch-action: none;
}
.row-drag-handle:hover:not(:disabled), .row-drag-handle:focus-visible { color: var(--accent); background: var(--accent-wash); }
.row-drag-handle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.row-drag-handle:active { cursor: grabbing; }
.row-drag-handle:disabled { opacity: .35; cursor: default; }
.sheet-row-actions > .row-drag-handle { position: static; flex-shrink: 0; transform: none; }
.order-table .row-is-dragging > td { opacity: .55; }
.order-table .row-drop-before > td { box-shadow: inset 0 3px var(--accent); }
.order-table .row-drop-after > td { box-shadow: inset 0 -3px var(--accent); }
.order-table .row-drop-before > td:first-child::before,
.order-table .row-drop-after > td:first-child::after {
  position: absolute;
  left: 0;
  z-index: 3;
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: var(--accent);
  content: "";
}
.order-table .row-drop-before > td:first-child::before { top: -2px; }
.order-table .row-drop-after > td:first-child::after { bottom: -2px; }
@media (max-width: 760px) {
  .order-table .sheet-cell:has(> .row-drag-handle) { position: relative; }
}

/* Production values stay quiet until an editor works in a cell. */
#order-sheet .sheet-input:not(:disabled):not([aria-invalid="true"]):hover:not(:focus) {
  background-color: var(--paper);
  box-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
  #order-sheet select.sheet-input:not(:hover):not(:focus) { background-image: none; }
  #order-sheet input[type="date"].sheet-input:not(:hover):not(:focus)::-webkit-calendar-picker-indicator { opacity: 0; }
  #order-sheet input[type="number"].sheet-input:not(:hover):not(:focus) { -moz-appearance: textfield; }
  #order-sheet input[type="number"].sheet-input:not(:hover):not(:focus)::-webkit-inner-spin-button,
  #order-sheet input[type="number"].sheet-input:not(:hover):not(:focus)::-webkit-outer-spin-button { opacity: 0; }
}

#order-sheet .sheet-cell--actions,
#order-sheet .sheet-actions-heading { width: 76px; min-width: 76px; max-width: 76px; }
#order-sheet .sheet-row-actions { gap: 0; padding: 2px; }
#order-sheet .sheet-open-order,
#order-sheet .row-actions-button {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
}
#order-sheet .sheet-open-order:hover,
#order-sheet .row-actions-button:hover,
#order-sheet .row-actions-button[aria-expanded="true"] { color: var(--accent); background: var(--accent-wash); }
#order-sheet .sheet-open-order:focus-visible,
#order-sheet .row-actions-button:focus-visible { color: var(--accent); outline: 2px solid var(--focus-ring); outline-offset: -2px; }
#order-sheet .sheet-cell--actions:has(.row-drag-handle) { width: 104px; min-width: 104px; max-width: 104px; }

@media (max-width: 760px), (pointer: coarse) {
  #order-sheet .sheet-cell--actions,
  #order-sheet .sheet-actions-heading { width: 88px; min-width: 88px; max-width: 88px; }
  #order-sheet .sheet-row-actions { padding: 0; }
  #order-sheet .sheet-open-order,
  #order-sheet .row-actions-button { flex-basis: 44px; width: 44px; height: 44px; }
  #order-sheet .sheet-cell--actions:has(.row-drag-handle) { width: 116px; min-width: 116px; max-width: 116px; }
}
