colorpicker {
  display: inline-block;

  .input-field {
    margin-top: 5px;

    &.parsley-error {
      .chip {
        border: 1px solid $parsley-color;
      }
    }
  }

  .chip {
    margin-top: 10px;
    margin-bottom: 10px;
    cursor: pointer;

    .color-container {
      display: inline-block;
      height: 30px;
      width: 30px;
      line-height: 32px;
      font-size: 20px;
      border-radius: 50%;
      text-align: center;
      background-color: color('grey', 'darken-1');
      color: color('shades', 'white');
      float: left;
      margin: 0 8px 0 -12px;
    }
  }

  input {
    display: none;
  }
}

.sp-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: none;
  border: none;

  .sp-picker-container {
    @extend .z-depth-2;

    border-left: none;
    float: none;
    margin: 10% auto 0;
    padding: 12px;
    height: 236px;
    background-color: color('shades', 'white');


    .sp-input-container {
      .sp-input {
        height: 1.2rem;
        margin-top: 20px;
        &:focus {
          border-top: initial;
          border-left: initial;
          border-right: initial;
        }
      }
    }

    .sp-button-container {
      .sp-cancel, .sp-choose {
        background-image: none;
        background: transparent;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-size: 10px;
        line-height: 10px;
        color: color('g-deep-blue', 'base') !important;
        padding: 9px 11px;
        border-radius: 2px;
        text-align: center;
        vertical-align: middle;
        text-shadow: none;
        text-decoration: none;
        border: none;
        height: 30px;
        margin: 0 5px;

        &:hover {
          text-shadow: none;
          border: none;
          background: color('grey', 'lighten-1');
        }

        &:active {
          box-shadow: none;
          background-color: color('grey', 'darken-1');
        }
      }
    }
  }

  .sp-dragger {
    box-shadow: 0 0 2px rgba(0,0,0,.5);
    border-radius: 50%;
    height: 8px;
    width: 8px;
    margin: 4px 0 0 4px;
    cursor: pointer;
    position: absolute;
    background: rgba(255,255,255,.9);
    top: 0;
    left: 0;
  }

  .sp-slider {
    position: absolute;
    top: 0;
    cursor: pointer;
    height: 5px;
    left: -3px;
    right: -3px;
    box-shadow: 0 0 2px rgba(0,0,0,.4);
    background: rgba(255,255,255,.9);
  }

  .sp-alpha-handle {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 6px;
    margin-left: -3px;
    left: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0,0,0,.4);
    background: rgba(255,255,255,.9);
  }

  .sp-alpha {
    height: 12px;
    bottom: -17px;
    right: 0;
    left: 0;
  }

  .sp-initial {
    margin-top: 12px;
  }

  .sp-clear, .sp-color, .sp-hue, .sp-alpha-inner, .sp-slider, .sp-alpha-handle, .sp-initial {
    border: 1px solid color('blue-grey', 'lighten-3');
  }

  .sp-alpha, .sp-preview, .sp-thumb-el {
    position: relative;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
  }
}

.colorpicker-fade {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.32);
}