@import '../../style/vars';
@--w: @input-height-base;
@--p: 8px;
.z-color-box {
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  display: inline-block;
  background-color: white;
  width: 100%;
  min-width: @--w;
  height: @--w;
  border-radius: 4px;
  border: 1px solid @border-color-base;
  padding: @--p;
  .z-bg {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: @--w - (@--p * 2) - 2;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==);
    background-position: center center;
    background-repeat: repeat;
  }
  .z-color {
    border-radius: 2px;
    position: absolute;
    z-index: 2;
    top: @--p;
    left: @--p;
    right: @--p;
    display: block;
    // width: @--w - (@--p * 2) - 2;
    height: @--w - (@--p * 2) - 2;
    background-color: transparent;
    outline: 0;
    &:hover {
      opacity: 0.8;
    }
  }
  &.disabled {
    cursor: no-drop;
    background-color: #f5f5f5;
  }
  &.large {
    @--w-lg: @input-height-lg;
    @--p-lg: 8px;
    min-width: @--w-lg;
    height: @--w-lg;
    padding: @--p-lg;
    .z-bg {
      height: @--w-lg - (@--p-lg * 2) - 2;
    }
    .z-color {
      top: @--p-lg;
      left: @--p-lg;
      right: @--p-lg;
      height: @--w-lg - (@--p-lg * 2) - 2;
    }
  }
  &.small {
    @--w-sm: @input-height-sm;
    @--p-sm: 4px;
    min-width: @--w-sm;
    height: @--w-sm;
    padding: @--p-sm;
    .z-bg {
      height: @--w-sm - (@--p-sm * 2) - 2;
    }
    .z-color {
      top: @--p-sm;
      left: @--p-sm;
      right: @--p-sm;
      height: @--w-sm - (@--p-sm * 2) - 2;
    }
  }
}
.z-cover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  display: none;
  visibility: hidden;
}

.z-picker {
  outline: none;
  position: absolute;
  box-sizing: content-box;
  div,
  input,
  span {
    box-sizing: content-box;
  }
  .flexbox-fix {
    display: flex;
    flex-wrap: wrap;
  }
}
