/* Catalog filters: keep every control on the same baseline and height. */
html body .catalog-tools {
  grid-template-columns: minmax(0, 1fr) 190px 190px auto;
  align-items: center;
}

html body .catalog-tools > label {
  display: flex;
  align-items: center;
  align-self: center;
  min-width: 0;
  height: 42px;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

html body .catalog-tools > label > select,
html body .catalog-tools > label > input[type="search"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  margin: 0 !important;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 20px;
}

html body .catalog-tools > .creator-label,
html body .catalog-tools > .sort-label {
  width: 190px;
  flex: 0 0 190px;
}

html body .catalog-tools > .sort-label > select,
html body .catalog-tools > .creator-label > select {
  padding-left: 12px;
  padding-right: 36px;
}

/* The sort control must use the same centered picker icon as the creator control. */
@supports (appearance: base-select) {
  html body .catalog-tools > .sort-label > select {
    display: flex;
    align-items: center;
    gap: 12px;
    background-image: none;
  }

  html body .catalog-tools > .sort-label > select::picker-icon {
    display: block;
    flex: 0 0 16px;
    align-self: center;
    width: 16px;
    height: 16px;
    margin: 0 0 0 auto;
    padding: 0;
    line-height: 1;
    rotate: none;
    transform: none;
  }
}

html body .catalog-tools > .checkbox-label {
  height: 42px;
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  html body .catalog-tools {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  html body .catalog-tools > .creator-label,
  html body .catalog-tools > .sort-label {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
  }
}

@media (max-width: 760px) {
  html body .catalog-tools > .search-label {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  html body .catalog-tools > label,
  html body .catalog-tools > .checkbox-label {
    height: 38px;
    min-height: 38px;
  }

  html body .catalog-tools > label > select,
  html body .catalog-tools > label > input[type="search"] {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
  }
}
