/* The header and a product row, as the prototype draws them (A2.html .mahead and .prow); values are tokens. */
body {
  margin: 0;
  font-family: "Almarai", sans-serif;
  font-size: var(--font-size-sm);
  background-color: var(--app-bg);
  color: var(--app-ink);
}

.mahead {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: var(--spacing-sm);
  background-color: var(--app-surface);
  border-bottom: 1px solid var(--app-line);
}

.mahead .mt {
  flex: 1;
  text-align: center;
  font-size: var(--font-size-title);
  font-weight: 800;
  line-height: 1.3;
}

.mahead .mt small {
  display: block;
  font-size: var(--font-size-caption);
  color: var(--app-muted);
  font-weight: 700;
}

.rvlist {
  margin-top: var(--spacing-gap);
  background-color: var(--app-surface);
  border-block: 1px solid var(--app-line-strong);
}

.prow {
  display: flex;
  align-items: center;
  gap: var(--spacing-gap);
  min-height: 72px;
  padding: var(--spacing-gap) var(--spacing-row);
  border-bottom: 1px solid var(--app-line-strong);
}

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

.pthumb {
  position: relative;
  flex: none;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: var(--radius-thumb);
  background-color: var(--app-raise);
}

.pthumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stgn {
  position: absolute;
  inset-block-end: 3px;
  inset-inline-start: 3px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 var(--spacing-xs);
  border-radius: var(--radius-pill);
  background-color: var(--app-badge-bg);
  color: var(--app-badge-ink);
  font-size: var(--font-size-badge);
  font-weight: 800;
  line-height: 1;
}

.pw {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--spacing-xs);
  min-width: 0;
}

.pname {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: var(--font-size-sm);
  font-weight: 800;
  line-height: 1.45;
}

.pstage {
  overflow: hidden;
  font-size: var(--font-size-meta);
  color: var(--app-ink-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* the select: the prototype's, its arrow drawn from two gradients in the text colour; the one select look of the app,
   «دفعة جديدة» (screens/new_batch.js) and the age group at «الحقائق» (screens/review.js) */
.nb select,
.facts select,
.prowexp select,
.rtools select {
  appearance: none;
  width: 100%;
  min-height: 44px;
  padding-block: 0;
  padding-inline: var(--spacing-row) var(--spacing-xl);
  border: 1px solid var(--app-line-strong);
  border-radius: var(--radius-thumb);
  background-color: var(--app-surface);
  background-image: linear-gradient(45deg, transparent 50%, var(--app-ink-soft) 50%), linear-gradient(135deg, var(--app-ink-soft) 50%, transparent 50%);
  background-position: var(--spacing-md) center, calc(var(--spacing-md) + 6px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: var(--app-ink);
  font-family: inherit;
  font-size: var(--font-size-sm);
}

.nb select:focus,
.facts select:focus,
.prowexp select:focus,
.rtools select:focus {
  outline: none;
  border-color: var(--app-btn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-btn) 25%, transparent);
}

.nb select:disabled,
.facts select:disabled,
.prowexp select:disabled,
.rtools select:disabled {
  opacity: 0.55;
}
