@import '../../../../es/style/themes/default';

@board-prefix-cls: ~'@{c7n-pro-prefix}-board';
@board-customization-prefix-cls: ~'@{c7n-pro-prefix}-board-customization';

.@{board-prefix-cls} {
  &-hover-button .icon {
    font-size: 0.14rem;
  }

  &-card-wrapper {
    display: block;
    height: calc(100% - 85px);
    overflow-x: hidden;
    overflow-y: auto;

    .@{c7n-prefix}-list-selection:hover {
      background-color: #FFF;
    }

    .@{c7n-prefix}-list-item:last-child {
      margin-bottom: 0 !important;
      padding: 0 !important;
      border-bottom: none !important;
    }

    .@{c7n-prefix}-list-selected {
      background-color: #FFF
    }

    .@{c7n-prefix}-list-selection:not(.@{c7n-prefix}-list-selected):hover {
      background-color: #FFF
    }
  }

  &-wrapper {
    display: flex !important;
    height: calc(100% - 85px) !important;
    margin-right: 0 !important;
    overflow-x: auto;

    .@{c7n-prefix}-list-selection:hover {
      background-color: #FFF;
    }

    .@{c7n-prefix}-list-item:last-child {
      border-bottom: none;
    }
  }

  &-board-modal-content {
    color: rgba(0, 0, 0, 0.45);
    font-size: 12px;
  }

  &-switch-board {
    width: 240px;
    padding: 8px;
    background: #FFF;
    border-radius: 2px;
    box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.08);

    &-search {
      margin-bottom: 4px;

      i {
        color: rgba(0, 0, 0, 0.25);
      }
    }

    &-footer {
      margin-top: 4px;
      color: rgba(0, 0, 0, 0.45);
      font-size: 12px;
      border-top: 1px solid rgba(0, 0, 0, 0.06);
    }
  }

  &-view-item {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 28px;
    padding: 0 8px;
    color: rgba(0, 0, 0, 0.65);
    font-size: 12px;
    border-radius: 2px;
    cursor: pointer;

    &:hover {
      background: #E6F0FF;

      .@{board-prefix-cls}-delete {
        display: inline-block;
      }
    }

    .@{board-prefix-cls}-delete {
      display: none;
      margin-left: auto;
      color: @primary-color;
    }

    &-active {
      color: @primary-color;
      background: #E6F0FF;
    }
  }

  &-view-add div {
    display: inline-flex;
    align-items: center;
    width: 58px;
    height: 28px;
    margin-top: 4px;
    margin-right: 8px;
    color: @primary-color;
    font-size: 12px;
    cursor: pointer;

    i {
      margin-right: 4px;
    }
  }

  &-card-container {
    &:hover,
    &:active {
      text-decoration: none;

      .@{board-prefix-cls}-quote-container-extra {
        .icon:hover {
          color: @primary-color;
        }
      }
    }

    .@{c7n-prefix}-card {
      margin: 8px;
    }

    .@{c7n-prefix}-card-head {
      margin-right: 0.08rem !important;
    }

    .@{c7n-prefix}-card-extra {
      min-width: 30%;
      max-width: 70%;
      padding: 14px 0 10px 0 !important;
    }

    .@{c7n-prefix}-card-head-title {
      flex: auto;
      min-width: 30%;
      max-width: 70%;
      white-space: break-spaces !important;

      .@{c7n-pro-prefix}-output,
      .@{c7n-pro-prefix}-typography-paragraph {
        margin: 0;
        line-height: 22px !important;
      }
    }

    .@{c7n-prefix}-card-body {

      .@{c7n-pro-prefix}-output,
      .@{c7n-pro-prefix}-typography-text {
        line-height: 20px !important;
      }
    }

    .@{c7n-prefix}-list-item-content {
      width: 100%;

      .@{c7n-prefix}-card:hover {
        box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.08);
      }
    }
  }

  &-quote {
    &-container {
      /* flexbox */
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
      margin-bottom: 0.08rem;
      padding: 0.08rem;
      background: #FFF;
      background-color: #FFF;
      border: 1px solid rgba(0, 0, 0, 0.10);
      border-radius: 2px;
      user-select: none;

      /* anchor overrides */
      &:hover,
      &:active {
        // color: ${colors.N900};
        text-decoration: none;
      }

      &:focus {
        outline: none;
        // border-color: ${(props) => props.colors.hard};
        box-shadow: none;
      }

      &-extra {
        min-width: 30%;
        max-width: 70%;
        margin-left: auto;
        text-align: right;
      }
    }

    &-head-wrapper {
      display: flex;

      &>p {
        min-width: 30%;
        max-width: 70%;
        height: 22px;
        margin: 4px 0 0 0;
        padding: 0;
        color: rgba(0, 0, 0, 0.85);
        font-weight: 500;
        font-size: 14px;
        white-space: break-spaces !important;
      }
    }

    &-content {
      display: flex;
      /*
        Needed to wrap text in ie11
        https://stackoverflow.com/questions/35111090/why-ie11-doesnt-wrap-the-text-in-flexbox
      */
      flex-basis: 100%;
      flex-direction: column;
      /* flex child */
      flex-grow: 1;
      gap: 4px;
      justify-content: center;
      /* flex parent */
      overflow: hidden;
      font-size: 12px;

      &-item {
        display: flex;
        align-items: center;
        height: 24px;
      }

      .@{c7n-pro-prefix}-output,
      .@{c7n-pro-prefix}-typography-text {
        line-height: 1.5 !important;
      }

      &-label {
        flex-shrink: 0;
        margin-right: 4px;
        color: rgba(0, 0, 0, 0.45);
        font-weight: 400;
      }
    }
  }

  &-column-header {
    height: 36px;
    margin-top: 16px;
    color: rgba(0, 0, 0, 0.85);
    font-size: 14px;
    line-height: 36px;
    text-align: center;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 2px;

    &-count {
      margin-left: 4px;
    }
  }

  // &-column-container {
  //   // margin-right: 16px;
  // }

  // &-column-list {
  //   // padding: 8px;
  // }
}

.@{board-customization-prefix-cls} {
  .@{c7n-prefix}-collapse-content {
    padding: 0 .2rem !important;
  }

  .@{c7n-prefix}-collapse-header {
    padding: .12rem .2rem !important;
  }

  &-header-button {
    float: right;
  }

  &-tree {
    min-height: .01rem;
    margin-bottom: .06rem;

    &-treenode {
      position: relative;
      display: flex;
      align-items: flex-start;
      width: 100%;
      padding: .03rem 0 .03rem;
      outline: none;

      &-hover-button {
        visibility: hidden;
        transition: none;

        .@{iconfont-css-prefix} {
          transition: none;
        }
      }

      &-hover &-hover-button {
        visibility: visible;
      }

      &-hover {
        background-color: @item-hover-bg;
      }

      &-content {
        position: relative;
        display: flex;
        flex: 1;
        align-items: center;
        width: 100%;
        height: .32rem;
        min-height: .24rem;
        margin: 0;
        padding: .04rem 0;
        color: inherit;
        line-height: .24rem;
        background: transparent;
        border-radius: .02rem 0 0 .02rem;
      }

      &-title {
        display: flex;
        flex: 1;
        align-items: center;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        user-select: none;

        &-text {
          height: .24rem;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }

      &-switcher {
        flex: none;
        width: .22rem;
        height: .32rem;
        margin: 0;
        padding: .05rem 0;
        line-height: 1;
        text-align: center;
        vertical-align: top;
        cursor: pointer;

        &-icon {
          font-size: .18rem;
          line-height: .22rem;

          &-close {
            transform: rotate(-90deg);
          }
        }

        &-noop {
          cursor: default;
        }
      }

      &-drag-icon {
        color: @text-color-secondary;
      }

      &-dragging {
        background-color: @component-background;
        box-shadow: @shadow-4;
      }
    }

    &-group-header {
      display: inline-block;
      margin-bottom: .1rem;
      color: @text-color-secondary;
      font-size: @font-size-sm;
    }
  }

  &-panel {
    &-title {
      font-weight: 600;
      font-size: .14rem;
      line-height: .22rem;
      vertical-align: middle;
    }
  }

  &-panel-content {
    max-height: 400px;
    padding: 0.08rem;
    overflow-y: auto;
  }

  &-panel-des {
    display: flex;
    align-items: center;
    color: @text-color-secondary;

    i {
      margin-left: 0.04rem;
    }
  }

  &-combine-sort-list-item {
    display: flex;
    align-items: center;
    margin: 0.1rem 0;

    &-drag {
      margin-right: 4px;
      line-height: 1;
    }

    &-index {
      display: inline-block;
      width: 0.23rem;
      line-height: 1;
      text-align: center;
      vertical-align: middle;
    }

    &-sortName {
      width: 1.47rem;
      margin: 0 0.24rem 0 0.08rem
    }

    .@{c7n-pro-prefix}-radio-wrapper {
      margin-right: 0.32rem !important;
    }

    &-delete {
      margin-left: auto;
    }
  }
}

.@{board-prefix-cls}-quote-container-extra-popup {
  color: red;

  .@{c7n-prefix}-menu-item {
    padding: 0 !important;

    .@{c7n-pro-prefix}-btn {
      width: 100%;
      padding: 0 0.16rem;
    }
  }
}