.category-page {
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;

  & > .header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    &> .left {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .right {
      display: flex;
      align-items: center;
      gap: 10px;

      .last-sync-time {
        font-size: 13px;
        color: var(--theme-text-accent);
      }
    }
  }

  .editing {
    display: flex;
    align-items: center;

    .submit, .cancel {
      margin-left: 5px;
    }
  }

  .editable {
    //line-height: 16px;
    display: inline-flex;
    align-items: center;

    .hover-area {
      cursor: pointer;
      display: inline-flex;
      align-items: center;
    }

    &:hover {
      .next-icon, .iconfont {
        display: inline-block;
      }

      //color: #009dd6;
    }
  }

  .categories {
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
}

.category-page-category-more-operations-popup, .category-page-media-library-more-operations-popup {
  .warning {
    color: #ff5050;

    &:hover {
      color: red;
    }
  }

  .next-menu-item-text {
    display: flex;
    align-items: center;
    gap: 2.5px;
  }
}

.category-page-draggable-category {
  border-radius: 4px;
  margin: 1px;
  padding: 10px;
  //border: 1px solid #747474;
  background: var(--theme-category-block-background-color);
  box-shadow: rgba(60, 64, 67, 0.8) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;

  &>.block {
    padding: 10px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, var(--theme-border-color-accent) 0px 0px 0px 1px inset;
    //border: 1px solid var(--theme-border-color);
    border-radius: 4px;
    &:nth-child(n+1) {
      margin-top: 5px;
    }
  }

  transition: border-color 200ms;

  &>.title-line {
    justify-content: space-between;
  }

  & > .title-line .name {
    display: flex;
    align-items: center;
    font-size: 20px;
    line-height: 20px;

    .editing {
      .next-input {
        width: 300px;
      }
    }
  }

  .count {
    .next-badge-count {
      background-color: #87d068;
    }
  }

  .title-line {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    line-height: 20px;
    gap: 5px;

    &.e, &.ls {
      font-size: 16px;
    }

    &.l {
      font-size: 14px;
      margin-bottom: 5px;

      .name {
        color: #298DFF;
      }
    }

    &>.left, &>.right {
      display: flex;
      align-items: center;
      gap: 5px;
    }
  }

  .configuration-line {
    display: grid;
    column-gap: 10px;
    row-gap: 5px;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    .setting {
      display: flex;
      align-items: center;

      .ice-label {
        display: flex;
        align-items: center;
        line-height: 14px;
        gap: 2px;
      }

      .hover-area {
        line-height: 20px;
      }

      &.enhancers {
        grid-column: span 3;

        &>.items {
          margin-left: 10px;
          display: flex;
          flex-wrap: wrap;
          align-items: flex-start;
          gap: 5px;

          &>.item {
            cursor: pointer;
            padding: 2px 5px;
            border-radius: 4px;
            &:hover {
              background-color: var(--theme-block-background-accent);
            }
          }
        }
      }

      &.custom-properties {
        cursor: pointer;
        .items {
          margin-left: 10px;
          display: flex;
          flex-wrap: wrap;
          align-items: flex-start;
          gap: 5px;
        }
      }
    }
  }

  .enhancers-line {

    .title-line {
      cursor: pointer;
      //.iconfont {
      //  display: none;
      //}
      &:hover {
        //.iconfont {
        //  display: block;
        //}
      }
    }

    .enhancers {
      margin-top: 10px;
      gap: 5px;
      display: flex;

      .enhancer {
        cursor: pointer;
      }
    }
  }

  .libraries-line {
    .libraries-header {
      display: grid;
      grid-template-columns: 240px minmax(0, 1fr);
      gap: 5px;

      .path-configuration {
        color: #ababab;
        display: grid;
        gap: 5px;
        grid-template-columns: minmax(0, 6fr) minmax(0, 4fr) minmax(0, 4fr);
      }
    }
  }
}

.category-page-draggable-media-library {

  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 5px;

  border-bottom: 1px solid var(--theme-border-color-accent);
  padding-bottom: 5px;

  &:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .library {
    display: flex;
    align-items: center;
    gap: 5px;

    .name {
      .edit {
        cursor: pointer;
        word-break: break-all;
        color: #0394f5;
        font-size: 14px;
      }

      .opt {
        display: flex;
        gap: 5px;
        align-items: center;

        .id {
          line-height: 12px;
          font-size: 12px;
          padding: 2px;
          border-radius: 4px;
          border: 1px solid #ccc;
        }
      }
    }
  }

  margin-bottom: 5px;

  .path-configuration {
    padding: 5px;
    &:nth-child(n+2) {
      border-top: 1px solid #ddd;
    }

    &:hover {
      transform: scale(1.01);
    }

    &:nth-child(2n+1) {
      //background: rgba(0,0,0,0.05);
    }

    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 4fr) minmax(0, 4fr);
    gap: 5px;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    line-height: 20px;
    border-radius: 4px;

    //border-bottom: 1px solid #efefef;
    //margin-bottom: 5px;
    cursor: pointer;

    &:last-child {
      border-bottom: none;
      margin-bottom: 0;
    }

    &:hover {
      box-shadow: var(--theme-border-color-accent) 0px 3px 8px;
      //background-color: rgba(0, 0, 0, 0.1);
    }

    .unset {
      color: var(--theme-text-subtle);
    }


    .path {
      display: flex;
      align-items: center;
      gap: 5px;

      //.capacity {
      //  font-size: 12px;
      //  line-height: 12px;
      //  padding: 2px 2px;
      //  color: #7f7f7f;
      //  border: 1px solid #7f7f7f;
      //  border-radius: 4px;
      //}

      & > * {
        //margin-right: 8px;
      }
    }

    .tags {
      display: flex;
      gap: 2px;

      &.fixed-tags {
        color: #08c29e;
        border-color: #08c29e;

        &.not-set {
          color: var(--theme-text-error);
        }
      }

      .tag {
        font-size: 12px;
        line-height: 12px;
        padding: 2px;
        border-radius: 4px;
        border-width: 1px;
        border-style: solid;
      }
    }

    .filter {
      display: flex;
      align-items: center;
      gap: 2px;

      &.unset {
        color: var(--theme-text-error);
      }
    }
  }
}

.category-page-basic-component-dialog {
  .component-card {
    margin-bottom: 15px;
  }
}

.category-page-enhancer-dialog {
  width: 1400px;
  min-height: 600px;

  .next-dialog-body {
    .enhancers {
      display: flex;

      .enhancer {
        margin: 5px;
        width: 300px;

        .targets {
          font-size: 12px;

          .target {
            margin: 0 2px 2px 0;
          }
        }
      }
    }

    h3 {
      font-size: 18px;
      font-weight: 300;
      margin: 10px 0;
    }
  }
}
