@import "./variables.scss";

$bg: #4a4a4a;
$bd: #dcdee3;
$hover: #f4f4f4;
$link-color: #4a90e2;
$wrap-margin: 16px;

.sell-category-selection {
  .category-search {
    width: 593px;
  }

  .search-btn {
    margin-left: 5px;
  }

  .category-lists-wrap {
    margin-top: 10px;
    overflow: hidden;
  }

  .filter-wrap {
    margin: $wrap-margin 0;
    .next-tag-selectable {
      margin: 0 8px 0 0;
    }
  }

  .category-path-wrap,
  .category-selected-wrap {
    margin: $wrap-margin 0;
    padding: 0 12px;
    line-height: 20px;
    overflow: hidden;
    .label {
      float: left;
      padding-right: 5px;
    }
    .selected-item-wrap {
      overflow: hidden;
      color: #333;
    }
  }

  .category-path-wrap {
    color: #999999;
    border: 1px solid #e8e8e8;
    background: #f7f8fa;
    line-height: 33px;
    .path-node {
      &:after {
        content: " > ";
      }
      &:last-child:after {
        content: "";
      }
    }
  }

  .cascade-selection {
    $main-height: 330px;
    $search-height: 28px;
    $search-margin: 20px;
    margin: $wrap-margin 0;
    position: relative;
    width: 100%;
    border: 1px solid $bd;
    // min-height: 330px;

    .group-move {
      margin-left: -25%;
      transition: all 0.5s ease;
    }

    .search-wrap {
      height: $search-height;
      width: 90%;
      margin: 20px 5%;
      .next-search-lt-input {
        width: auto !important;
      }
    }

    .cascade-wrap {
      height: $main-height;
      overflow: hidden;
      .category-list {
        line-height: 0;
        // display: block;
        display: flex;
        flex-direction: column;
        float: left;
        border-right: 1px solid $bd;
        height: 100%;
        transition: all 0.5s ease;
      }
    }

    .list-frame {
      overflow-y: auto;
      flex: 1;
      height: $main-height - $search-height - $search-margin * 2;
    }
    .list-wrap {
      // height: 260px;
      $list-item-height: 28px;
      position: relative;

      li.category-item {
        height: $list-item-height;
        line-height: $list-item-height;
        width: 100%;
        padding: 0 10px;
        border-left: 2px solid transparent;
        overflow: hidden;
        display: flex;
        cursor: pointer;
        .text {
          flex: 1;
          white-space: nowrap;
          overflow-x: hidden;
          line-height: $list-item-height;
          text-overflow: ellipsis;
          margin: 0;
        }
        .category-item-checkbox {
          vertical-align: top;
          margin: 5px 5px 0 0;
        }

        .category-item-edit {
          z-index: 999;
          display: none;
          margin-left: 4px;
          color: $link-color;
          text-align: left;
          height: inherit;
          line-height: inherit;
        }

        .offline-tag {
          $height: 16px;
          color: #fff;
          background-color: #d8d8d8;
          padding: 0 3px;
          font-size: 12px;
          margin-left: 4px;
          line-height: $height;
          height: $height;
          border-radius: 2px;
          margin-top: ($list-item-height - $height) / 2;
          transform: scale(0.8);
        }

        .icon-wrap {
          text-align: right;
          width: 16px;
        }
        &:hover {
          background: $hover;
          .category-item-edit {
            display: flex;
          }
          .offline-tag {
            display: none;
          }
        }
      }

      li.selected {
        border-left: 2px solid red;
        background: $hover;
      }

      .highlight {
        color: red;
      }
    }

    .icon-wrap {
      float: right;
      clear: both;
    }

    .icon-arrow {
      $diameter: 40px;
      position: absolute;
      top: 40%;
      width: $diameter;
      height: $diameter;
      line-height: $diameter;
      background: $bd;
      -moz-border-radius: 30px;
      -webkit-border-radius: 30px;
      border-radius: 30px;
      filter: alpha(opacity=80);
      -moz-opacity: 0.8;
      -khtml-opacity: 0.8;
      opacity: 0.8;
      cursor: pointer;
      // z-index: 1;

      &.left {
        left: -30px;
        text-align: right;
      }

      &.right {
        right: -30px;
        text-align: left;
      }

      .next-icon {
        color: #fff;
      }
    }
  }
  .category-search-wrap {
    margin-bottom: 10px;
  }
}
