/* Drop groups. The count control is one row: minus, count, plus. */

.qty-input-wrap > .qty-step-btn[aria-label="Decrease quantity"] {
  order: 1;
  border-right: none;
  border-left: 1px solid var(--border, #ccc);
  border-radius: 8px 0 0 8px;
}

.qty-input-wrap > .qty-input {
  order: 2;
}

.qty-input-wrap > .qty-step-btn[aria-label="Increase quantity"] {
  order: 3;
  border-left: none;
  border-right: 1px solid var(--border, #ccc);
  border-radius: 0 8px 8px 0;
}

.drop-group-card {
  display: grid;
  gap: 0.65rem;
  margin: 0.55rem 0;
  padding: 0.75rem;
  border: 1px solid var(--border, #d5d8de);
  border-radius: 10px;
  background: var(--surface, #fff);
}

.drop-group-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.drop-group-label {
  flex: 1;
  min-width: 0;
}

.drop-group-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  max-width: 100%;
  min-width: 0;
}

.drop-group-main > .field {
  flex: 1 1 9rem;
  min-width: 0;
  max-width: 100%;
}

.basic-net-sheet,
.drop-group-card,
.chip-row {
  max-width: 100%;
  min-width: 0;
}

.chip-row {
  flex-wrap: wrap;
}

.drop-group-more {
  margin-top: 0.15rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border, #d5d8de);
}

.drop-group-note {
  margin: 0;
  color: var(--muted, #5a6a7a);
  font-size: 0.92rem;
}

.drop-group-totals {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--surface, #fff);
}

.basic-net-sheet > .field {
  margin-top: 0.85rem;
}

/* 360–414px: the count row is minus, count, plus, each target 44px, and the plus stays on screen. */
@media (max-width: 414px) {
  .drop-group-main {
    flex-direction: column;
    align-items: stretch;
  }

  .drop-group-main > .field {
    flex: 1 1 auto;
    width: 100%;
  }

  .qty-input-wrap,
  .drop-group-stepper,
  .add-drop-card .qty-input-wrap,
  .quote-table .qty-input-wrap,
  .basic-net-sheet .qty-input-wrap {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
  }

  .qty-input-wrap > .qty-step-btn,
  .drop-group-stepper > .qty-step-btn,
  .basic-net-sheet .qty-input-wrap > .qty-step-btn,
  .add-drop-card .qty-input-wrap > .qty-step-btn,
  .quote-table .qty-input-wrap > .qty-step-btn {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    box-sizing: border-box;
  }

  .qty-input-wrap > .qty-input,
  .drop-group-stepper > .qty-input,
  .basic-net-sheet .qty-input-wrap > .qty-input,
  .add-drop-card .qty-input-wrap > .qty-input,
  .quote-table .qty-input-wrap > .qty-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
  }
}
