/* The review row beyond the 001 list (components/row.js; styles/app.css has the thumbnail, the name and the line): the row
   item that holds the opened body, the group and supplier line, the warning mark, the chevron and the sent-back line.
   Every value is a token. */
.pitem {
  border-bottom: 1px solid var(--app-line-strong);
}

.pitem:last-child {
  border-bottom: 0;
}

.pitem > .prow {
  border-bottom: 0;
  cursor: pointer;
}

.pmeta {
  display: flex;
  align-items: center;
  overflow: hidden;
  font-size: var(--font-size-meta);
  color: var(--app-ink-soft);
  white-space: nowrap;
}

.pmeta bdi {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the checkpoint's own line may take two lines; a line with something on it is the note colour, no box round it */
.pitem .pstage {
  white-space: normal;
}

.pitem .pstage.warn {
  color: var(--app-note-ink);
  font-weight: 700;
}

.prisk,
.prow [data-part="chevron"] {
  display: grid;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
}

.prisk {
  color: var(--app-note-ink);
}

.prow [data-part="chevron"] {
  color: var(--app-muted);
}

/* the box that ticks a row: a checkbox of its own, a tap target of 44 px that leans into the row's margin */
.prow .rck {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-inline-start: calc(-1 * var(--spacing-sm));
  padding: 0;
  border: 0;
  background-color: transparent;
  color: var(--app-ink);
  cursor: pointer;
}

.rckbox {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--app-muted);
  border-radius: var(--radius-sm);
  background-color: var(--app-surface);
}

.rckbox svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  stroke-width: 3;
}

.prow .rck[aria-checked="true"] .rckbox {
  border-color: var(--app-btn);
  background-color: var(--app-btn);
  color: var(--app-btn-ink);
}

.prow .rck[aria-checked="true"] .rckbox svg {
  opacity: 1;
}

.pitem svg path {
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prow [data-part="chevron"] svg {
  width: 20px;
  height: 20px;
  transform: rotate(-90deg); /* closed: down */
}

.pitem.open > .prow [data-part="chevron"] svg {
  transform: rotate(90deg); /* open: up */
}

/* «أُعيد من «…»: …»: a note box inset from the row above and from the body under it, never touching their text */
.retb {
  margin: 0 var(--spacing-md) var(--spacing-gap);
  padding: var(--spacing-sm) var(--spacing-row);
  border-radius: var(--radius-md);
  background-color: var(--app-note-bg);
  color: var(--app-note-ink);
  font-size: var(--font-size-meta);
  line-height: 1.7;
}

.prowexp {
  border-top: 1px solid var(--app-line-strong);
  background-color: var(--app-surface);
}
