/* Tab "Eingang": the four stages of an order as rows; the current one bold, done ones dimmed with a tick. */

.zl-steps {
  margin: var(--space-3) 0 var(--space-1);
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ion-color-step-150, rgba(127, 127, 127, 0.3));
}
.zl-step {
  font-size: 14px;
  color: var(--ion-text-color, #000);
  border-bottom: 1px solid var(--ion-color-step-150, rgba(127, 127, 127, 0.3));
}
.zl-row {
  display: grid;
  grid-template-columns: 20px 112px 1fr;
  gap: var(--space-2);
  align-items: baseline;
  padding: var(--space-2) 0;
}
/* The current stage opens on a tap: the whole row is the target, the arrow turns when open. */
summary.zl-row {
  grid-template-columns: 20px 112px 1fr 16px;
  min-height: 44px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}
summary.zl-row::-webkit-details-marker {
  display: none;
}
summary.zl-row:focus-visible {
  outline: 2px solid var(--ion-color-primary);
  outline-offset: 2px;
  border-radius: 6px;
}
.zl-toggle {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.15s;
}
details[open] .zl-toggle {
  transform: rotate(90deg);
}
.zl-mark {
  text-align: center;
  font-weight: 700;
}
.zl-name {
  font-weight: 600;
}
.zl-summary {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* Done: still readable (contrast), only the weight and a tick say it is behind. */
.zl-step.done {
  color: var(--ion-color-step-600, #666);
}
.zl-step.done .zl-name {
  font-weight: 400;
}
.zl-step.current {
  font-weight: 700;
}
.zl-step.current .zl-mark {
  color: var(--tone-soon);
}
/* The current stage in its tone: overdue or costing money red, tipping soon orange. */
.zl-step.current.cost,
.zl-step.current.cost .zl-mark {
  color: var(--ion-color-danger);
}
.zl-step.current.soon .zl-summary {
  color: var(--tone-soon);
}
.zl-step.none,
.zl-step.skip,
.zl-step.later {
  color: var(--ion-color-step-600, #666);
}

.zl-detail {
  padding: 0 0 var(--space-3);
  font-weight: 400;
}

/* Search on top: small, it narrows the list by supplier, order or origin. */
ion-searchbar.zl-search {
  padding: var(--space-2) var(--space-3) 0;
}

/* Several orders of one supplier: the supplier once as a heading, the orders below it. */
.zl-group {
  margin: var(--space-2) 0 0;
}
/* The supplier's heading stays on top while its orders scroll by. */
.zl-group-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-3) 0 0;
  padding: var(--space-2) var(--space-4);
  background: var(--ion-background-color, #fff);
  border-bottom: 1px solid var(--ion-color-step-150, rgba(127, 127, 127, 0.3));
}
h3.zl-group-name {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--ion-text-color, #000);
}
p.zl-group-sub {
  margin: var(--space-hair) 0 0;
  font-size: 13px;
  color: var(--ion-text-color-step-350, var(--ion-color-step-650, #595959));
}
