/* Flash messages, alert boxes, lists, unread marks and the activity timeline. */
@layer components {
  .flash { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 500; }
  .flash--notice { background: var(--ok-soft); color: var(--ok-strong); }
  .flash--alert { background: var(--bad-soft); color: var(--bad-strong); }

  .alert-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn-strong); }
  .alert-box--bad { background: var(--bad-soft); color: var(--bad-strong); }
  .alert-box + .grid, .alert-box + .card { margin-top: 14px; }
  .alert-box--info { background: var(--info-soft); color: var(--info); }
  .alert-box .icon { margin-top: 2px; }

  .list { list-style: none; margin: 0; padding: 0; }
  .list li { padding: 10px 16px; border-bottom: 1px solid var(--line-2); display: flex; gap: 10px; align-items: flex-start; }
  .list li:last-child { border-bottom: 0; }
  .list .meta { font-size: 12px; color: var(--ink-3); }
  /* An item with its own buttons: on a phone the buttons go under the text */
  .list li:has(> .list__main) { flex-wrap: wrap; }
  .list__main { flex: 1 1 240px; min-width: 0; }
  .list li .form-actions { flex-shrink: 0; }
  .card__note { margin: 0; padding: 12px 16px 0; }
  .unread { background: var(--primary-soft); }
  .unread b::before {
    content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--primary);
    margin-right: 6px; vertical-align: 1px;
  }

  .timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
  .timeline li { position: relative; padding: 0 0 14px 12px; }
  .timeline li::before {
    content: ""; position: absolute; left: -21px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--primary);
  }

  /* The owner working as someone (T2.8): above everything in the app, impossible to miss */
  .impersonation-banner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
    padding: 8px 16px; background: var(--warn-soft); color: var(--warn-strong); font-weight: 600; border-bottom: 1px solid var(--line);
  }
  .impersonation-banner span { display: inline-flex; align-items: center; gap: 8px; }
}
