/* Notice: info (dark), success, error. Icon + title + text + optional links. */
@layer components {
  .notice {
    --notice-bg: var(--color-background-inverse);
    --notice-color: var(--color-text-inverse);
    display: flex;
    align-items: flex-start;
    gap: var(--space-12);
    padding: var(--space-16);
    border-radius: var(--radius-s);
    background-color: var(--notice-bg);
    color: var(--notice-color);
    font-size: var(--type-text-small-size);
    line-height: var(--type-text-small-line-height);
  }

  .notice--success {
    --notice-bg: var(--color-feedback-success-subtle);
    --notice-color: var(--color-feedback-success);
  }

  .notice--error {
    --notice-bg: var(--color-feedback-error-subtle);
    --notice-color: var(--color-feedback-error);
  }

  .notice > .icon {
    flex: none;
    /* optically centred on the cap height of the first line (measured: 4 px sat 2 px too low) */
    margin-block-start: 2px;
  }

  .notice__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0;
  }

  .notice__title {
    font-weight: var(--font-weight-bold);
  }

  .notice__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8) var(--space-24);
    margin-block-start: var(--space-8);
  }

  .notice a {
    color: inherit;
    font-weight: var(--font-weight-semibold);
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  .notice a:hover {
    color: inherit;
    text-decoration-thickness: 2px;
  }

  .notice ul {
    margin: 0;
    padding-inline-start: var(--space-16);
  }

  /* Dark variant: a dark focus ring would vanish on the olive-950 fill. */
  .notice--info {
    --color-focus: var(--color-yellow-300);
  }
}
