.quantity-discount > * + * { margin-top: 14px; }
.quantity-controls, .quantity-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.quantity-discount [aria-selected="true"], .quantity-discount [aria-pressed="true"] {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}
.quantity-discount [hidden] { display: none; }
.quantity-discount dialog {
  width: min(840px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  border: 1px solid #d3dce8;
  border-radius: 10px;
  color: #182334;
  padding: 18px;
}
.quantity-discount dialog::backdrop { background: rgb(16 24 40 / 36%); }
.quantity-discount dialog h2 { margin: 0 0 12px; }
.quantity-discount input:not([type="radio"], [type="checkbox"]), .quantity-discount textarea {
  padding: 6px 8px;
  border: 1px solid #b8c5d6;
  border-radius: 4px;
  max-width: 100%;
}
.quantity-discount input[type="number"] { width: 78px; }
.quantity-discount fieldset {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d3dce8;
  border-radius: 5px;
}
.quantity-discount fieldset > * + *, .quantity-row + .quantity-row { margin-top: 8px; }
.quantity-editor-body {
  display: grid;
  gap: 12px;
  overflow: auto;
  max-height: calc(100dvh - 165px);
  padding: 3px 8px 6px 3px;
}
.quantity-footer, .quantity-pager { justify-content: flex-end; margin-top: 8px; }
.quantity-description textarea { display: block; width: 100%; margin-top: 5px; }
.quantity-picker-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quantity-picker-columns section { min-width: 0; }
.quantity-picker-scroll {
  height: min(35dvh, 320px);
  overflow: auto;
  padding: 8px;
  border: 1px solid #d3dce8;
  border-radius: 5px;
}
.quantity-pick-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
  gap: 6px;
  overflow-wrap: anywhere;
}
.quantity-table { overflow: auto; }
.quantity-table td { overflow-wrap: anywhere; }
.quantity-table td:nth-child(5) { min-width: 120px; max-width: 280px; white-space: pre-wrap; }
.quantity-tag { background: #fff1e8; color: #9a340e; border-radius: 4px; padding: 3px 7px; }
@media (max-width: 540px) {
  .quantity-discount dialog { padding: 12px; }
  .quantity-picker-columns { gap: 6px; }
}
