/**
 * @copyright     2022 beikeshop.com - All Rights Reserved.
 * @link          https://beikeshop.com
 * @Author        guangda <service@guangda.work>
 * @Date          2022-08-09 10:53:07
 * @LastEditTime  2022-09-16 19:07:03
 */

$main_color: #0072ff;

@font-face {font-family: 'iconfont';
  src: url('/fonts/design/iconfont.woff') format('woff'), /* chrome、firefox */
  url('/fonts/design/iconfont.ttf') format('truetype'); /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
}

body.page-design {
  background-color: #fff;
  padding: 0;
  margin: 0;
  font-size: 14px;
  height: 100vh;
  overflow: hidden;

  .design-content {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .iconfont {
    font-family:"iconfont" !important;
    font-size:16px;
    font-style:normal;
    -webkit-font-smoothing: antialiased;
    // -webkit-text-stroke-width: 0.2px;
    -webkit-text-stroke-width: 0;
    -moz-osx-font-smoothing: grayscale;
  }

  [class*=" el-icon-"], [class^=el-icon-] {
    font-weight: 600;
  }

  .mb-1 {
    margin-bottom: 10px;
  }

  .el-tabs__header {
    margin-bottom: 0;
  }

  .tag {
    margin: 8px 0;
    color: #777;
    font-size: 12px;
  }

  .icon-rank {
    cursor: move;
  }

  .design-head {
    display: flex;
    align-items: center; // flex-start | center
    justify-content: space-between; // flex-end | center | space-between
    height: 40px;
    padding: 0 15px;
    z-index: 9;
    background-color: #fff;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);

    .head-centre {
      .device-wrap {
        display: flex;
        align-items: center;
        background-color: #eeeeee;
        height: 32px;
        border-radius: 4px;

        > div {
          height: 28px;
          margin: 1px 2px;
          padding: 0 8px;
          display: flex;
          align-items: center;
          font-size: 18px;
          border-radius: 4px;
          cursor: pointer;

          &.active {
            background-color: $main_color;
            color: #fff;
          }
        }
      }
    }

    .btn {
      padding: 0 10px;
      height: 30px;
      line-height: 30px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #eee;
      border-radius: 4px;
      color: #333;
      transition: all .2s ease-in-out;
      border: 1px solid transparent;
      &.btn-save {
        background-color: $main_color;
        border-color: $main_color;
        color: #fff;
        padding: 0 16px;

        &:hover {
          background-color: darken($main_color, 10%);
        }
      }

      &.btn-exit {
        background-color: #ffe8e8;
        border-color: #e8b5b5;
        color: #8c0c0c;

        &:hover {
          background-color: #bd0000;
          border-color: #bd0000;
          color: #fff;
        }
      }

      i {
        margin-right: 7px;
      }
    }
    // flex-wrap: wrap;
    // > div {
    //   flex: 1;
    //   height: 40px;
    //   color: #fff;
    //   cursor: pointer;
    //   display: flex;
    //   align-items: center;
    //   justify-content: center;
    //   background-color: $main_color;
    //   text-align: center;
    //   font-size: .8rem;
    //   transition: all .2s ease-in-out;
    //   border-right: 1px solid #5692ff;

    //   &:last-of-type {
    //     border-right: none;
    //   }

    //   i {
    //     margin-right: 7px;
    //   }

    //   &:hover {
    //     background-color: darken($main_color, 10%);
    //   }
    // }
  }

  .design-box {
    display: flex;
    // height: 100%;
    // flex: 1;
    background-color: #f1f1f1;
    height: calc(100vh - 40px);

    .sidebar-edit-wrap {
      // flex: 1;
      width: 300px;
      background-color: #fff;
      border-right: 1px solid #eee;
      position: relative;
      transition: all .1s ease-in-out;

      &.v-hide {
        margin-left: -300px;
      }

      .switch-design {
        position: absolute;
        top: 44%;
        right: -18px;
        z-index: 999;
        cursor: pointer;
        background-color: #eef1f9;
        width: 18px;
        height: 50px;
        line-height: 50px;
        box-shadow: 3px 1px 5px 1px rgba(0,0,0,.12);
        color: #000;

        &:hover {
          background-color: rgb(166, 187, 237);
        }
      }

      .modules-list {
        background: #e6e9ec;
        height: 100%;
        overflow-y: auto;
        padding: 0 3px 30px;
      }

      .module-list {
        text-align: center;
        padding: 4px;
        cursor: pointer;

        .module-info {
          background: #fff;
          color: #556068;
          border-radius: 4px;
          transition: all .25s ease-in-out;
          cursor: move;

          &:hover {
            color: #0072ff;
            box-shadow: 0 6px 23px rgba(0, 0, 0, 0.2);
          }
        }

        .icon {
          padding: 12px 0 7px;
          height: 36px;
          display: flex;
          justify-content: center;
          align-items: center;

          .img-icon {
            width: 36px;
            height: 36px;
            display: flex;
            justify-content: center;
            align-items: center;

            img {
              max-width: 100%;
              max-height: 100%;
            }
          }

          i {
            font-size: 26px;
          }
        }

        .name {
          font-size: 12px;
          height: 27px;
          overflow: hidden;
        }
      }
    }

    .preview-iframe {
      display: flex;
      margin: 6px;
      justify-content: center;
      flex: 1;
      // overflow: hidden;
      #preview-iframe {
        border-radius: 6px;
      }
    }
  }
}

.module-edit {
  padding: 0 10px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;

  .image-edit-wrapper {
    margin-bottom: 100px;
  }

  .module-editor-row, .module-editor-setting-row {
    height: 47px;
    line-height: 47px;
    background-color: #f5f5f5;
    padding: 0 20px;
    margin: 0 -14px 14px;
    font-size: 16px;
    color: #212121;
  }

  .module-editor-setting-row {
    position: relative;
    text-align: center;
    .title {
      font-weight: bold;
    }

    .btn-back {
      position: absolute;
      left: 17px;
      top: 50%;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      padding: 0 10px;
      transform: translateY(-50%);
      background-color: #fff;
      border-radius: 4px;
      border: 1px solid #ddd;
      cursor: pointer;
      &:hover {
        border-color: $main_color;
        color: $main_color;
      }
    }
  }

  .module-edit-group {
    margin-bottom: 20px;

    &:last-of-type {
      border-bottom: none;
    }

    .module-edit-title {
      margin-bottom: 10px;
      position: relative;
      padding-left: 6px;
      display: flex;
      justify-content: space-between;

      &:before {
        content: '';
        position: absolute;
        left: 0;
        top: 3px;
        width: 2px;
        height: 14px;
        background: #0072ff;
      }
    }

    .module-edit-sub-title {

    }
  }
}

.product-autocomplete-list {
  li {
    white-space: normal;
    margin-bottom: 6px;
    padding: 0 14px 0 8px;
  }

  .product-item {
    display: flex;
    align-items: center;
    // white-space: normal;

    .image {
      width: 30px;
      height: 30px;
      flex: 0 0 30px;
      margin-right: 6px;
      display: flex;
      justify-content: center;
      align-items: center;

      img {
        max-width: 100%;
        max-height: 100%;
      }
    }

    .name {
      width: calc(100% - 36px);
      flex: 0 0 calc(100% - 36px);
      font-size: 12px;
      line-height: 1.7;
      overflow: hidden;
      // 最多显示2行
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
  }
}

.pb-images-selector {
  border: 1px solid #eee;
  margin-bottom: 10px;
  border-radius: 2px;
  // overflow: hidden;
  &:hover {
    border-color: #ddd;

    .selector-head {
      background: #eee;
    }
  }

  .pb-images-selector-add {
    width: 100%;
    margin-top: 16px;
    padding: 10px 20px;
  }

  .selector-head {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    padding: 4px 10px;
    cursor: pointer;
    justify-content: space-between;

    > div.left {
      display: flex;
      align-items: center;

      i {
        margin-right: 10px;
      }

      img {
        width: 24px;
        max-height: 50px;
      }
    }

    > div.right {
      display: flex;
      align-items: center;

      i {
        color: #999;
        font-size: 20px;
      }

      .remove-item {
        margin-right: 8px;
        padding-right: 8px;
        position: relative;

        &:after {
          content: '';
          border-right: 1px solid #ccc;
          position: absolute;
          right: 1px;
          top: 20%;
          height: 60%;
        }

        i {
          font-size: 15px;
        }
      }
    }
  }

  .pb-images-list {
    padding: 7px;
    padding-bottom: 8px;
    position: relative;
    display: none;

    &.active {
      display: block;
    }

    .pb-image-selector {
    }

    .remove-item {
      margin-top: 20px;
      background: #ffc8c8;
      color: #c70000;
      z-index: 9;
      height: 20px;
      line-height: 20px;
      padding: 5px 10px;
      text-align: center;
      cursor: pointer;

      i {
        font-size: 14px;
      }
    }

    .pb-image-selector {
      cursor: pointer;
      min-width: 50px;
      min-height: 50px;
      // background: #f5f5f5;
    }

    .pb-images-btns button {
      margin-left: 0 !important;
      padding: 9px 10px;
    }
    .el-input-group__prepend {
      padding: 0 10px;
    }
  }
}

.module-editor-tab-product-template {
  .tab-info {
    margin-top: 10px;
    padding: 10px;
    background: #f2f2f2;
    border-radius: 6px;
  }

  .manufacturer-list {
    > div {
      margin-bottom: 10px;
      border: 1px solid #f4f4f4;
      padding: 5px;
      border-radius: 6px;
      background: #f4f4f4;
      padding-bottom: 8px;
      position: relative;
      &:hover {
        .remove-btn {
          display: block;
        }
      }

      .remove-btn {
        position: absolute;
        display: none;
        top: 0;
        right: 0;
        background: red;
        color: #fff;
        z-index: 9;
        padding: 0 2px;
        cursor: pointer;
        border-radius: 0 0 0 4px;
        &:hover {
          background: #c70000;
        }
      }
    }
  }

  .add-category {
    // margin-top: 10px;
    display: flex;
    justify-content: flex-end;
  }

  .manufacturers {
    .module-edit-group {
      margin-top: 5px;
    }
  }

  .tab-edit-category > .el-tabs__header > .el-tabs__nav-wrap {
    .el-tabs__item {
      padding: 0 10px !important;
    }
  }

  .autocomplete-group-wrapper {
    .item-group-wrapper {
      background: #fff;
    }
  }
}

.autocomplete-group-wrapper {
  .inline-input {
    margin-bottom: 10px;
    width: 100%;
  }

  .item-group-wrapper {
    padding: 10px;
    min-height: 230px;
    overflow: auto;
    background-color: #f5f5f5;
    // border: 1px solid #e3e3e3;
    border-radius: 6px;

    .item {
      overflow: hidden;
      position: relative;
      padding: 5px 8px;
      margin-bottom: 4px;
      background: #fff;
      border: 1px solid #eee;
      border-radius: 4px;
      cursor: move;
      display: flex;
      align-items: center; // flex-start | center
      justify-content: space-between; // flex-end | center | space-between
      &:hover {
        border-color: $main_color;
      }

      .product-item {
        .image {
          display: flex;
          align-items: center;
          width: 28px;
          flex: 0 0 28px;
          height: 28px;
          margin-right: 6px;

        }
        img {
          max-width: 100%;
          max-height: 100%;
        }
      }

      div {
        display: flex;
        line-height: 1;
        width: calc(100% - 16px);
        align-items: center; // flex-start | center

        i {
          margin-right: 4px;
        }
      }

      span {
        font-size: 12px;
        overflow: hidden;
        line-height: 1.4;
        // text-overflow:ellipsis;
        // white-space: nowrap;
        // 最多显示2行
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        display: -webkit-box;
      }

      i {
        // position: absolute;
        color: #999;
        font-weight: 400;
        &.right {
          cursor: pointer;

          &:hover {
            color: #222;
          }
        }
      }
    }
  }
}

.footer-link-item {
  padding: 6px 10px;
  background: #f5f5f5;
  margin-bottom: 10px;
  position: relative;

  &:hover {
    .remove-item {
      display: block;
    }
  }

  .icon-rank {
    position: absolute;
    top: 11px;
    left: 10px;
    z-index: 9;
  }

  .link-selector-wrap {
    > .title {
      padding-left: 20px;
    }

    .selector-type .title {
      // line-height: 1.42857;
    }
  }

  .remove-item {
    position: absolute;
    display: none;
    top: 0;
    right: 0;
    background: red;
    color: #fff;
    z-index: 9;
    padding: 0 4px;
    cursor: pointer;
    border-radius: 0 0 0 4px;
    &:hover {
      background: #c70000;
    }
  }
}

.file-manager-box {
  .layui-layer-title {
    background-color: #293042;
    color: #fff;
    border-color: #404e72;
  }

  .layui-layer-ico {
    background: url('/image/close.png') no-repeat;
    background-size: cover;
    background-position: center center;
  }
}

.link-selector-wrap {
  > .title {
    margin-bottom: 6px;
    position: relative;
    font-size: 12px;
    i {
      margin-right: 4px;
      color: #0072ff;
    }
  }

  .selector-type {
    position: relative;
    outline: none;

    .title {
      border: 1px solid #eee;
      padding: 6px 16px 6px 6px;
      font-size: 12px;
      cursor: pointer;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      border-radius: 2px;
      background-color: #fff;
      &:hover {
        border-color: #ddd;
      }

      &:before {
        content: "\F282";
        font-family: 'bootstrap-icons';
        position: absolute;
        right: 10px;
        top: 8px;
      }
    }

    .selector-content {
      position: absolute;
      z-index: 999;
      top: calc(100% + 2px);
      border-radius: 2px;
      left: 0;
      width: 100%;
      background-color: #fff;
      box-shadow: 0 3px 10px rgba(0,0,0,0.25);
      display: none;
      &.active {
        display: block;
      }

      > div {
        padding: 6px 10px;
        cursor: pointer;

        &:hover {
          background-color: #e0fcf6;
        }
      }
    }
  }
}

.link-dialog-box {
  .el-dialog__header {
    padding: 0;

    .el-dialog__headerbtn {
      top: 14px;
      font-size: 20px;
      i {
        color: #fff;
      }
    }
  }

  .el-dialog__body {
    padding-bottom: 10px;
  }

  .el-dialog__footer {
    .el-button {
      padding: 10px 20px;
      min-width: 80px;
    }
  }

  .link-dialog-header {
    padding: 10px 20px;
    background-color: #409eff;

    .title {
      font-weight: bold;
      color: #fff;
      font-size: 16px;
    }


    div.input-with-select {
      margin-top: 16px;
      display: flex;
      align-items:center;

      input {
        height: 34px;
        border: none;
        border-radius: 4px 0 0 4px;
        flex: 1;
        padding: 0 10px;
        outline: none;
      }

      button {
        color: #333;
        border: none;
        background-color: #eee;
        height: 34px;
        line-height: 36px;
        border-radius: 0 4px 4px 0;
        padding: 0 14px;
        overflow: hidden;
      }
    }
  }

  .link-dialog-content {
    .product-search {
      margin: -30px -20px 10px;
      padding: 6px 20px;
      text-align: left;
      background-color: #f3f4f7;
      display: flex;
      justify-content: space-between;
      align-items:center;

      > a {
        border: 1px solid #ccc;
        background-color: #fff;
        padding: 0 10px;
        border-radius: 4px;
        height: 26px;
        line-height: 26px;
        color: #333;
        text-decoration: none;
      }

      .link-top-new {

      }

      .el-input-group__append {
        background-color: #0072ff;
        color: #fff;
        margin-top: -1px;
      }
    }

    .product-info {
      height: 340px;
      // overflow-y: auto;

      .product-info-title {
        background-color: #dee1e9;
        display: flex;
        justify-content: space-between;
        padding: 6px 20px 6px 38px;
        text-align: left;
        color: #30344f;
        font-size: 14px;
      }

      .product-list {
        padding-left: 0;
        list-style: none;
        margin-top: 4px;
        margin-bottom: 0;
        height: 314px;
        overflow-y: auto;

        &.static {
          height: 340px;
        }

        li {
          display: flex;
          justify-content:space-between;
          align-items: center;
          padding: 5px 10px;
          border-bottom: 1px solid #eee;
          &:not(.no-status) {
            cursor: pointer;
            &:hover {
              background-color: #e0fcf6;
            }
          }

          .left {
            flex: 1;
            display: flex;
            align-items: center;
            margin-right: 20px;

            .checkbox-plus {
              // width: 16px;
              margin-right: 12px;
              flex: 0 0 14px;
              height: 14px;
              border: 1px solid #ddd;
              border-radius: 50%;
              display: flex;
              position: relative;
              justify-content: center;
              align-items: center;

              &:not(.no-status) {
                cursor: pointer;
              }

              &:before {
                content: "";
                width: 10px;
                height: 10px;
                background-color: #0072ff;
                border-radius: 50%;
                display: none;
              }

              &.active {
                border-color: #0072ff;
                box-shadow: 0px 0px 4px #0072ff;

                &:before {
                  display: block;
                }
              }

              &.no-status {
                background-color: #ddd;
              }
            }

            > div {
              // padding-left: 10px;
              display: -webkit-box;
              text-overflow: ellipsis;
              -webkit-line-clamp: 2;
              -webkit-box-orient: vertical;
              word-break: break-all;
              overflow: hidden;
            }
          }

          .right {
            border: 1px solid #ddd;
            border-radius: 2px;
            padding: 2px 6px;
            color: #aaa;
            font-size: 12px;
            background-color: #fff;

            &.ok {
              color: #52c41a;
              border-color: #b7eb8f;
            }
          }

          img {
            width: 46px;
            margin-right: 10px;
          }
        }
      }
    }

    .product-info-no {
      text-align: center;
      font-size: 14px;
      > div {
        display: block;
      }
      .icon {
        margin: 50px 0 20px;
        i {
          font-size: 100px;
          color: #8c8c8c;
        }
      }

      .no-text {
        font-size: 16px;
      }

      a {
        color: #0072ff;
        text-decoration: underline;
      }
    }
  }

  .el-dialog__footer {
    background-color: #f6f6f6;
    padding: 10px 20px;
  }

  .link-dialog-footer {

  }
}