//==  visible
.fade {
  opacity: 0 !important;
  transition: opacity 0.15s linear;
  transition-delay: 0.15s;

  &.in {
    opacity: 1 !important;
  }
}

.full-spin-height {
  height: 100%;

  .ant-spin-nested-loading,
  .ant-spin-container {
    height: 100%;
  }
}

// hover
.hover-active {
  cursor: pointer;

  &:hover {
    color: $color-primary !important;
  }
}

.hover-active-bg {
  cursor: pointer;

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

.hover-table-text {
  cursor: pointer;

  &:hover {
    color: $color-primary;
    text-decoration: underline;
  }
}

.hover-text {
  cursor: pointer;

  &:hover {
    text-decoration: underline;
  }
}

.not-allowed {
  color: $color-disabled !important;
  cursor: not-allowed !important;

  &:hover {
    color: $color-disabled !important;
    text-decoration: unset !important;
  }
}

.code-block {
  padding: 0.5em;
  color: $lightnavy;
  font-size: 12px;
  background-color: $navy;
  border-radius: 4px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: $p12;
  font-weight: 500;
  font-size: 18px;
  font-family: PingFangSC-Medium, serif;
  line-height: 48px;
}

.top-button-group {
  @extend %top-button-group;
}

.status-pointer {
  display: inline-block;
  width: 12px;
}

.btn-line-rtl {
  overflow: hidden;

  button,
  a {
    display: inline-block;
    float: right;
    margin-left: 12px;
  }
}

.tag-base {
  display: inline-block;
  height: 24px;
  margin: 0 4px;
  padding: 0 8px;
  color: $white;
  font-weight: normal;
  font-size: 12px;
  line-height: 24px;
  white-space: nowrap;
  border-radius: 3px;
}

.tag-default {
  @extend .tag-base;
  color: $color-text-sub;
  background-color: rgba(0, 0, 0, 0.06);
}

.tag-danger {
  @extend .tag-base;
  background-color: $color-danger;
}

.tag-info {
  @extend .tag-base;
  background-color: $color-info;
}

.tag-warning {
  @extend .tag-base;
  background-color: $color-warning;
}

.tag-success {
  @extend .tag-base;
  background-color: $color-success;
}

.tag-primary {
  @extend .tag-base;
  background-color: $color-primary;
}

.table-operations {
  .table-operations-btn {
    @extend .hover-table-text;
    position: relative;
    margin-right: $p16;
    color: $color-primary;

    &:after {
      position: absolute;
      top: 3px;
      right: -8px;
      width: 1px;
      height: 14px;
      background: $color-dark-1;
      content: '';
    }

    &:last-child {
      margin-right: 0;

      &::after {
        display: none;
      }
    }
  }
}

.dice-badge {
  margin-left: 4px;
  padding: 0 4px;
  color: $color-text-sub;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid $color-border;
  border-radius: 1px;
}

.fake-link {
  color: transparentize($color-primary, 0.2);
  cursor: pointer;

  &:hover {
    color: $color-primary;
  }
}

.jump-out-link {
  cursor: alias;
}

.text-link {
  color: transparentize($color-primary, 0.2);
  cursor: pointer;

  &:hover {
    color: $color-primary;
    text-decoration: underline;
  }
}

.filter-box {
  & > * {
    display: inline-block;
    margin-right: 20px;
  }
}

.tab-menu {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;

  .ant-menu,
  .tab-item-wraps {
    flex: 1;
    margin-bottom: 0;
    line-height: initial;
    background: transparent;
  }

  .tab-scroll-container::-webkit-scrollbar {
    display: none;
  }

  .ant-menu-item,
  .tab-menu-item {
    position: relative;
    top: 0;
    display: inline-block;
    box-sizing: content-box;
    height: 36px;
    margin: 0;
    margin-right: 40px;
    padding: 0;
    color: $color-default;
    line-height: 36px;
    text-align: center;
    border-bottom: 3px solid transparent;
    cursor: pointer;

    &:hover,
    &.active {
      color: $color-primary;
    }

    &.active,
    &.ant-menu-item-selected,
    &.ant-menu-item-active {
      color: $color-primary;
      font-weight: 500;
      border-bottom: 3px solid $color-purple-highlight;
    }

    &.tab-menu-disabled {
      color: $color-dark-3;
      cursor: not-allowed;
    }
  }
}

.common-list-item {
  display: flex;
  justify-content: space-between;
  padding: 16px 12px;
  border-bottom: 1px solid $color-border;

  > div:first-child {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    overflow: auto;
  }

  > div:nth-child(2) {
    flex-shrink: 0;
  }

  .title {
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .sub {
    display: flex;
    align-items: center;
    min-height: 22px;
    margin-top: 12px;
    color: $color-text-sub;
    font-size: 14px;
  }
}

.ml-3-group {
  > * {
    &:not(:first-child) {
      margin-left: 12px;
    }
  }
}

.mr-3-group {
  > * {
    &:not(:first-child) {
      margin-left: 12px;
    }
  }
}

.prewrap {
  overflow: hidden;
  white-space: pre-wrap;
  text-overflow: ellipsis;
}

.break-word {
  word-break: break-word;
}

.bg-color-02 {
  background-color: $color-default-02;
}

.bg-color-01 {
  background-color: $color-default-01;
}

.scroll-bar-dark {
  &::-webkit-scrollbar {
    width: 16px;
    height: 16px;
    background: transparent;
  }

  &::-webkit-scrollbar-corner {
    background: transparent;
  }

  &::-webkit-scrollbar-track {
    border-radius: 8px;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 8px;
    border: 4px solid transparent;
    box-shadow: 8px 0 0 rgba($white, 0.2) inset;

    &:hover {
      box-shadow: 8px 0 0 rgba($white, 0.4) inset;
    }

    &:horizontal {
      box-shadow: 0 8px 0 rgba($white, 0.2) inset;

      &:hover {
        box-shadow: 0 8px 0 rgba($white, 0.4) inset;
      }
    }
  }
}

.scroll-bar-light {
  &::-webkit-scrollbar {
    width: 16px;
    height: 16px;
    background: transparent;
  }

  &::-webkit-scrollbar-corner {
    background: transparent;
  }

  &::-webkit-scrollbar-track {
    border-radius: 8px;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 8px;
    border: 4px solid transparent;
    box-shadow: 8px 0 0 rgba($color-default, 0.2) inset;

    &:hover {
      box-shadow: 8px 0 0 rgba($color-default, 0.4) inset;
    }

    &:horizontal {
      box-shadow: 0 8px 0 rgba($color-default, 0.2) inset;

      &:hover {
        box-shadow: 0 8px 0 rgba($color-default, 0.4) inset;
      }
    }
  }
}
// hack for safari
:not(:root):-webkit-full-screen {
  height: 100%;
}
