.dialog-head > div { min-width: 0; }
.dialog-head h2 { overflow-wrap: anywhere; }

.quote-row-actions {
  display: grid;
  grid-template-columns: auto auto;
  align-items: start;
  justify-items: end;
  max-width: 10.5rem;
}

.quote-row-quantity {
  grid-column: 1 / -1;
  text-align: end;
  white-space: normal;
  overflow-wrap: anywhere;
}

.quote-row-button, .quote-quantity-save {
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .3rem .55rem;
  background: var(--white);
  font-size: .875rem;
  line-height: 1.25;
}

.quote-row-button:enabled:hover { background: var(--soft-green); }
.quote-row-button:disabled { opacity: .55; }

.quote-quantity-editor {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  padding: .65rem;
  border-radius: 7px;
  background: #f3f5ef;
}

.quote-quantity-input {
  width: min(100%, 8rem);
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .35rem .55rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.quote-quantity-input[aria-invalid="true"] { border-color: #913b2c; }
.quote-quantity-save { border-color: var(--green); background: var(--green); color: var(--white); }
.quote-quantity-save:hover { background: var(--green-dark); }
.quote-quantity-error { flex-basis: 100%; color: #913b2c; font-size: .875rem; }
.quote-quantity-error:empty { display: none; }

@media (max-width: 540px) {
  .dialog-head h2 { font-size: clamp(1.15rem, 5vw, 1.55rem); }
  .quote-row { grid-template-columns: 56px minmax(0, 1fr); }
  .quote-row-actions {
    grid-column: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: .35rem;
    max-width: none;
  }
  .quote-row-quantity { width: 100%; text-align: start; }
  .quote-quantity-editor { grid-column: 1 / -1; }
}
