@import '../../style/themes/index.less';
@import '../../button//style/var.less';

@color-board-prefix-cls: ~'@{pxx-prefix}-color-board';

.@{color-board-prefix-cls} {
  color: #595959;
  font-size: 14px;

  &__overlay {
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 12%);
  }

  &__color-picker {
    display: flex;
    flex-direction: column;

    .@{button-prefix-cls} {
      margin: 8px 10px;
    }
  }

  &__default {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    margin: 4px 0 8px;
    border-radius: 2px;
    cursor: pointer;

    &:hover {
      background-color: #f5f5f5;
    }
  }

  &__group {
    display: flex;
    width: 100%;
    height: auto;
    padding: 0 8px;
    position: relative;

    &:nth-child(2) {
      margin-bottom: 6px;
    }
  }

  &__group-item {
    width: 24px;
    height: 24px;
    padding: 2px 2px;
    display: inline-block;
    border-radius: 3px 3px;
    border: 1px solid transparent;
    flex: 0 0 auto;
    cursor: pointer;
    background-color: #fff;

    >span {
      position: relative;
      width: 18px;
      height: 18px;
      display: block;
      border-radius: 2px 2px;
      border: 1px solid transparent;
    }

    >span svg {
      position: absolute;
      top: -1px;
      left: 1px;
      width: 12px;
      height: 12px;
    }

    &&--border {
      >span {
        border: 1px solid #e8e8e8;
      }
    }

    &:hover {
      border: 1px solid #d9d9d9;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 12%);
    }
  }

  &__history {
    padding: 6px 12px;
    margin-top: 8px;
    text-align: left;
  }

  &__none-custom-color {
    line-height: 20px;
    color: #bfbfbf;
    padding: 2px 12px;
    text-align: left;
  }

  &__more-color {
    margin-top: 10px;
    border-top: 1px solid #e8e8e8;

    &--container {
      display: flex;
      align-items: center;
      cursor: pointer;
      padding: 12px 8px;
      border-radius: 2px;

      &:hover {
        background-color: #f5f5f5;
      }
    }

    &--preview {
      display: inline-block;
      width: 17px;
      height: 17px;
      margin-right: 8px;
      border-radius: 50%;
      background-position: center;
      background-image: url(https://gw.alipayobjects.com/mdn/rms_740edc/afts/img/A*G6CzS7jByMIAAAAAAAAAAABkARQnAQ);
    }

    &--icon {
      position: absolute;
      right: 12px;
      line-height: 18px;
    }

    &--popover {
      .ant-popover-arrow {
        display: none;
      }

      .ant-popover-inner-content {
        padding: 8px;
      }

      .sketch-picker {
        box-shadow: none !important;
      }
    }
  }
}
