@import './variables.less';

// layout rewrite
.t-layout__sider {
  width: fit-content;
}

.t-button + .t-button {
  margin-left: @spacer;
}

.t-layout.t-layout--with-sider {
  > .t-layout {
    flex: 1;
    min-width: 760px;
  }
}

.t-menu--dark .t-menu__operations .t-icon {
  color: rgba(255, 255, 255, 0.55);
  &:hover {
    cursor: pointer;
  }
}

.t-default-menu.t-menu--dark {
  background: var(--td-gray-color-13);
}

.t-default-menu:not(.t-menu--dark) .t-menu__item.t-is-active:not(.t-is-opened) {
  background-color: @brand-color-1;
  color: @brand-color;

  .t-icon {
    color: @brand-color;
  }
}

.logo-container {
  cursor: pointer;
  display: inline-flex;
  height: 64px;
  margin-left: 24px;
}

.version-container {
  color: @text-color-primary;
  opacity: 0.4;
}

.s-layout-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;

  &.my {
    position: static;
    background-color: @brand-color;

    .s-header {
      // width: 1280px;
      .t-menu {
        background-color: @brand-color;
        color: #fff;
      }

      .user-info .company {
        color: rgba(255, 255, 255, 0.9);
      }
    }
  }

  .s-header {
    padding: 0 24px;

    .t-menu__logo {
      img {
        cursor: pointer;
      }

      .logo-text {
        margin-left: 18px;
        font-size: 12px;
        color: var(--td-font-gray-3);
        line-height: 20px;
      }
    }

    .t-menu {
      & > .t-menu__item {
        min-width: unset;
        padding: 0 24px;
        font-size: 16px;
        color: rgba(255, 255, 255, 0.9);
        line-height: 22px;

        &:hover {
          background-color: unset;
          font-family: PingFangSC-Medium, PingFang SC;
          font-weight: 500;
        }

        &.t-is-active {
          background-color: unset;
          font-family: PingFangSC-Medium, PingFang SC;
          font-weight: 500;

          &::after {
            content: '';
            position: absolute;
            bottom: 0px;
            height: 2px;
            left: 50%;
            transform: translate(-50%);
            width: 32px;
            background-color: #fff;
          }
        }
      }
    }

    .go-my {
      margin-right: 32px;
    }

    .user-info {
      display: flex;
      align-items: center;
      cursor: pointer;

      img {
        width: 32px;
        height: 32px;
        display: block;
        border-radius: 50%;
      }

      .company {
        margin-left: 8px;
        font-size: 14px;
        color: rgba(0, 0, 0, 0.9);
        line-height: 20px;
        cursor: pointer;
      }
    }
  }
}

.t-layout__header {
  height: 70px !important;
}

.s-layout-content {
  height: calc(100vh - 70px);
  overflow-y: scroll;
  overflow-x: hidden;
}

.s-layout-footer {
  background-color: @td-Search-box-line-back-color;
  padding: 0;
  width: calc(100% + 4px);
}
