/* Flash messages, and a form's list of errors. */

@layer components {
  .flash {
    max-width: var(--page);
    margin: 1rem auto 0;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-box);
    border: 2px solid var(--ink);
    font-weight: 600;

    &.notice {
      background: var(--paper);

      &::before { content: "☕ "; }
    }
    &.success {
      background: #e3f4ea;
      border-color: var(--ok);
      color: #0f4a31;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;

      > div::before { content: "☕ "; }
    }
    &.alert {
      background: #fff0f2;
      border-color: var(--alert);
      color: #8a1324;
    }
  }
  .flash-link { color: inherit; font-weight: 800; white-space: nowrap; }
  .flash-highlight {
    display: block;
    margin-top: 0.3rem;
    font: 400 1.9rem/1.1 var(--font-display);
    font-variant-numeric: tabular-nums;
  }
  .flash-wrap { padding: 0 1.5rem; }

  .errors {
    background: #fff0f2;
    border: 2px solid var(--alert);
    color: #8a1324;
    border-radius: var(--radius-box);
    padding: 0.75rem 1.1rem;
    margin-bottom: 1.25rem;

    p { margin: 0 0 0.35rem; font-weight: 700; }
    ul { margin: 0; padding-left: 1.2rem; }
  }
}
