#flash {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 99999;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;

  .message {
    background: var(--base3);
    color: var(--base00);
    box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);
    transition: opacity 0.3s ease, height 0.3s ease, padding-top 0.3s ease, padding-bottom 0.3s ease, margin-bottom 0.3s ease;
    overflow: hidden;
    border-style: solid;
    border-width: 0 0 0 3px;
    position: relative;

    &.notice, &.success {
      border-color: var(--success);
    }

    &.alert, &.error {
      border-color: var(--error);
    }

    &.dismissing {
      opacity: 0;
      padding-top: 0;
      padding-bottom: 0;
      margin-bottom: -0.5rem;
    }

    .body {
      white-space: pre;
      line-height: 1.4;
      padding: 1rem;
      overflow: auto;
      max-height: calc(100vh - 6rem);

      &::-webkit-scrollbar, &::-webkit-scrollbar-button {
        width: 0.125rem;
        height: 0.25rem;
      }

      &::-webkit-scrollbar-track, &::-webkit-scrollbar-track-piece {
        background: transparent;
      }

      &::-webkit-scrollbar-thumb {
        background: var(--base00);
      }
    }

    .close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      z-index: 10;
      display: block;
      width: 2rem;
      height: 2rem;
      padding: 0.5rem;
      line-height: 0;
      margin-right: -1rem;
      margin-top: -1rem;
      background: transparent;
      border: none;
      outline: none;
      color: inherit;
      cursor: pointer;
    }
  }
}

@supports not selector(::-webkit-scrollbar) {
  #flash .message .body {
    scrollbar-width: thin;
    scrollbar-color: var(--base00) transparent;
  }
}
