@prefix-cls: ~'@{namespace}-multiple-tabs';

html[data-theme='dark'] {
  .@{prefix-cls} {
    .ant-tabs-tab {
      border-bottom: 1px solid @border-color-base;
    }
  }
}

html[data-theme='light'] {
  .@{prefix-cls} {
    .ant-tabs-tab:not(.ant-tabs-tab-active) {
      border: 0;
    }
  }
}

.@{prefix-cls} {
  z-index: 10;
  height: @multiple-height;
  line-height: @multiple-height;

  .ant-tabs {
    border-radius: 16px;
  }

  .ant-tabs-small {
    height: @multiple-height;
  }

  .ant-tabs.ant-tabs-card {
    .ant-tabs-nav-list {
      align-items: center;
    }

    .ant-tabs-nav {
      padding-top: 2px;
      height: @multiple-height;
      margin: 0;
      background-color: @component-background;
      border: 0;
      box-shadow: none;

      .ant-tabs-nav-container {
        height: @multiple-height;
        padding-top: 2px;
      }

      .ant-tabs-tab {
        height: calc(@multiple-height - 24px);
        padding: 0 5px;
        border-right: 1px solid #ddd;
        line-height: calc(@multiple-height - 24px);
        color: #999;
        background-color: @component-background;
        transition: none;

        .ant-tabs-tab-remove {
          width: 8px;
          height: 38px;
          font-size: 12px;
          color: inherit;
          transition: none;
          margin-left: 5px;
          margin-right: 0;

          &:hover {
            svg {
              width: 0.8em;
            }
          }
        }

        // > div {
        //   display: flex;
        //   justify-content: center;
        //   align-items: center;
        // }

        svg {
          width: 0.7em;
          fill: #999;
        }
      }

      .ant-tabs-tab:not(.ant-tabs-tab-active) {
        &:hover {
          color: @primary-color;
        }
      }

      .ant-tabs-tab-active {
        position: relative;
        border-top: 0;
        border-left: 0;
        transition: none;

        span {
          color: @primary-color !important;
        }
      }
    }

    .ant-tabs-nav > div:nth-child(1) {
      padding: 0 8px 0 3px;
    }
  }

  .ant-tabs-tab:not(.ant-tabs-tab-active) {
    .anticon-close {
      font-size: 12px;

      svg {
        width: 0.6em;
      }
    }
  }

  .ant-dropdown-trigger {
    display: inline-flex;
  }

  &--hide-close {
    .ant-tabs-tab-remove {
      opacity: 0 !important;
    }
  }

  &-content {
    &__extra-quick,
    &__extra-redo,
    &__extra-fold {
      display: inline-block;
      width: 36px;
      height: calc(@multiple-height - 24px);
      line-height: calc(@multiple-height - 24px);
      color: #c3c8cf;
      text-align: center;
      cursor: pointer;
      border-left: 1px solid #ddd;

      &:hover {
        color: @text-color-base;
      }

      span[role='img'] {
        transform: rotate(90deg);
      }
    }

    &__extra-redo {
      span[role='img'] {
        transform: rotate(0deg);
      }
    }

    &__info {
      display: inline-block;
      width: 100%;
      height: @multiple-height - 24;
      padding-left: 0;
      font-size: 14px;
      cursor: pointer;
      user-select: none;
    }
  }
}

.ant-tabs-dropdown-menu {
  &-title-content {
    display: flex;
    align-items: center;

    .@{prefix-cls} {
      &-content__info {
        width: auto;
        margin-left: 0;
        line-height: 28px;
      }
    }
  }

  &-item-remove {
    margin-left: auto;
  }
}

.multiple-tabs__dropdown {
  .ant-dropdown-content {
    width: 172px;
  }
}
