%basic-text-style {
  height: 52px;
  padding: 10px 20px;

  .amos-editable {
    overflow: visible;
  }

  .property-label-name {
    float: left;
    width: 85px;
    overflow: hidden;
    font-family: 'Microsoft Tai Le';
    font-size: 15px;
    line-height: 33px;
    color: rgba(0, 0, 0, 0.847058823529412);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .property-normal-label {
    top: 5px;
    width: 150px;
    overflow: hidden;
    font-family: 'Microsoft Tai Le';
    font-size: 15px;
    line-height: 33px;
    color: rgb(52, 95, 166);
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
  }
}

%common-text-title-style {
  padding-top: 10px;
  padding-left: 20px;
  font-family: 'Arial Normal', 'Arial';
  font-size: 28px;
  font-style: normal;
  font-weight: normal;
  color: rgb(30, 30, 30);
}

%template-basic-style {
  width: 100%;
  height: 519px;

  .template-basic-info-title {
    @extend %common-text-title-style;
  }

  .template-basic-icon {
    width: 161px;
    height: 97px;
    margin-top: 10px;
    margin-left: 24px;
    text-align: center;
    border-color: rgb(52, 95, 166);
    border-style: solid;
    border-width: 1px;
    border-radius: 0;
    box-sizing: border-box;

    .ant-upload-select-picture-card {
      display: inline-block;
      width: 90px;
      height: 63px;
      margin-right: 8px;
      margin-bottom: 8px;
      text-align: center;
      vertical-align: top;
      cursor: pointer;
      background: url('../../../assets/iot/deviceManage/device_default.png') no-repeat;
      background-size: 100% 100%;
      border: none;
      border-radius: 4px;
      -webkit-transition: border-color 0.3s ease;
      transition: border-color 0.3s ease;

      .ant-upload {
        display: block;
        width: 100%;
        height: 100%;
        padding: 5px 0;
      }
    }

    .upload-icon-panel {
      top: 129px;
      left: 236px;
    }
  }

  .template-basic-name {
    height: 60px;
    padding: 18px 20px 10px 10px;

    .amos-editable {
      overflow: visible;
    }

    .property-label-name {
      float: left;
      width: 85px;
      overflow: hidden;
      font-family: 'Microsoft Tai Le';
      font-size: 15px;
      line-height: 33px;
      color: rgba(0, 0, 0, 0.847058823529412);
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .property-normal-label {
      top: 5px;
      width: 150px;
      padding-left: 8px;
      overflow: hidden;
      font-family: 'Microsoft Tai Le';
      font-size: 15px;
      line-height: 33px;
      color: rgb(52, 95, 166);
      text-overflow: ellipsis;
      white-space: nowrap;
      cursor: pointer;
    }
  }

  .template-type-name {
    @extend %basic-text-style;
  }

  .template-basic-model {
    @extend %basic-text-style;
  }

  .template-basic-catalog {
    @extend %basic-text-style;
  }

  .template-basic-industry {
    @extend %basic-text-style;
  }

  .template-basic-type {
    @extend %basic-text-style;
  }

  .template-basic-descr {
    @extend %basic-text-style;
  }
}

%template-config-style {
  width: 100%;
  height: calc(100% - 521px);
  min-height: 260px;
  border-top: 1px solid rgb(222, 221, 222);

  .template-config-info-title {
    @extend %common-text-title-style;
  }

  .template-config-info-content {
    width: 100%;
    height: calc(100% - 50px);

    .template-config-common {
      @extend %basic-text-style;
    }
  }
}

%template-capacity-style {
  width: 100%;
  height: 400px;
  overflow-x: auto;
  overflow-y: hidden;

  .template-capacity-info-title {
    @extend %common-text-title-style;
  }

  .template-capacity-device {
    position: relative;
    width: 754px;
    height: 354px;

    img {
      width: 700px;
      height: 320px;
    }
  }

  .template-capacity-line {
    position: relative;
    top: -200px;
    left: 575px;
    width: 248px;
    height: 27px;

    img {
      width: 248px;
      height: 27px;
    }
  }

  .template-capacity-port {
    position: relative;
    top: -223px;
    left: 784px;
    width: 25px;
    height: 16px;

    img {
      width: 25px;
      height: 16px;
    }
  }

  .template-capacity-status {
    position: relative;
    top: -253px;
    left: 664px;
    z-index: 1;
    width: 40px;
    height: 40px;

    img {
      width: 40px;
      height: 40px;
    }
  }

  .template-capacity-empty {
    position: relative;
    top: -295px;
    left: 662px;
    width: 45px;
    height: 45px;

    img {
      width: 45px;
      height: 45px;
    }
  }

  .template-capacity-add {
    position: relative;
    top: -158px;
    left: 515px;
    width: 86px;
    height: 26px;
    padding: 3px 5px;
    font-family: 'Arial Normal', 'Arial';
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    color: white;
    text-align: center;
    background: inherit;
    background-color: #345fa6;
    border: none;
    border-width: 0;
    border-radius: 61px;
    -webkit-box-shadow: none;
    box-shadow: none;

    &:hover {
      cursor: pointer;
      background-color: #4d78c3;
    }
  }

  .template-capacity-test {
    position: relative;
    top: -169px;
    left: 475px;
    width: 86px;
    height: 26px;
    padding: 3px 5px;
    font-family: 'Arial Normal', 'Arial';
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    color: white;
    text-align: center;
    background: inherit;
    background-color: #345fa6;
    border: none;
    border-width: 0;
    border-radius: 61px;
    -webkit-box-shadow: none;
    box-shadow: none;

    &:hover {
      cursor: pointer;
      background-color: #4d78c3;
    }
  }

  .template-capacity-interface-list-root {
    position: relative;
    top: -371px;
    left: 690px;
    z-index: 1;
    width: 336px;
    height: 265px;
    border-color: rgba(230, 230, 230, 1);
    border-style: solid;
    border-width: 1px;

    .template-capacity-interface-list-title {
      height: 20px;
      font-size: 15px;
      line-height: 20px;
      text-align: center;
      background-color: #e4e4e4;
    }

    .template-capacity-interface-list-content {
      display: flex;
      flex-wrap: wrap;
      width: 100%;
      height: calc(100% - 20px);
      padding: 20px 30px;
      overflow-y: auto;
    }
  }
}

%template-quota-style {
  width: 100%;
  height: calc(100% - 450px);
  min-height: 100px;
  border-top: 1px solid rgb(222, 221, 222);

  .template-quota-info-title {
    @extend %common-text-title-style;
  }

  .template-quota-info-body {
    width: 100%;
    height: calc(100% - 5px);
    padding: 2px 12px;
    overflow-y: auto;
  }
}

%common-collapse-header {
  position: relative;
  padding: 8px 0 8px 10px;
  line-height: 22px;
  color: rgba(0, 0, 0, 0.85);
  cursor: pointer;
  background-color: white;
  -webkit-transition: all 0.3s;
  transition: all 0.3s;

  .config-collapse-text {
    padding-left: 15px;
    font-size: 20px;
    line-height: 36px;
    color: rgb(0, 0, 0);
  }
}

%common-property-head {
  height: 50px;

  .common-property-text {
    position: relative;
    top: 15px;
    left: 15px;
    width: 78px;
    height: 35px;
    font-size: 15px;
    font-weight: 600;
    line-height: 35px;
    color: #345fa6;
    text-align: center;
    border: 1px solid #deddde;
    border-bottom: 2px solid #345fa6;
    border-radius: 5px 5px 0 0;
  }

  .del-button-view {
    position: relative;
    top: -23px;
    left: 215px;
    width: 70px;
    height: 28px;
    font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
    font-size: 15px;
    font-style: normal;
    font-weight: 700;
    line-height: 28px;
    color: white;
    text-align: center;
    background: inherit;
    background-color: #345fa6;
    border: none;
    border-width: 0;
    border-radius: 61px;
    -webkit-box-shadow: none;
    box-shadow: none;

    &:hover {
      background-color: #4d78c3;
    }
  }
}

.add-device-panel-root {
  height: 100%;

  .add-device-panel {
    float: left;
    width: 100%;
    height: 100%;
    -webkit-transition: width 0.5s;
    -moz-transition: width 0.5s;
    -o-transition: width 0.5s;
    transition: width 0.5s;
  }

  .add-device-panel-top {
    float: left;
    width: 100%;
    height: 50px;
    background-color: #e3e3e3;

    .add-device-panel-head-root {
      .add-device-panel-head-back {
        float: right;
        width: 50px;
        height: 50px;
        font-size: 15px;
        background: inherit;
        background-color: rgba(227, 227, 227, 1);
        border-color: rgba(222, 221, 222, 1);
        border-style: solid;
        border-width: 1px;
        border-radius: 0;
        -moz-box-shadow: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        box-sizing: border-box;

        img {
          padding-top: 10px;
          padding-left: 10px;
        }

        &:hover {
          cursor: pointer;
          background-color: #f0f0f0;
        }
      }

      .add-device-panel-head-save {
        float: right;
        width: 50px;
        height: 50px;
        font-size: 15px;
        background: inherit;
        background-color: rgba(227, 227, 227, 1);
        border-color: rgba(222, 221, 222, 1);
        border-style: solid;
        border-width: 1px;
        border-radius: 0;
        -moz-box-shadow: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        box-sizing: border-box;

        img {
          padding-top: 10px;
          padding-left: 10px;
        }

        &:hover {
          cursor: pointer;
          background-color: #f0f0f0;
        }
      }

      .add-device-panel-head-help {
        float: right;
        width: 50px;
        height: 50px;
        font-size: 15px;
        background: inherit;
        background-color: rgba(227, 227, 227, 1);
        border-color: rgba(222, 221, 222, 1);
        border-style: solid;
        border-width: 1px;
        border-radius: 0;
        -moz-box-shadow: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        box-sizing: border-box;

        img {
          padding-top: 10px;
          padding-left: 10px;
        }

        &:hover {
          cursor: pointer;
          background-color: #f0f0f0;
        }
      }
    }
  }

  .add-device-panel-body {
    float: left;
    width: 100%;
    height: calc(100% - 50px);

    .add-device-panel-body-root {
      width: 100%;
      height: 100%;

      .add-device-panel-body-left {
        float: left;
        width: 300px;
        height: 100%;
        overflow-y: auto;
        border-right: 1px solid rgb(222, 221, 222);
        border-radius: 0;

        .add-device-left-basic {
          @extend %template-basic-style;
        }

        .add-device-left-config {
          @extend %template-config-style;
        }
      }

      .add-device-panel-body-right {
        width: calc(100% - 300px);
        height: 100%;
        overflow-y: auto;

        .add-device-left-capacity {
          @extend %template-capacity-style;
        }

        .add-device-left-quota {
          @extend %template-quota-style;
        }
      }
    }
  }

  .add-device-config-panel {
    float: left;
    width: 298px;
    height: calc(100% - 2px);
    border: 1px solid #deddde;
    border-radius: 0;

    .interface-property-root {
      width: 100%;
      height: 100%;

      .interface-property-head {
        @extend %common-property-head;
      }

      .amos-collapse-header {
        @extend %common-collapse-header;
      }
    }

    .quota-property-root {
      width: 100%;
      height: 100%;

      .quota-property-head {
        @extend %common-property-head;
      }

      .quota-property-content {
        height: calc(100% - 88px);
        overflow-y: auto;
      }

      .quota-property-title {
        padding-top: 15px;
        padding-left: 10px;
        font-family: 'Arial Normal', 'Arial';
        font-size: 20px;
        font-style: normal;
        font-weight: 400;
        line-height: 36px;
        color: black;
        border-top: 1px solid lightgray;
      }

      .amos-collapse {
        border: 0;

        .amos-collapse-item {
          &:last-child {
            border-bottom: 0;
          }
        }

        .amos-collapse-header {
          @extend %common-collapse-header;
        }

        .amos-collapse-content {
          .interface-property-title {
            margin-left: 10px;
            font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
            font-size: 15px;
            font-weight: 700;
            line-height: 40px;
            color: #333333;
          }

          .amos-collapse-content-box {
            margin: 0;
          }
        }

        .capacity-property-info {
          padding-left: 10px;
          background-color: white;

          .amos-checkbox-group {
            .hidden-threshold-input {
              visibility: hidden;
            }

            .threshold-input-root {
              position: relative;
              top: -34px;
              left: 110px;
              z-index: 1;
              float: left;
              width: 120px;

              .threshold-start-input {
                float: left;
                width: 35px;
              }

              .threshold-input-symbol {
                float: left;
                line-height: 30px;
              }

              .threshold-end-input {
                float: left;
                width: 35px;
              }

              .threshold-input-unit {
                float: left;
                width: 39px;
                margin-left: 5px;
                line-height: 26px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
              }
            }

            .threshold-name-root {
              .threshold-name {
                position: relative;
                left: -102px;
                z-index: 1;
                float: left;
                width: 90px;
                overflow: hidden;
                font-family: 'Arial Normal', 'Arial';
                font-size: 15px;
                font-style: normal;
                font-weight: 400;
                line-height: 40px;
                color: #333333;
                text-overflow: ellipsis;
                white-space: nowrap;
              }
            }

            .threshold-name-first-root {
              .threshold-name {
                position: relative;
                left: 18px;
                z-index: 1;
                float: left;
                width: 90px;
                overflow: hidden;
                font-family: 'Arial Normal', 'Arial';
                font-size: 15px;
                font-style: normal;
                font-weight: 400;
                line-height: 40px;
                color: #333333;
                text-overflow: ellipsis;
                white-space: nowrap;
              }
            }

            .amos-checkbox {
              height: 40px;

              .amos-checkbox-text {
                margin-left: 0;
                font-family: 'Arial Normal', 'Arial';
                font-size: 15px;
                font-style: normal;
                font-weight: 400;
                line-height: 40px;
                color: #333333;
              }

              .amos-checkbox-status {
                &::before {
                  top: 50%;
                  left: 230px;
                  width: 16px;
                  height: 16px;
                  margin-top: -8px;
                  font-size: 16px;
                  background-color: white;
                  border: 1px solid #9e9e9e;
                }

                &::after {
                  top: 50%;
                  left: 235px;
                  width: 6px;
                  height: 10px;
                  margin-top: -6px;
                  border: 2px solid #19afff;
                  border-top: 0;
                  border-left: 0;
                  -webkit-transform: rotate(45deg);
                  -ms-transform: rotate(45deg);
                  transform: rotate(45deg);
                }
              }
            }

            .amos-checkbox-indeterminate {
              .amos-checkbox-status {
                &::before {
                  top: 50%;
                  left: 230px;
                  width: 16px;
                  height: 16px;
                  margin-top: -8px;
                  font-size: 16px;
                  background-color: white;
                  border: 1px solid #9e9e9e;
                }

                &::after {
                  top: 50%;
                  left: 233px;
                  width: 10px;
                  height: 10px;
                  margin-top: -5px;
                  background-color: #19afff;
                  border: 0;
                  -webkit-transform: none;
                  -ms-transform: none;
                  transform: none;
                }
              }
            }

            .amos-checkbox-indeterminate + .amos-checkbox {
              .attribute-threshold-text {
                left: 0;
              }
            }
          }

          .config-collapse-text {
            padding-left: 5px;
          }

          .amos-collapse-content {
            padding: 0;
          }
        }
      }
    }
  }
}

%interface-cell-content {
  .interface-cell-img {
    float: left;

    img {
      width: 21px;
      height: 21px;
      visibility: visible;

      &:first-child {
        width: 0px;
        height: 21px;
        visibility: hidden;
      }
    }
  }

  &:hover {
    cursor: pointer;

    .interface-cell-img {
      float: left;

      img {
        width: 0px;
        visibility: hidden;

        &:first-child {
          width: 21px;
          height: 21px;
          visibility: visible;
          float: right;
          padding-top: 1px;
          padding-left: 2px;
        }
      }
    }
  }
}

.interface-cell-enable-root {
  @extend %interface-cell-content;

  height: 25px;
  padding-right: 2px;
  padding-left: 5px;
  margin: 4px 2px;
  background: inherit;
  background-color: rgba(255, 255, 255, 1);
  border: 1px solid rgba(52, 95, 166, 1);
  border-radius: 28px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  box-sizing: border-box;

  .interface-cell-text {
    float: left;
    width: auto;
    overflow: hidden;
    font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
    font-style: normal;
    font-weight: 700;
    line-height: 26px;
    color: #2d5391;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.interface-cell-disable-root {
  @extend %interface-cell-content;

  height: 25px;
  padding-right: 2px;
  padding-left: 5px;
  margin: 4px 2px;
  background: inherit;
  background-color: rgba(255, 255, 255, 1);
  border: 1px solid rgba(204, 204, 204, 1);
  border-radius: 28px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  box-sizing: border-box;

  .interface-cell-text {
    float: left;
    width: auto;
    overflow: hidden;
    font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
    font-style: normal;
    font-weight: 700;
    line-height: 26px;
    color: #bcbcbc;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.interface-cell-success-root {
  @extend %interface-cell-content;

  height: 25px;
  padding-right: 2px;
  padding-left: 5px;
  margin: 4px 2px;
  background: inherit;
  background-color: rgba(255, 255, 255, 1);
  border: 1px solid rgba(102, 204, 0, 1);
  border-radius: 28px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  box-sizing: border-box;

  .interface-cell-text {
    float: left;
    width: auto;
    overflow: hidden;
    font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
    font-style: normal;
    font-weight: 700;
    line-height: 26px;
    color: #66cc00;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.interface-cell-fail-root {
  @extend %interface-cell-content;

  height: 25px;
  padding-right: 2px;
  padding-left: 5px;
  margin: 4px 2px;
  background: inherit;
  background-color: rgba(255, 255, 255, 1);
  border: 1px solid rgba(255, 0, 0, 1);
  border-radius: 28px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  box-sizing: border-box;

  .interface-cell-text {
    float: left;
    width: auto;
    overflow: hidden;
    font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
    font-style: normal;
    font-weight: 700;
    line-height: 26px;
    color: #ff0000;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

%quota-cell-content {
  .quota-cell-img {
    display: none;

    .img {
      width: 21px;
      height: 21px;
    }
  }

  .quota-cell-name {
    margin-bottom: 10px;
    font-size: 16px;
  }

  .quota-cell-desc {
    font-size: 13px;
  }

  &:hover {
    cursor: pointer;
    box-shadow: 3px 3px 3px 1px lightgrey;

    .quota-cell-img {
      position: relative;
      top: -30px;
      left: 250px;
      display: inline;
    }
  }
}

.quota-cell-enable-root {
  @extend %quota-cell-content;

  float: left;
  width: 309px;
  height: 106px;
  padding: 20px 15px;
  margin: 10px;
  background: inherit;
  background-color: rgba(102, 204, 0, 0.0980392156862745);
  border-color: rgba(102, 204, 0, 1);
  border-style: solid;
  border-width: 1px;
  border-radius: 4px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  box-sizing: border-box;
}

.quota-cell-disable-root {
  @extend %quota-cell-content;

  float: left;
  width: 309px;
  height: 106px;
  padding: 20px 15px;
  margin: 10px;
  background: inherit;
  background-color: rgba(240, 240, 240, 1);
  border-color: rgba(194, 193, 194, 1);
  border-style: solid;
  border-width: 1px;
  border-radius: 4px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  box-sizing: border-box;
}

.rotate-ninety {
  position: absolute;
  top: 16px;
  right: 15px;
  -moz-transform: rotate(90deg);
  -o-transform: rotate(90deg);
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}

.rotate-negative-ninety {
  position: absolute;
  top: 16px;
  right: 15px;
  -moz-transform: rotate(270deg);
  -o-transform: rotate(270deg);
  -webkit-transform: rotate(270deg);
  transform: rotate(270deg);
}

.property-config-common {
  height: 52px;
  padding: 10px 20px 10px 10px;

  .amos-editable {
    overflow: visible;
  }

  .property-key-style {
    float: left;
    width: 80px;
    overflow: hidden;
    font-family: 'Microsoft Tai Le';
    font-size: 15px;
    line-height: 33px;
    color: rgba(0, 0, 0, 0.847058823529412);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .property-normal-label {
    top: 5px;
    width: 150px;
    overflow: hidden;
    font-family: 'Microsoft Tai Le';
    font-size: 15px;
    line-height: 33px;
    color: rgb(52, 95, 166);
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
  }

  .ant-select-selection {
    height: 30px;
    border-color: lightgrey;
    border-radius: 4px;
  }

  .amos-checkbox-text {
    margin-left: 7px;
    font-family: 'Microsoft Tai Le';
    pointer-events: none;
    font-size: 15px;
    line-height: 2.5rem;
    color: rgba(0, 0, 0, 0.847059);
  }

  .amos-editable-normal-container {
    top: 5px;
    height: 2.5rem;
    overflow: hidden;
    font-family: 'Microsoft Tai Le';
    font-size: 15px;
    line-height: 2.8rem;
    color: #345fa6;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
  }

  .amos-editable-editing-container {
    .amos-input {
      font-family: 'Microsoft Tai Le';
      font-size: 15px;
      line-height: 2.5rem;
      color: #345fa6;
    }
  }
}
