:host {
  &:not(:empty) {
    z-index: 50;
    position: fixed;
    height: 2rem;
    width: 100vw;
    border-bottom: 1px solid var(--septenary-contrast);
    text-align: center;
    align-content: center;
    backdrop-filter: blur(16px);
    background-color: color-mix(in srgb, var(--page-background) 70%, transparent);
  }

  a.docs-top-level-banner {
    width: 100%;
    display: inherit;
  }

  h1.docs-top-level-banner-cta {
    display: inline;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.875rem;
    margin: 0;
    width: fit-content;
    font-weight: 500;

    &.background {
      color: var(--tertiary-contrast);
    }

    &:not(.background) {
      color: transparent;

      &::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 1px;
        bottom: -2px;
        left: 0;
        background: var(--tertiary-contrast);
        transform: scaleX(0);
        transform-origin: bottom right;
        @media (prefers-reduced-motion: no-preference) {
          transition: transform 0.3s ease;
        }
      }

      &:hover {
        &::after {
          transform: scaleX(1);
          transform-origin: bottom left;
        }
      }
    }
  }

  .docs-top-level-banner-close {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    color: var(--tertiary-contrast);
  }
}

.shimmer {
  background: var(--red-to-pink-to-purple-horizontal-gradient);

  @media (prefers-reduced-motion: no-preference) {
    background-repeat: no-repeat;
    -webkit-background-size: 125px 100%;
    -moz-background-size: 125px 100%;
    background-size: 125px 100%;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
    -webkit-animation-name: shimmer;
    -moz-animation-name: shimmer;
    animation-name: shimmer;
    -webkit-animation-duration: 10s;
    -moz-animation-duration: 10s;
    animation-duration: 10s;
    -webkit-animation-iteration-count: infinite;
    -moz-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
  }
}

@-moz-keyframes shimmer {
  0% {
    background-position: top left;
    background-position-x: -150px;
  }
  100% {
    background-position: top right;
    background-position-x: 500px;
  }
}

@-webkit-keyframes shimmer {
  0% {
    background-position: top left;
    background-position-x: -150px;
  }
  100% {
    background-position: top right;
    background-position-x: 500px;
  }
}

@-o-keyframes shimmer {
  0% {
    background-position: top left;
    background-position-x: -150px;
  }
  100% {
    background-position: top right;
    background-position-x: 500px;
  }
}

@keyframes shimmer {
  0% {
    background-position: top left;
    background-position-x: -150px;
  }
  100% {
    background-position: top right;
    background-position-x: 500px;
  }
}
