.wp-block-acf-wave-timeline {
  --tab-color: var(--tw-color-indigo-300);

  .wp-block-acf-wave-timeline__tab {
    position: relative;
    border: 0;
    background-color: var(--tab-color);
    transition: all 0.3s ease-in-out;
    cursor: pointer;

    &:nth-child(3n + 2) {
      --tab-color: var(--tw-color-teal-600);
    }

    &:nth-child(3n + 3) {
      --tab-color: var(--tw-color-amber-500);
    }

    &::after {
      content: '';
      display: block;
      position: absolute;
      width: 2rem;
      height: 100%;
      top: 0;
      left: calc(100% - 1px);
      aspect-ratio: cos(30deg);
      clip-path: polygon(0 0, 100% 50%, 0 100%);
      background: inherit;
      z-index: 1;
      transition: background-color 0.3s ease-in-out;
    }
  }

  .wp-block-acf-wave-timeline__panel {
    border-bottom: 1.25rem solid var(--tab-color);
    min-width: 300px;
    max-width: 100%;

    &:nth-child(3n + 2) {
      --tab-color: var(--tw-color-teal-600);
    }

    &:nth-child(3n + 3) {
      --tab-color: var(--tw-color-amber-500);
    }

    @media (width >= 48rem) {
      opacity: 0;
      transform: translateY(20%);
      position: absolute;
      transition: all 0.3s ease-in-out;

      &.active {
        opacity: 1;
        transform: translateY(0);
        z-index: 1;
        position: static;
      }
    }
  }
}
