/**
 * DadaStyle Operations Manager — shared compact controls.
 */
.dom-quantity-control {
  display: inline-grid;
  grid-template-columns: 36px minmax(36px, auto) 36px;
  align-items: center;
  min-height: 38px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid var(--dom-color-border-strong);
  border-radius: var(--dom-radius-pill);
  background: var(--dom-color-surface);
}

.dom-quantity-control__button,
.dom-quantity-control > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.dom-quantity-control__button:hover:not(:disabled),
.dom-quantity-control__button:focus-visible:not(:disabled),
.dom-quantity-control > button:hover:not(:disabled),
.dom-quantity-control > button:focus-visible:not(:disabled) {
  background: var(--dom-color-surface-muted);
  color: var(--dom-color-text-strong);
  outline: none;
}

.dom-quantity-control__button:disabled,
.dom-quantity-control > button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.dom-quantity-control__value,
.dom-quantity-control > span {
  min-width: 36px;
  padding: 0 var(--dom-space-1);
  color: var(--dom-color-text-strong);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.dom-control-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: var(--dom-space-3);
}

/* Shared operator glyphs use SVG geometry, not font metrics. */
.dom-quantity-control__icon {
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* Compact QuantityStepper modifier for dense operational cards. */
.dom-quantity-control--compact {
  --dom-quantity-stepper-column-size: 30px;
  display: inline-grid;
  grid-template-columns: repeat(3, var(--dom-quantity-stepper-column-size));
  grid-template-rows: 28px;
  align-items: center;
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  overflow: hidden;
}

.dom-quantity-control--compact .dom-quantity-control__button,
.dom-quantity-control--compact > button {
  width: var(--dom-quantity-stepper-column-size);
  min-width: var(--dom-quantity-stepper-column-size);
  max-width: var(--dom-quantity-stepper-column-size);
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  padding: 0;
}

.dom-quantity-control--compact .dom-quantity-control__value,
.dom-quantity-control--compact > span {
  width: var(--dom-quantity-stepper-column-size);
  min-width: var(--dom-quantity-stepper-column-size);
  max-width: var(--dom-quantity-stepper-column-size);
  padding: 0;
  font-size: 12px;
}

/* Opt-in editable QuantityStepper center; legacy read-only centers are unchanged. */
.dom-quantity-control > input.dom-quantity-control__input {
  appearance:textfield;
  width:100%; min-width:0; max-width:100%; height:100%; min-height:0;
  padding:0 2px; margin:0; border:0; border-radius:0; box-shadow:none;
  background:transparent; color:var(--dom-color-text-strong); font:inherit;
  font-size:16px; font-weight:600; line-height:1.2; text-align:center;
}
.dom-quantity-control__input::-webkit-inner-spin-button,
.dom-quantity-control__input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.dom-quantity-control__input:focus-visible { outline:2px solid var(--dom-color-accent); outline-offset:-3px; }

/* v0.9.9.10 — shared file input control. Native file chrome is hidden behind
 * a stable DOM surface while the real input preserves browser file picking. */
.dom-file-control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border-radius: var(--dom-radius-control, 9px);
}

.dom-file-control__input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.dom-file-control__surface {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid var(--dom-color-border-strong, #cbd5e1);
  border-radius: inherit;
  background: var(--dom-color-surface, #fff);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.dom-file-control__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-right: 1px solid var(--dom-color-border, #e2e8f0);
  background: var(--dom-color-accent-soft, #fff1f7);
  color: var(--dom-color-accent, #df2377);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.dom-file-control__name {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 9px 12px;
  overflow: hidden;
  color: var(--dom-color-text-muted, #64748b);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dom-file-control.has-file .dom-file-control__name {
  color: var(--dom-color-text, #334155);
  font-weight: 600;
}

.dom-file-control:hover .dom-file-control__surface {
  border-color: var(--dom-color-accent-border, #efa0c1);
  background: var(--dom-color-surface-subtle, #f8fafc);
}

.dom-file-control:focus-within .dom-file-control__surface {
  border-color: var(--dom-color-accent, #df2377);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dom-color-accent, #df2377) 14%, transparent);
}

@media (max-width: 480px) {
  .dom-file-control__surface {
    grid-template-columns: 1fr;
  }

  .dom-file-control__action {
    border-right: 0;
    border-bottom: 1px solid var(--dom-color-border, #e2e8f0);
  }
}
