/* v0.77.4 — keep supplier-credit allocations contained within their panel. */
.credit-allocation-panel.credit-allocation-workspace {
  box-sizing: border-box;
  container-name: credit-allocation;
  container-type: inline-size;
  min-width: 0;
  max-width: 100%;
}

.credit-allocation-workspace #creditAllocationRows,
.credit-allocation-workspace .allocation-row,
.credit-allocation-workspace .allocation-row > label {
  min-width: 0;
}

.credit-allocation-workspace .allocation-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  width: 100%;
  box-sizing: border-box;
}

.credit-allocation-workspace .allocation-row > label:first-child {
  grid-column: 1 / -1;
}

.credit-allocation-workspace .allocation-row > label:nth-child(5) {
  grid-column: 1 / 3;
}

.credit-allocation-workspace .allocation-row > .remove-allocation {
  grid-column: 3;
  align-self: end;
  justify-self: end;
}

.credit-allocation-workspace .allocation-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@container credit-allocation (min-width: 840px) {
  .credit-allocation-workspace .allocation-row {
    grid-template-columns: minmax(180px, 1.1fr) 110px 125px 125px 125px auto !important;
  }

  .credit-allocation-workspace .allocation-row > label:first-child,
  .credit-allocation-workspace .allocation-row > label:nth-child(5),
  .credit-allocation-workspace .allocation-row > .remove-allocation {
    grid-column: auto;
  }
}

@container credit-allocation (max-width: 430px) {
  .credit-allocation-workspace .allocation-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .credit-allocation-workspace .allocation-row > label:nth-child(5) {
    grid-column: auto;
  }

  .credit-allocation-workspace .allocation-row > .remove-allocation {
    grid-column: 2;
  }
}

@container credit-allocation (max-width: 340px) {
  .credit-allocation-workspace .allocation-row {
    grid-template-columns: 1fr !important;
  }

  .credit-allocation-workspace .allocation-row > label,
  .credit-allocation-workspace .allocation-row > .remove-allocation {
    grid-column: 1 / -1 !important;
  }

  .credit-allocation-workspace .allocation-row > .remove-allocation {
    width: 100%;
  }
}

.sales-department-filter {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: .35rem 0 .65rem;
}

.sales-department-filter > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sales-department-tabs {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.sales-department-tabs button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.product-settings-head {
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.product-settings-head > div {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#salesProductStatus {
  min-height: 1.2em;
  font-weight: 700;
}

@media (max-width: 700px) {
  .sales-department-filter {
    align-items: flex-start;
    flex-direction: column;
    gap: .3rem;
  }

  .sales-department-tabs {
    width: 100%;
  }

  .product-settings-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
