@import '~antd/es/style/themes/default.less';

.design-left-component-list {
  transition-property: opacity, width;
  transition-duration: 0.2s, 0.5s;
  opacity: 0;
  width: 0;
  margin: 0;
  overflow: auto;
  border-radius: 0 8px 8px 0;
  background-color: @layout-header-background !important;
  border-top: 1px solid @border-color-base !important;
  border-right: 1px solid @border-color-base !important;
  :global {
    .ant-collapse-header {
      padding: 8px 12px !important;
    }
    .ant-collapse-header-text {
      font-size: 12px;
      line-height: 22px;
    }
    .ant-collapse-content {
      background-color: @component-background !important;
    }
    .ant-empty-img-default {
      width: 100%;
    }
  }
  &-item&-disabled {
    cursor: not-allowed;
    pointer-events: none;
  }
  &-item {
    cursor: pointer;
    font-size: 12px;
    position: relative;
    &-title {
      line-height: 2;
    }
    &-icon {
      width: 100%;
      height: 0;
      padding-top: 50%;
      background-repeat: no-repeat;
      background-size: 100%;
      transform-origin: center center;
      background-position: center;
      transition: transform 0.1s;
      &:hover {
        transform: scale(1.1);
      }
    }
    &-disabled-prefix {
      position: absolute;
      z-index: 2;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.6);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: not-allowed;
      flex-direction: column;
      & > span {
        font-weight: bold;
      }
    }
  }
  &-item-preview {
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    & > img {
      width: 100%;
      max-height: 100%;
    }
  }
}
.design-left-component-list-show {
  width: 150px;
  opacity: 1;
  // min-width: 150px;
}
.component-search-list {
  width: 222px;
  height: 100%;
  padding: 24px;
  overflow: hidden;
  background-color: @layout-header-background;
  transition: transform 0.5s;
  transform: translateX(100%);
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  &-close {
    position: absolute;
    right: 0;
    top: 0;
    transform: translateX(-50%) translateY(50%);
    cursor: pointer;
  }
  &-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: transparent;
  }
  &-content {
    overflow-y: auto;
    overflow-x: hidden;
  }
  &-item-path {
    :global {
      .ant-divider-inner-text {
        font-weight: bold;
        font-size: 12px;
      }
    }
  }
  :global {
    .ant-drawer-body {
      position: relative;
      display: flex;
      flex-direction: column;
    }
    .ant-input {
      position: sticky;
      top: 0;
      font-size: 12px;
    }
  }
}
.component-search-list-visible {
  transform: translateX(0);
}
