/* Production → Articles → the assortment editor (docs/05-views.md, "Assortment (editor)"; the
   mockup's "sortiment-neu"). */

.ph .eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.assortment-editor__count {
  margin: 0;
}

.assortment-editor__kinds {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

.assortment-editor__kinds legend {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

/* Only the chosen kind's part shows; both stay in the form, the server saves the chosen one. */
.assortment-editor:has(input[name="assortment[kind]"][value="rule"]:checked) .assortment-editor__fixed,
.assortment-editor:has(input[name="assortment[kind]"][value="fixed"]:checked) .assortment-editor__rule {
  display: none;
}

.assortment-editor__hint,
.assortment-editor__empty,
.assortment-editor__more {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.panel > .bd.assortment-editor__all {
  padding-top: 0;
}

.assortment-editor__rows {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

/* Subject, field, operator, value and remove on one line; on phones the value below the rest. An
   import row has no field: its field choice keeps its place, hidden, so the rows stay aligned. */
.assortment-editor__row {
  display: grid;
  grid-template-columns: max-content minmax(0, 2fr) 64px minmax(0, 2fr) auto;
  gap: 8px;
  align-items: center;
}

.assortment-editor__row:has(.assortment-editor__subject option[value="import"]:checked) .assortment-editor__field {
  visibility: hidden;
}

@container app (max-width: 599px) {
  .assortment-editor__row {
    grid-template-columns: max-content minmax(0, 1fr) 64px auto;
  }

  .assortment-editor__row input {
    grid-column: 1 / 4;
    grid-row: 2;
  }
}

.assortment-editor__row select,
.assortment-editor__row input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
}

.assortment-editor__row [aria-invalid="true"] {
  border-color: var(--red);
}

.assortment-editor__remove {
  width: 30px;
  padding: 0;
  justify-content: center;
}

.assortment-editor__search {
  max-width: none;
  margin-bottom: 12px;
}

.assortment-editor__subhead {
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.assortment-editor__picks {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.assortment-editor__picks label {
  display: flex;
  gap: 8px;
  align-items: baseline;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.assortment-editor__picks input {
  accent-color: var(--blue);
}

/* The live list's own .bd (it is not a direct child of the panel). */
.assortment-editor__matches > .bd {
  padding: 16px 20px;
}

.assortment-editor__matches > .bd.flush {
  padding: 0;
}

.assortment-editor__matches ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.articles__name a {
  color: inherit;
}
