@import "custom";

@color: editor-color;

.@{color} {
  width: 100%;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  display: block;
  transition: box-shadow .3s, border .3s;
  border: 1px solid #A4A7A8;

  i {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;

    &:after {
      content: '';
      display: block;
      position: absolute;
      width: 0;
      height: 0;
      border-bottom: 4px solid white;
      border-left: 4px solid transparent;
      right: 1px;
      bottom: 1px;
    }
  }

  &.active {
    border-color: @input-line-color-hover;
    box-shadow: 0 0 4px @input-line-color-hover;
  }

  &-wrapper {
    &:hover {
      .color-close {
        opacity: 1;
      }
    }

    .color-close {
      position: absolute;
      line-height: 12px;
      text-align: center;
      width: 12px;
      height: 12px;
      top: -5px;
      left: -5px;
      border-radius: 100%;
      background: #ff0000;
      color: #fff;
      opacity: 0;
      cursor: pointer;
      transition: opacity .3s @ease-out;

      .anticon-close {
        font-size: 12px;
        transform: scale(.8);
      }
    }
  }
}