/* Assessment inspector → Review tab. */

.review-ingredients {
  container: review / inline-size;
}

/* Reading copy and fields use the pane's full width here. */
.review-tab .ui-paragraph {
  max-width: none;
}

.review-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.review-toolbar > * {
  flex-wrap: wrap;
}

.review-row__name {
  min-width: 7rem;
}

/* The catalog badge sits in its own column, or under the name when narrow. */
.review-row__badge {
  display: none;
  margin-top: 2px;
}
@container review (max-width: 600px) {
  .review-col-status {
    display: none;
  }
  .review-row__badge {
    display: block;
  }
}

.review-row__verdict {
  width: 1%;
  white-space: nowrap;
}

/* One control, four segments. Each segment is a light tint of its colour
   until pressed, then the full colour. */
.verdict-seg {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border-outer);
  border-radius: var(--radius-sm);
  overflow: hidden;
  vertical-align: middle;
}

.verdict-seg__btn {
  --c: var(--success);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 3px 9px;
  border: 0;
  border-left: 1px solid color-mix(in srgb, var(--c) 30%, var(--border-outer));
  background: color-mix(in srgb, var(--c) 10%, var(--bg-elevated));
  color: color-mix(in srgb, var(--c) 75%, var(--text));
  font: inherit;
  font-size: 0.75rem;
  line-height: 1rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.verdict-seg__btn:first-child {
  border-left: 0;
}
.verdict-seg__btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--c) 22%, var(--bg-elevated));
}
.verdict-seg__btn:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: -2px;
}
.verdict-seg__btn[aria-pressed="true"] {
  background: var(--c);
  color: #fff;
  font-weight: 600;
}
.verdict-seg__btn:disabled {
  cursor: default;
}
.verdict-seg__btn:disabled:not([aria-pressed="true"]) {
  opacity: 0.45;
}
/* Assist's proposal: outlined in its colour until accepted. */
.verdict-seg__btn[data-proposed="true"]:not([aria-pressed="true"]) {
  box-shadow: inset 0 0 0 2px var(--c);
}

.verdict-seg__btn--approve {
  --c: var(--success);
}
.verdict-seg__btn--clarify {
  --c: var(--caution);
}
.verdict-seg__btn--reject {
  --c: var(--danger);
}
.verdict-seg__btn--remove {
  --c: #64748b;
}

.verdict-seg__icon {
  display: none;
}

/* Narrow pane: icons only. */
@container review (max-width: 760px) {
  .verdict-seg__label {
    display: none;
  }
  .verdict-seg__icon {
    display: inline-flex;
  }
  .verdict-seg__btn {
    padding: 4px 8px;
  }
}

/* Document thumbnails (the Certificates-tab thumb, smaller). */
.review-docs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.review-doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: calc(var(--u) * 22);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.review-doc__thumb.cert-doc-card__thumb {
  width: calc(var(--u) * 22);
  height: calc(var(--u) * 28);
}
.review-doc:hover .review-doc__thumb,
.review-doc:focus-visible .review-doc__thumb {
  border-color: var(--accent);
}
.review-doc__name {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}
