@layer components {
  .message-box {
    max-width: var(--max-length-sm);
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 var(--space-xs);
    text-align: center;

    &.--success {
      & section {
        background-color: oklch(96.2% 0.044 156.743);
      }
      @media (prefers-color-scheme: dark) {
        & section {
          background-color: oklch(44.8% 0.119 151.328);
        }
      }
    }

    &.--failure {
      & section {
        background-color: oklch(93.6% 0.032 17.717);
      }
      @media (prefers-color-scheme: dark) {
        & section {
          background-color: oklch(44.4% 0.177 26.899);
        }
      }
    }

    & section {
      padding: var(--space-xs) var(--space-sm);
      background-color: var(--primary-100);
      box-shadow: var(--shadow-md);
    }

    & svg {
      width: var(--length-12);
      height: var(--length-12);
      margin-bottom: var(--length-1);
    }

    & h2 {
      font-size: var(--font-size-lg);
      margin-bottom: var(--length-0_5);
    }

    & a {
      margin-top: var(--length-1);
    }
  }
}
