@import '../style/mixin';

@mixin tool-btn {
  border: 1px solid #ddd;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  outline: none;
  border-radius: 6px;
  color: #555;
}

.p-title-box {
  .p-title {
    font-size: 20px;
  }
  input {
    width: 300px;
    margin-left: 10px;
  }
}

.p-content {
  border: 1px solid #ddd;
  box-shadow: 0 0 8px #eee;
  margin-top: 10px;
}

.p-divider {
  border-left: 1px solid #ccc;
  margin: 5px 8px;
  height: 85%;
}

.p-tool-box {
  background-color: #efefef;
  padding: 2px;
  height: 37px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ddd;

  // save
  .i-tool-save {
    @include tool-btn();
    color: white;
  }
  .i-tool-save:disabled {
    color: #555;
  }

  // font-size
  .i-tool-font-size {
    @include tool-btn();
    width: 37px;

    & > span {
      position: absolute;
      top: -5px;
      right: 5px;
    }
  }
  .i-tool-font-size:hover {
    color: black;
    border-color: #bbb;
  }

  // font-color
  .i-tool-font-color {
    border: 1px solid #ddd;
    //padding: 3px 7px;
    border-radius: 6px;
    width: 45px;
    height: 31px;
    background-color: white;
    color: #555;
    ::ng-deep > span {
      display: flex;
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      padding: 3px 7px;
    }
    .i-left {
      .fa-font {
        font-size: 10px;
        position: absolute;
        color: #555;
        left: 8px;
        top: 7px;
      }
      .i-color {
        width: 68%;
        height: 5px;
        background-color: black;
        position: absolute;
        top: 21px;
        left: 5px;
      }
    }
    .i-dropdown-menu {
      width: 15px;
      font-size: 10px;
      border-left: 1px solid #ddd;
      display: flex;
      align-items: center;
      .anticon-down {
        transform: scale(0.6);
      }
    }
  }

  // bg-color
  .i-tool-bg-color {
    @include tool-btn();
    padding: 0 9px;
    ::ng-deep > span {
      display: flex;
      align-items: center;
    }

    .i-color {
      display: block;
      width: 16px;
      height: 16px;
      background-color: white;
      margin-left: 10px;
    }
  }

  // animation
  .i-tool-animation {

  }

  // restore
  .i-tool-restore {
  }

  // horizontal-center
  .i-tool-horizontal-center {
    @include tool-btn();
    width: 37px;
  }

  // delete
  .i-tool-delete {

  }
}

.p-box {
  width: 1280px;
  height: 720px;
  left: 0;
  top: 0;
  transform-origin: top left;
  overflow: hidden;
}

.p-sentence {
  @include k-no-select();
}

.p-animation-index-box {
  .i-animation-index {
    position: absolute;
    font-size: 34px;
    font-family: Arial;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: darkorange;
    color: white;
  }
}

.p-edit {
  background-color: white;
  border: 1px solid black;
  padding: 2px 15px;
}

.p-selected {
  border: 1px solid darkorange;
  box-shadow: 0 0 8px #ddd;
}

.p-tool-item-disable {
  color: rgba(0, 0, 0, .25) !important;
  background-color: transparent !important;
  pointer-events: none;
}

// -----------
.p-color-pane {
  width: 105px;
  .p-color-item {
    width: 17px;
    height: 17px;
    cursor: pointer;
    margin: 4px;
    border: 1px solid #bbb;
  }
  .p-color-item-active {
    border: 1px solid white;
    transform: scale(1.1);
  }
}

.p-user-guide {
  font-size: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.p-animation-box {
  width: 400px;
  background-color: #efefef;
  border-left: 1px solid #ddd;
  padding: 10px;
  text-align: center;

  .p-animation-label {
    z-index: 1;
    position: relative;
  }

  ::ng-deep .ant-radio-button-wrapper {
    padding: 0 10px;
    @include k-no-select();
  }

  .i-toolbox {
    & > div {
      font-size: 20px;
      cursor: pointer;
      color: #555;
      padding: 0 3px;
      margin: 0 5px;
    }
    & > div:hover {
      color: #1585ff;
      transform: scale(1.1);
    }
  }

  .p-animation-list {
    background-color: white;
    border-radius: 10px;
    height: calc(100% - 86px);
    overflow-y: auto;
    .p-animation-item {
      padding: 0 20px;
      background-color: aliceblue;
      margin-top: 6px;
      border-top: 1px solid #ddd;
      border-bottom: 1px solid #ddd;
      cursor: pointer;
      text-align: left;
      display: flex;
      @include k-no-select();
    }
    .i-active {
      background-color: antiquewhite;
    }
  }
}
