@charset "UTF-8";
@import "./common/var.css";

@component-namespace el {
  @b tabs {
    @e header {
      border-bottom: 1px solid var(--color-base-gray);
      padding: 0;
      position: relative;
      margin: 0 0 15px;
    }
    @e active-bar {
      position: absolute;
      bottom: 0;
      left: 0;
      height: 3px;
      background-color: var(--color-primary);
      z-index: 1;
      transition: transform .3s cubic-bezier(.645,.045,.355,1);
      list-style: none;
    }
    @e new-tab {
      float: right;
      border: 1px solid #d3dce6;
      height: 18px;
      width: @height;
      line-height: @height;
      margin: 12px 0 9px 10px;
      border-radius: 3px;
      text-align: center;
      font-size: 12px;
      color: #d3dce6;
      cursor: pointer;
      transition: all .15s;

      .el-icon-plus {
        transform: scale(0.8, 0.8);
      }

      &:hover {
        color: var(--color-primary);
      }
    }
    @e nav-wrap {
      overflow: hidden;
      margin-bottom: -1px;
      position: relative;

      @when scrollable {
        padding: 0 15px;
      }
    }
    @e nav-scroll {
      overflow: hidden;
    }
    @e nav-next, nav-prev {
      position: absolute;
      cursor: pointer;
      line-height: 44px;
      font-size: 12px;
      color: var(--color-base-silver);
    }
    @e nav-next {
      right: 0;
    }
    @e nav-prev {
      left: 0;
    }
    @e nav {
      white-space: nowrap;
      position: relative;
      transition: transform .3s;
      float: left;
    }
    @e item {
      padding: 0 16px;
      height: 42px;
      box-sizing: border-box;
      line-height: @height;
      display: inline-block;
      list-style: none;
      font-size: 14px;
      color: var(--color-base-silver);
      position: relative;

      & .el-icon-close {
        border-radius: 50%;
        text-align: center;
        transition: all .3s cubic-bezier(.645,.045,.355,1);
        margin-left: 5px;
        &:before {
          transform: scale(.7, .7);
          display: inline-block;
        }

        &:hover {
          background-color: var(--color-light-silver);
          color: var(--color-white);
        }
      }

      @when active {
        color: var(--color-primary);
      }

      &:hover {
        color: var(--color-base-black);
        cursor: pointer;
      }

      @when disabled {
        color: var(--disabled-color-base);
        cursor: default;
      }
    }
    @e content {
      overflow: hidden;
      position: relative;
    }
    @m card {
      > .el-tabs__header .el-tabs__active-bar {
        display: none;
      }
      > .el-tabs__header .el-tabs__item .el-icon-close {
        position: relative;
        font-size: 12px;
        width: 0;
        height: 14px;
        vertical-align: middle;
        line-height: 15px;
        overflow: hidden;
        top: -1px;
        right: -2px;
        transform-origin: 100% 50%;
      }
      > .el-tabs__header .el-tabs__item {
        border: 1px solid transparent;
        transition: all .3s cubic-bezier(.645,.045,.355,1);
              
        &.is-closable {
          &:hover {
            padding: * 9px;

            & .el-icon-close {
              width: 14px;
            }
          }
        }
        &.is-active {
          border: 1px solid var(--color-base-gray);
          border-bottom-color: var(--color-white);
          border-radius: 4px 4px 0 0;

          &.is-closable {
            padding: * 16px;
            
            .el-icon-close {
              width: 14px;
            }
          }
        }
      }
    }
    @m border-card {
      background: var(--color-white);
      border: 1px solid var(--color-base-gray);
      box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.12), 0px 0px 6px 0px rgba(0,0,0,0.04);

      >.el-tabs__content {
        padding: 15px;
      }
      >.el-tabs__header {
        background-color: var(--color-extra-light-gray);
        margin: 0;
      }
      >.el-tabs__header .el-tabs__item {
        transition: all .3s cubic-bezier(.645,.045,.355,1);
        border: 1px solid transparent;
        border-top: 0;
        margin: * -1px;

        &.is-active {
          background-color: var(--color-white);
          border-right-color: var(--color-base-gray);
          border-left-color: var(--color-base-gray);

          &:first-child {
            border-left-color: var(--color-base-gray);
          }
          &:last-child {
            border-right-color: var(--color-base-gray);
          }
        }
      }
    }
  }
}

.slideInRight-transition,
.slideInLeft-transition {
  display: inline-block;
}
.slideInRight-enter {
  animation: slideInRight-enter .3s;
}
.slideInRight-leave {
  position: absolute;
  left: 0;
  right: 0;
  animation: slideInRight-leave .3s;
}
.slideInLeft-enter {
  animation: slideInLeft-enter .3s;
}
.slideInLeft-leave {
  position: absolute;
  left: 0;
  right: 0;
  animation: slideInLeft-leave .3s;
}

@keyframes slideInRight-enter {
  0% {
    opacity: 0;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(100%);
    transform: translateX(100%)
  }

  to {
    opacity: 1;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(0);
    transform: translateX(0)
  }
}
@keyframes slideInRight-leave {
  0% {
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(0);
    transform: translateX(0);
    opacity: 1
  }

  100% {
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(100%);
    transform: translateX(100%);
    opacity: 0
  }
}
@keyframes slideInLeft-enter {
  0% {
    opacity: 0;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%)
  }

  to {
    opacity: 1;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(0);
    transform: translateX(0)
  }
}
@keyframes slideInLeft-leave {
  0% {
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(0);
    transform: translateX(0);
    opacity: 1
  }

  100% {
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
    opacity: 0
  }
}
