$tabs-topbar-bg-color: linear-gradient(180deg, white 0%, white 0%, rgba(228, 228, 228, 1) 100%, rgba(228, 228, 228, 1) 100%);
$trigger-border: 1px solid #797979;
$trigger-border-color: #797979;
$trigger-bg-color: #d8d8d8;

.trigger-editor-content {
  height: 100%;

  .trigger-editor-title {
    height: 2.4rem;
    padding-left: 1rem;
    font-size: 1.2rem;
    line-height: 2.4rem;
    background-color: rgba(221, 228, 229, 1);
    border: 1px solid #797979;

    .trigger-editor-title-input {
      height: 2rem;
      padding-right: 0;
      margin: 0.1rem 1rem 0 0;
      font-size: 1.1rem;
      vertical-align: top;
      background: transparent;
      border: 0;

      &:hover {
        background: white;
        border: 1px solid #999;
      }

      &.trigger-editor-title-input-focus {
        background: white;
        border: 1px solid #999;
      }
    }

    .trigger-editor-title-order {
      width: 50px;
      height: 2rem;
      padding-right: 0;
      margin: 0.1rem 1rem 0 0;
      font-size: 1.1rem;
      vertical-align: top;
      background: rgb(248, 250, 251);
      border: 1px solid #999;
    }
  }

  .trigger-editor-textarea {
    height: 15rem;
    background-color: rgba(216, 216, 216, 1);
    border: 1px solid #797979;
    border-top: 0;
  }

  .trigger-editor-breadcrumb {
    height: 2.4rem;
    background: linear-gradient(180deg, white 0%, white 0%, rgba(228, 228, 228, 1) 100%, rgba(228, 228, 228, 1) 100%);
    border: 1px solid #797979;
    border-top: 0;
  }

  .trigger-editor-attribute {
    position: relative;
    height: calc(100% - 17.4rem);
    background: #f1f1f1;
    border: 1px solid #797979;
    border-top: 0;

    .trigger-tabs-title {
      position: absolute;
      top: 0;
      left: 0;
      padding: 0.6rem;
      font-size: 1.2rem;
      color: black;

      &::before {
        position: absolute;
        top: 0;
        left: 100%;
        display: block;
        width: 0;
        height: 0;
        border: solid transparent;
        border-left-color: $trigger-border-color;
        border-width: 1.5rem;
        content: '';
      }

      &::after {
        position: absolute;
        top: 1px;
        left: 100%;
        display: block;
        width: 0;
        height: 5;
        border: solid transparent;
        border-left-color: #efefef;
        border-width: calc(1.5rem - 1px);
        content: '';
      }
    }

    > .trigger-tabs {
      height: 100%;

      > .trigger-tabslist {
        text-align: center;
        background: $tabs-topbar-bg-color;
        border-bottom: $trigger-border;

        .amos-tabs-tabitem {
          border-right: $trigger-border;

          .amos-tabs-tabitem-inner {
            padding: 0.6rem 3.5rem;
            font-size: 14px;
            color: black;

            &:hover {
              background-color: $trigger-bg-color;
            }
          }

          &:first-child {
            border-left: $trigger-border;
          }

          &.amos-tabs-tabitem-active {
            .amos-tabs-tabitem-inner {
              background: $trigger-bg-color;
            }
          }
        }
      }

      .trigger-tabs-panel {
        height: calc(100% - 3.5rem);
        padding: 0;

        .amos-tabs {
          .amos-tabs-list {
            padding: 0 0.5rem;
            border-bottom: 0;

            .amos-tabs-tabitem {
              margin: 0 1px;
              color: black;
              text-align: center;
              background: linear-gradient(180deg, white 0%, white 0%, rgba(228, 228, 228, 1) 100%, rgba(228, 228, 228, 1) 100%);
              border: 1px solid #999;
              border-bottom: 0;
              border-radius: 0.8rem 0.8rem 0 0;

              .amos-tabs-tabitem-inner {
                min-width: auto;
                padding: 0.2rem 1rem;

                &:hover {
                  color: black;
                  background-color: transparent;
                }
              }

              &.amos-tabs-tabitem-active {
                position: relative;
                top: 1px;
                z-index: 2;

                .amos-tabs-tabitem-inner {
                  padding: 0.22rem 1rem;
                  color: black;
                  background-color: #f1f1f1;
                  border-radius: 0.8rem 0.8rem 0 0;
                }
              }
            }
          }

          .amos-tabs-panel {
            min-height: 60px;
            padding: 10px;
            background: #f1f1f1;
            border: 1px solid #999;
          }
        }
      }
    }

    .trigger-top-bar {
      height: 2.2rem;
      padding-left: 1rem;
      line-height: 2.2rem;
      text-align: right;
      background: #dde4e5;
      border-bottom: $trigger-border;

      > span {
        float: left;
      }

      button {
        height: 2.1rem;
        margin: 0 !important;
        line-height: 2.1rem;
        color: black;
        vertical-align: top;
        background: $tabs-topbar-bg-color;
        border: 0;
        border-left: $trigger-border;
        border-radius: 0;

        &:hover {
          background-color: $trigger-bg-color;
        }
      }
    }

    .trigger-select-content {
      height: 100%;

      .trigger-select-body {
        width: 100%;
        height: calc(100% - 2.2rem);
        overflow-y: scroll;
        background: #e4e4e4;

        .trigger-stem {
          display: flex;
          min-height: 100px;
          padding: 1.2rem 1rem;
          border-bottom: $trigger-border;

          .trigger-stem-before {
            width: 110px;
            font-size: 1.2rem;

            span {
              display: inline-block;
              width: 1.6rem;
              height: 1.6rem;
              margin-right: 0.5rem;
              font-size: 1.1rem;
              line-height: 1.4rem;
              text-align: center;
              background: $tabs-topbar-bg-color;
              border: $trigger-border;
              border-radius: 50%;

              &.trigger-stem-height-light {
                color: white;
                background: linear-gradient(180deg, rgba(89, 218, 20, 1) 0%, rgba(89, 218, 20, 1) 2%, rgba(38, 201, 63, 1) 100%, rgba(38, 201, 63, 1) 100%);
              }
            }

            button {
              height: 2rem;
              padding: 0.2rem 1rem;
              margin-top: 1rem;
              margin-right: 1rem;
              font-size: 1.2rem;
              color: black;
              background: $tabs-topbar-bg-color;
              border: $trigger-border;
              border-radius: 1rem;
              opacity: 1;

              &:hover {
                background: $trigger-bg-color;
              }
            }
          }

          .trigger-stem-after {
            width: calc(100% - 110px);
          }
        }
      }
    }
  }

  .trigger-breadcrumb {
    height: 100%;

    div {
      position: relative;
      display: inline-block;
      width: 13%;
      height: 100%;
      margin-right: 1.7rem;
      line-height: 2.4rem;
      text-align: center;
      background-color: #ccc;
      border-right: 0;

      &.trigger-breadcrumb-active {
        color: white;
        background-color: #f90;

        &::before {
          position: absolute;
          top: 0;
          left: -1.2rem;
          border-top: calc(1.2rem - 1px) solid #f90;
          border-bottom: 1.2rem solid #f90;
          border-left: 1.2rem solid transparent;
          content: '';
        }

        &::after {
          position: absolute;
          top: 0;
          right: -1.2rem;
          border-top: 1.2rem solid transparent;
          border-bottom: 1.2rem solid transparent;
          border-left: 1.2rem solid #f90;
          content: '';
        }
      }

      &::before {
        position: absolute;
        top: 0;
        left: -1.2rem;
        border-top: calc(1.2rem - 1px) solid #ccc;
        border-bottom: 1.2rem solid #ccc;
        border-left: 1.2rem solid transparent;
        content: '';
      }

      &::after {
        position: absolute;
        top: 0;
        right: -1.2rem;
        border-top: 1.2rem solid transparent;
        border-bottom: 1.2rem solid transparent;
        border-left: 1.2rem solid #ccc;
        content: '';
      }
    }
  }
}

.trigger-btn-area {
  padding: 1rem;

  .amos-steps-item-title {
    display: block;
    width: 100%;
    font-size: 1.2rem;
    line-height: 1.2rem;

    &::before {
      position: relative;
      top: 0.6rem;
      display: inline-block;
      float: right;
      width: calc(100% - 4rem);
      border-top: 1px solid #838383;
      content: '';
    }
  }
}

.trigger-item {
  padding-right: 10px;
  color: black;

  .amos-textarea {
    width: 100%;
    height: 6rem;
    padding: 5px;
    border: 1px solid #999;
  }
}

.trigger-btn-item {
  height: 2rem;
  max-width: 10rem;
  padding: 0.2rem 1rem;
  margin-bottom: 5px;
  overflow: hidden;
  font-size: 1.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(180deg, white 0%, rgba(242, 242, 242, 1) 0%, rgba(228, 228, 228, 1) 100%, white 100%);
  border: 1px solid rgba(153, 153, 153, 1);
  border-radius: 1rem;
  opacity: 1;

  i {
    position: relative;
    top: 1px;
  }

  &:hover {
    background: $trigger-bg-color;
  }

  &.trigger-btn-item-height-light {
    color: white;
    background: linear-gradient(180deg, rgba(89, 218, 20, 1) 0%, rgba(89, 218, 20, 1) 2%, rgba(38, 201, 63, 1) 100%, rgba(38, 201, 63, 1) 100%);
  }
}

.trigger-finish-btns {
  padding: 5px 20px;
  text-align: right;
}

.trigger-textarea-bg {
  position: absolute;
  width: 100%;

  .trigger-textarea-bg-item {
    height: 2.2rem;
    background: #f1f1f1;
    border-bottom: 1px solid #666;

    .trigger-textarea-bg-item-no {
      display: inline-block;
      width: 2rem;
      height: 100%;
      line-height: 2.2rem;
      text-align: center;
      vertical-align: top;
      background: #d8d8d8;
      border-right: 1px solid #666;
    }

    .trigger-textarea-bg-item-content {
      display: inline-block;
      width: calc(100% - 2rem);
      height: 2.2rem;
    }
  }
}

.trigger-textarea {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;

  .trigger-textarea-content {
    position: absolute;
    z-index: 5;
    width: 100%;
    background: transparent;

    .trigger-textarea-item {
      position: relative;
      height: 2.2rem;
      padding-right: 30px;
      padding-left: 2.2rem;
      overflow: hidden;
      line-height: 2.2rem;
      color: black;
      text-overflow: ellipsis;
      white-space: nowrap;

      &:hover {
        background: rgba(255, 153, 0, 0.1);
      }

      &.trigger-textarea-item-height-light {
        background: rgba(255, 153, 0, 0.1);
      }

      .trigger-textarea-title {
        font-weight: bold;
      }

      .trigger-textarea-item-del {
        position: absolute;
        right: 10px;
        color: #666;
        cursor: pointer;
      }
    }

    .single-rule-text {
      .trigger-textarea-rule-orwith {
        display: inline-block;
        width: 3rem;
        font-weight: bold;
      }

      .trigger-textarea-rule-attribute {
        margin-right: 5px;
        color: #f90;
      }

      .trigger-textarea-rule-condition {
        display: inline-block;
        height: 1.6rem;
        padding: 0 5px;
        margin-right: 5px;
        line-height: 1.6rem;
        color: white;
        background: linear-gradient(180deg, rgba(89, 218, 20, 1) 0%, rgba(89, 218, 20, 1) 2%, rgba(38, 201, 63, 1) 100%, rgba(38, 201, 63, 1) 100%);
        border-radius: 0.8rem;
      }

      .trigger-textarea-rule-result {
        color: #63f;
      }
    }
  }
}
