@import 'animation.less';
@import 'reset.less';
@import 'tdesign-reset.less';
html,
body {
  height: 100%;
  background-size: cover;
  font-size: 14px;
  color: @dark-text-color;
}
#app {
  height: 100%;
  min-width: 1200px;
}
.ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.layout-header {
  width: 100%;
  // box-shadow: 1px 1px 2px var(--color-neutral-2);
}

.table-operations {
  & > .t-link:not(:first-child) {
    margin-left: 15px;
  }
}

.page-action {
  padding: 16px 16px 1px;
  background-color: #fff;
  & > .t-button {
    &:not(:first-child) {
      margin-left: 16px;
    }
  }
}
.page-header {
  padding: 16px;
  border-bottom: 1px solid @light-border-color;
}
.table-search {
  padding: 16px 16px 1px;
  background-color: #fff;
  border-bottom: 1px solid #e5e5e5;

  .other-rows {
    height: 0;
    overflow: hidden;
    transition: all 0.2s;
    flex-wrap: wrap;
    display: flex;
  }

  &.in-padding {
    margin: -10px;
  }

  .t-form__item {
    margin-bottom: 16px;
    .t-form__label {
      padding-right: 8px;
    }
    .t-form__controls-content {
      & > .t-date-picker,
      & > .t-time-picker {
        width: 100%;
      }
    }
  }
  .t-date-range-picker {
    width: 100%;
  }
  .t-form__item.buttons-wrap {
    .t-form__controls-content {
      .t-button {
        margin-left: 16px;
        margin-bottom: 16px;
      }
    }
  }
}
.page-wrap {
  margin: 16px;
  &-tips {
    color: #4e5969;
    margin-bottom: 12px;
    .t-icon {
      margin-top: -3px;
    }
    .t-space-item-separator {
      font-size: 0;
    }
    .t-divider {
      border-color: #4e5969;
    }
  }
  > .t-table {
    background-color: transparent;

    th {
      background-color: #fff;
      color: @light-text-color;
      font-weight: 400;
      padding: 12px 16px;
    }
    td {
      padding: 12px 16px;
      color: #262626;
      font-weight: 400;
    }

    .t-table__pagination {
      padding: 12px 0;
    }
    .t-input-adornment__append {
      border: 1px solid #d9d9d9;
      padding: 0 3px;
      height: var(--td-comp-size-m);
    }
    .t-pagination .t-input {
      height: var(--td-comp-size-m);
    }
  }
  > .t-table--bordered {
    td,
    th,
    .t-table__content {
      border-color: @light-border-color;
    }
    .t-table__content {
      border-radius: 4px;
    }
  }
}
.page-pagination {
  padding: 12px 0;
  .t-input-adornment__append {
    border: 1px solid #d9d9d9;
    padding: 0 3px;
    height: var(--td-comp-size-m);
  }
  .t-input-number .t-input {
    height: var(--td-comp-size-m);
  }
}
.page-tab {
  color: var(--td-text-color-primary);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-size: var(--td-font-body-large);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  white-space: nowrap;
  border-radius: var(--td-radius-default);
  transition: all 0.2s linear;
  touch-action: manipulation;
  text-decoration: none;
  position: relative;

  height: var(--td-comp-size-xl);
  font: var(--td-font-body-large);
  padding-left: calc(var(--td-comp-paddingLR-xl) - 1px);
  padding-right: calc(var(--td-comp-paddingLR-xl) - 1px);

  &:not(:first-child) {
    margin-left: 8px;
  }

  &.is-active {
    color: @brand-color;
    background-color: #e8f3ff;
  }
  &.is-mark {
    &::after {
      content: '';
      display: block;
      position: absolute;
      width: 8px;
      height: 8px;
      background: var(--td-error-color);
      border-radius: 50%;
      top: 50%;
      margin-top: -4px;
      right: 8px;
    }
  }
  &:not(.is-active):hover {
    background-color: var(--td-gray-color-3);
  }
}
.btn-group {
  & > .t-button {
    &:not(:first-child) {
      margin-left: 10px;
    }
  }
}
.form-title {
  line-height: 40px;
  color: #333;
  font-weight: bold;
}

.read-only {
  height: 30px;
  border-radius: 4px;
  background-color: #f5f6f8;
  line-height: 30px;
  padding-left: 8px;
  width: 100%;
}
.my-form-item {
  padding-right: 15px;
  padding-left: 15px;
  .t-form__controls-content {
    // flex-direction: column;
    // align-items: flex-start;
    .sub-title {
      margin-bottom: 10px;
      p {
        font-size: 13px;
        line-height: 30px;
      }
    }
    .top-label {
      font-size: 14px;
      margin-bottom: 5px;
      // margin-left: -8px;
      span {
        color: red;
      }
      p {
        font-weight: bold;
        flex: 1;
      }
      .require-icon {
        margin-right: 3px;
        &.hide {
          opacity: 0;
        }
      }
    }
  }
}
.form-group-title {
  margin: 20px 0 5px;
  font-size: 16px;
  font-weight: bold;
  // color: @dark-text-color;
  // color: var(--td-brand-color);
  color: #262626;
  line-height: 24px;
}
.form-item-title {
  font-size: 16px;
  font-weight: bold;
  color: @dark-text-color;
  line-height: 24px;
}
.table {
  width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
  text-align: left;

  &.table-white {
    background-color: #fff;
  }

  th {
    padding: 12px;
    line-height: 1.2;
    letter-spacing: 1px;
    color: @light-text-color;
    border: 1px solid @light-border-color;
  }
  td {
    padding: 14px;
    line-height: 1.2;
    color: @dark-text-color;
    border: 1px solid @light-border-color;

    &.td-link {
      span {
        cursor: pointer;
        &:hover {
          color: @light-text-color;
        }
      }
    }
  }
  .td-th {
    font-weight: 600;
    color: @light-text-color;
  }

  &--border {
    border: 1px solid @light-border-color;
    border-radius: 10px;
    th {
      background-color: #fcfcfd;
      border: none;
      border-bottom: 1px solid @light-border-color;
    }
    td {
      border: none;
      border-bottom: 1px solid @light-border-color;
    }
  }
}

.box-justify {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.flex-row {
  flex-direction: row;
}

.text-indent {
  text-indent: 2em;
}
.width-full {
  width: 100%;
}
.red {
  color: @error-color;
}
.gray {
  color: @light-text-color;
}

.color-brand {
  color: @brand-color;
}
.color-error {
  color: @error-color;
}
.color-success {
  color: @success-color;
}
.color-warning {
  color: @warning-color;
}

// pages ---------------->
// message-list
.message-list {
  height: 100%;
  position: relative;
  .none-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    img {
      height: 80px;
      display: block;
      margin: 0 auto;
    }
    p {
      color: @light-text-color;
      font-size: 14px;
    }
  }
  .message-item {
    border: 1px solid @light-border-color;
    border-radius: 4px;
    background-color: #fff;
    padding: 16px;
    margin-bottom: 16px;
    .m-head {
      border-bottom: 1px solid @light-border-color;
      line-height: 24px;
      padding-bottom: 16px;

      display: flex;
      justify-content: space-between;
      align-items: center;

      .m-title {
        font-size: 16px;
        color: @dark-text-color;
        font-weight: bold;
        margin-right: 12px;
        flex-grow: 2;
        font-size: 0;

        > span {
          display: inline-block;
          vertical-align: middle;
          margin-right: 12px;
        }
        span:first-child {
          font-size: 14px;
        }
      }
      .m-time {
        flex-grow: 0;
        color: @light-text-color;
      }
    }
    .m-body {
      .m-content {
        color: @dark-text-color-2;
        font-weight: 500;
        line-height: 22px;
        padding: 16px 0 8px 0;
      }
      .m-info {
        color: @light-text-color;
        line-height: 22px;
      }
    }
  }
}
// sop-dialog
.sop-dialog {
  .t-drawer__header {
    border: none;
  }
  .t-drawer__body {
    padding-top: 0;
  }
  .t-collapse {
    margin-bottom: 16px;
    border-radius: 3px;
  }
  .t-collapse,
  .t-collapse-panel__header,
  .t-collapse-panel__body {
    border-color: @light-border-color;
  }
  .t-collapse-panel__header {
    padding-top: 8px;
    padding-bottom: 8px;
    color: @dark-text-color;
  }
  .t-collapse-panel.t-is-disabled {
    cursor: auto;
    .t-collapse-panel__header {
      cursor: auto;
      color: @dark-text-color;
    }
  }
  .t-collapse-panel__content {
    background-color: #fff;
  }
  .sop-step {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .sop-step-header {
    flex-grow: 0;
    flex-shrink: 0;
    .t-collapse-panel__content {
      padding: 8px 40px;
    }
  }
  .sop-step-mid {
    flex-grow: 0;
    flex-shrink: 0;

    .t-collapse-panel__icon {
      display: none;
    }
    .t-collapse-panel__header {
      padding-left: 16px;
      padding-right: 16px;
    }
    .t-collapse-panel__content {
      padding: 8px 16px;
    }
    .t-form__label {
      line-height: 22px;
    }
    .t-form__controls,
    .t-form__controls-content {
      min-height: 22px;
    }
  }
  .sop-intro {
    padding: 8px;
    margin-top: 8px;
    flex-flow: 0;
    flex-shrink: 0;

    .t-alert__icon {
      display: none;
    }
    .t-alert__content {
      margin-left: 0;
    }
    .t-alert__description {
      color: @error-color;
    }
    &-title {
      float: left;
      font-size: 14px;
      .t-icon {
        margin-top: -3px;
      }
    }

    &-content {
      margin-left: 62px;
    }
  }
  .sop-step-list {
    display: flex;
    flex-grow: 2;
    border-radius: 3px;
    border: 1px solid @light-border-color;
    justify-content: space-between;
    align-items: stretch;
    position: relative;

    .step-list-header {
      padding: 8px;
    }

    .step-tabs-label {
      border-radius: 3px;
      padding: 7px 16px;
      line-height: 22px;
      cursor: pointer;

      &:not(:first-child) {
        margin-top: 5px;
      }

      &:hover,
      &.is-active {
        color: @brand-color;
        background-color: #e8f3ff;
      }
    }

    .t-tabs__bar {
      display: none;
    }

    .t-tabs__nav-wrap {
      padding: 8px;
      width: 100%;
    }
    .t-tabs__nav-item {
      height: auto;
      min-height: 36px;
      border-radius: 3px;
      &.t-is-active {
        .t-tabs__nav-item-wrapper {
          color: @brand-color;
          background-color: #e8f3ff;
        }
      }
    }
    .t-tabs__nav-item-wrapper {
      padding: 7px 16px;
      line-height: 22px;
      height: auto;
      margin: 0;
      width: 100%;
      margin-bottom: 5px;
    }

    .t-tabs__header {
      flex-grow: 0;
      flex-shrink: 0;
      width: 140px;
      overflow-y: auto;
      border-right: 1px solid @light-border-color;
    }
    .t-tabs__content {
      flex-grow: 2;
    }
    .t-tabs__nav-container::after {
      display: none;
    }

    .t-tab-panel {
      height: 100%;
      display: flex;
      justify-content: space-between;
      align-items: stretch;
      flex-direction: column;
    }
    .sop-step-body {
      flex-grow: 2;
      overflow: auto;
      padding: 15px 15px 30px;
      position: relative;
    }
    .sop-step-footer {
      flex-grow: 0;
      flex-shrink: 0;
      padding: 16px;
      border-top: 1px solid @light-border-color;
      flex-direction: row-reverse;
      min-height: 65px;
    }
  }

  .sop-step-content {
    flex-grow: 2;
    border-radius: 3px;
    border: 1px solid @light-border-color;
    padding: 16px;
    overflow: auto;

    > h3 {
      font-size: 16px;
      font-weight: bold;
      color: @dark-text-color;
      line-height: 24px;
      margin-bottom: 16px;
    }
  }
}
// sop-step-history
.sop-step-history {
  &-label {
    position: absolute;
    z-index: 99;
    top: 24px;
    right: 24px;
    padding: 16px 12px;
    background: @brand-color;
    border-radius: 3px;
    line-height: 22px;
    color: #ffffff;
    width: 38px;
    cursor: pointer;
    &:hover {
      background: #124eda;
    }
    .t-icon {
      margin-bottom: 8px;
      margin-top: -4px;
      font-size: 16px;
    }
  }
  &-content {
    position: absolute;
    z-index: 99;
    top: 24px;
    right: 70px;
    bottom: 89px;
    width: 366px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background: #ffffff;
    box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.12);
    border-radius: 3px;
    border: 1px solid @light-border-color;

    .content-head {
      flex-grow: 0;
      flex-shrink: 0;
      padding: 16px 24px;
      border-bottom: 1px solid @light-border-color;
    }
    .content-body {
      flex-grow: 2;
      overflow-y: auto;
      padding: 16px;

      .t-collapse,
      .t-collapse-panel__header,
      .t-collapse-panel__body {
        border: none;
      }
      .t-collapse-panel {
        margin-bottom: 8px;
      }
      .t-collapse-panel__content {
        padding: 8px 16px;
        background: #f2f3f5;
        border-radius: 3px;
      }
      .t-collapse-panel__header {
        padding: 8px;
        border-radius: 3px;
        font-weight: 400;
        &:hover {
          background: #e8f3ff;
        }
      }
      .collapse-head-right {
        color: @dark-text-color-2;
        font-size: 14px;
        font-weight: 400;
      }
    }
    .content-detail {
      &-head {
        padding-bottom: 8px;
        line-height: 22px;
        color: @dark-text-color;
        border-bottom: 1px solid #d9d9d9;
      }
      &-body {
        color: @dark-text-color-2;
        font-size: 12px;
        padding-top: 8px;
        line-height: 20px;
      }
    }
  }
}

.drill-search-box {
  display: flex;
  margin-bottom: 10px;
  .field {
    font-size: 14px;
    display: flex;
    height: 40px;
    align-items: center;
    .label {
      color: #595959;
    }
    .value {
      color: #262626;
      padding-left: 10px;
      padding-right: 50px;
    }
  }
}
