.color-picker
  picker-width = 300px
  picker-height = 200px

  position relative

  &.void .swatch, .swatch.clear
    background color-white
    bg-image('ui/clear-swatch', cover, center center, no-repeat)

  .swatch.clear
    margin-left 10px
    opacity .4
    transition opacity .2s

    &:hover
      opacity 1

  .dialog
    padding 20px
    border-radius 3px
    border 1px solid color-input-stroke
    background color-white
    box-shadow rgba(0, 0, 0, .05) 0 1px 3px 0
    pointer-events none
    opacity 0
    transition opacity .2s
    position absolute
    absolute-center()
    z-index 10

    .picker
      width picker-width
      height picker-height
      margin-bottom 20px

    .input-wrap
      clearfix()

      .input-wrap
        bg-image('ui/checkers', 40px 40px)
        width 70%
        float left
        border-radius 3px 0 0 3px

      .submit-wrap
        width 30%
        float left
        margin-bottom 20px

      input
        border-radius 3px 0 0 3px
        padding 15px 15px 14px
        border-right 0
        transition color .2s, background .2s

      button
        border-radius 0 3px 3px 0

  &.open .dialog
    opacity 1
    pointer-events all

  .swatch
    bg-image('ui/checkers', 40px 40px)
    width 100px
    height 60px
    border-radius 3px
    border 1px solid color-input-stroke
    margin auto
    box-shadow rgba(0, 0, 0, .05) 0 1px 3px 0
    transition border .2s
    cursor pointer
    position relative
    display inline-block

    .fill
      full-cover()
      border-radius 2px
      transition background .2s

    &:hover
      border-color color-cta

// Simple color picker vendor styles

.Scp
  no-select()
  position relative

.Scp-saturation
  position relative
  height 100%
  background linear-gradient(to right, #fff, #f00)
  float left
  margin-right 5px

.Scp-brightness
  width 100%
  height 100%
  background linear-gradient(rgba(255,255,255,0), #000)

.Scp-sbSelector
  border 2px solid #fff
  position absolute
  width 14px
  height 14px
  background #fff
  border-radius 10px
  top -7px
  left -7px
  box-sizing border-box
  z-index 10

.Scp-hue
  width 20px
  height 100%
  position relative
  float left
  background linear-gradient(#f00 0%, #f0f 17%, #00f 34%, #0ff 50%, #0f0 67%, #ff0 84%, #f00 100%)

.Scp-hSelector
  position absolute
  background #fff
  border-bottom 1px solid #000
  right -3px
  width 10px
  height 2px