/* Consistent alignment for Product Catalog category and location forms. */
#catalog-categories .management-card,
#catalog-locations > .card {
  max-width: 1120px;
  padding: 24px;
}

#catalog-categories #categoryFormDedicated {
  display: grid;
  grid-template-columns: minmax(0, 480px) auto;
  align-items: end;
  gap: 16px;
  max-width: 680px;
}

#catalog-locations #locationForm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, .75fr) minmax(0, 1.2fr) auto;
  align-items: end;
  gap: 14px;
}

#catalog-categories #categoryFormDedicated label,
#catalog-locations #locationForm label {
  min-width: 0;
  margin: 0;
}

#catalog-categories #categoryFormDedicated button,
#catalog-locations #locationForm button {
  min-height: 42px;
  margin: 0;
  padding-inline: 18px;
  white-space: nowrap;
}

#catalog-locations #locationForm button {
  min-width: 160px;
}

#catalog-categories #categoryDedicatedMessage,
#catalog-locations #locationMessage {
  margin-top: 14px;
}

#catalog-categories #categoryDedicatedList,
#catalog-locations #locationsList {
  margin-top: 20px;
  overflow-x: auto;
}

@media (max-width: 1050px) {
  #catalog-locations #locationForm {
    grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  }

  #catalog-locations #locationForm label:nth-child(3),
  #catalog-locations #locationForm button {
    grid-column: 1 / -1;
  }

  #catalog-locations #locationForm button {
    justify-self: end;
  }
}

@media (max-width: 700px) {
  #catalog-categories .management-card,
  #catalog-locations > .card {
    padding: 18px;
  }

  #catalog-categories #categoryFormDedicated,
  #catalog-locations #locationForm {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    max-width: none;
  }

  #catalog-categories #categoryFormDedicated button,
  #catalog-locations #locationForm button {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
  }
}
