.trapezoidTabs {
  width: 100%;

  .tabContainer {
    display: flex;
    align-items: flex-end;
    position: relative;

    &::after {
      content: '';
      position: absolute;
      bottom: 4px;
      left: 7px;
      width: calc(100% - 14px);
      height: 2px;
      background-color: var(--trapezoid-line-color);
    }
  }

  .tabContent {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;

    &::after {
      content: attr(data-text);
      font-weight: bold;
      height: 0;
      visibility: hidden;
      overflow: hidden;
      user-select: none;
      pointer-events: none;
    }
  }

  .tabItem {
    position: relative;
    height: 40px;
    line-height: 40px;
    padding: 0 30px 0 40px;
    margin-right: -10px;
    color: var(--trapezoid-text);
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;

    &::before {
      content: '';
      position: absolute;
      top: -5px;
      left: 7px;
      width: 100%;
      height: 100%;
      background-color: var(--trapezoid-bg);
      transform: perspective(16px) rotateX(6deg);
      transform-origin: bottom;
      z-index: -1;
      border-radius: 8px 8px 0 0;
      box-shadow: 0 -2px 6px rgb(0 0 0 / 10%);
      transition: background-color 0.3s ease;
    }

    &:first-child::before {
      border-radius: 0 8px 0 0;
      transform-origin: bottom left;
    }

    &:hover:not(.active) {
      &::before {
        background-color: var(--trapezoid-hover-bg);
      }
    }

    &.active {
      color: var(--trapezoid-active-text);
      height: 40px;
      line-height: 40px;
      background-color: transparent;
      z-index: 10 !important;

      .tabContent {
        font-weight: bold;
      }

      &::before {
        background-color: var(--trapezoid-active-bg);
        border-radius: 8px 8px 0 0;
      }

      &:first-child::before {
        border-radius: 4px 8px 0 0;
      }
    }
  }
}
