/* s458 (Area 4): the shared trash view (saf-dashboard-trash.js).
 * Every rule is scoped to the dashboard body, like the kit's own sheet. */

/* The live list steps aside by class while the trash shows. !important on
 * purpose: the nodes it hides carry display rules of their own (the shared
 * bar is a flex row, a scaffold a block) and the tab may toggle [hidden] on
 * them at any time; this class must win over both, and it is the only
 * declaration this class ever makes. */
body.saf-dash-active .saf-dash__body .saf-dash-trash--aside {
  display: none !important;
}

body.saf-dash-active .saf-dash__body .saf-dash-trash__toggle-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.5rem;
}
body.saf-dash-active .saf-dash__body .saf-dash-trash__toggle[aria-pressed="true"] {
  background: var(--saf-dash-ink, #1f2430);
  border-color: var(--saf-dash-ink, #1f2430);
  color: #fff;
}

body.saf-dash-active .saf-dash__body .saf-dash-trash__panel {
  display: block;
}
/* Restated beside the rule that gives the panel a display (css-cascade rule 1). */
body.saf-dash-active .saf-dash__body .saf-dash-trash__panel[hidden] {
  display: none;
}
body.saf-dash-active .saf-dash__body .saf-dash-trash__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
body.saf-dash-active .saf-dash__body .saf-dash-trash__hint {
  margin: 0 0 0.75rem;
  color: var(--saf-dash-muted, #5b6170);
}
body.saf-dash-active .saf-dash__body .saf-dash-trash__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
body.saf-dash-active .saf-dash__body .saf-dash-trash__back {
  margin-top: 0.75rem;
}

body.saf-dash-active .saf-dash__body .saf-dash-trash--empty {
  display: none;
}

/* Phone: each trashed record is a card (name, when, earlier status, then the two
 * buttons full width), so Restore and Delete permanently never sit behind a
 * sideways scroll. Labels come from each cell's data-label. */
@media (max-width: 600px) {
  body.saf-dash-active .saf-dash__body .saf-dash-trash__table {
    display: block;
    min-width: 0;
    width: 100%;
  }
  body.saf-dash-active .saf-dash__body .saf-dash-trash__table thead {
    display: none;
  }
  body.saf-dash-active .saf-dash__body .saf-dash-trash__table :is(tbody, tr, td) {
    display: block;
  }
  body.saf-dash-active .saf-dash__body .saf-dash-trash__table tr {
    border: 1px solid var(--saf-dash-border, #d8d2c4);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
  body.saf-dash-active .saf-dash__body .saf-dash-trash__table td {
    border: none;
    padding: 0.25rem 0;
    overflow-wrap: anywhere;
  }
  body.saf-dash-active .saf-dash__body .saf-dash-trash__table td:not(:last-child)::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--saf-dash-muted, #5b6170);
  }
  body.saf-dash-active .saf-dash__body .saf-dash-trash__table td:empty {
    display: none;
  }
  body.saf-dash-active .saf-dash__body .saf-dash-trash__toggle-row {
    justify-content: flex-start;
  }
  body.saf-dash-active .saf-dash__body .saf-dash-trash__actions .saf-dash-button {
    flex: 1 1 100%;
  }
}
