.#{$ns}ColorPicker {
  position: relative;
  display: inline-flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  border: var(--ColorPicker-borderWidth) solid var(--ColorPicker-borderColor);
  font-size: var(--ColorPicker-fontSize);
  padding: var(--ColorPicker-paddingY) var(--ColorPicker-paddingX);
  background: var(--ColorPicker-bg);
  color: var(--ColorPicker-color);
  border-radius: var(--borderRadius);
  @include media-breakpoint-down(sm) {
    background: none;
  }

  @media screen and (min-width:1280px) and (max-width:1440px) {
    // height: 1.2rem;
    min-height: 1.2rem;
    line-height: 1.2rem;
    font-size: 0.75rem;
    padding: 0;
    border-radius: 0px;
  }

  @media screen and (min-width:1441px) and (max-width:1680px) {
    // height: 1.5rem;
    min-height: 1.5rem;
    line-height: 1.5rem;
    font-size: .8125rem;
    padding: 0;
    border-radius: 0px;
    margin-left: 0;
  }

  &-popup {
    height: px2rem(400px);
  }

  &:not(.is-disabled) {
    cursor: pointer;

    &:hover {
      background: var(--saas-grid-combination-color);
      border-color: var(--ColorPicker-onHover-borderColor);
    }
  }

  &-input {
    border: 0;
    background: transparent;
    outline: none;
    width: 100%;
    flex-basis: 0;
    flex-grow: 1;
    padding: 0;
    margin: 0;
    height: calc(var(--ColorPicker-fontSize) * var(--ColorPicker-lineHeight));

    &::placeholder {
      color: var(--ColorPicker-placeholderColor);
    }
  }

  &.is-focused {
    border-color: var(--ColorPicker-onFocused-borderColor);
    box-shadow: var(--Form-input-boxShadow);
  }

  &.is-disabled {
    background: var(--ColorPicker-onDisabled-bg);
    color: var(--ColorPicker-onDisabled-color);
    pointer-events: none;

    >.#{$ns}ColorPicker-input {
      color: var(--ColorPicker-onDisabled-color);

      &::placeholder {
        color: var(--ColorPicker-onDisabled-color);
      }
    }
  }

  &-preview {
    display: flex;
    align-items: center;
    margin-right: var(--gap-sm);
    cursor: pointer;
  }

  &-previewIcon {
    display: block;
    // Jay
    // width: px2rem(16px);
    // height: px2rem(16px);
    width: 60px;
    height: 20px;
    box-shadow: var(--boxShadowSm);

    @media screen and (min-width:1280px) and (max-width:1440px) {
      width: 30px;
      height: 12px;
    }

    @media screen and (min-width:1441px) and (max-width:1680px) {
      width: 40px;
      height: 15px;
    }
  }

  &-clear {
    @include input-clear();
    display: inline-block;
    line-height: 1;
  }

  &-arrow {
    margin-right: var(--gap-xs);
    // margin-left: var(--gap-xs);
    width: var(--gap-md);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;

    >svg {
      transition: transform var(--animation-duration);
      display: inline-block;
      color: var(--Form-select-caret-iconColor);
      width: 10px;
      height: 10px;
      top: 0;
    }
  }

  &.is-opened &-arrow>svg {
    transform: rotate(180deg);
  }
}

.#{$ns}ColorPicker-popover {
  border: none;
  box-shadow: none;
}

.#{$ns}ColorControl:not(.is-inline)>.#{$ns}ColorPicker {
  display: flex;
  align-items: center; // Jay
}

// override

.sketch-picker {
  border: none !important;
  border-radius: var(--borderRadius) !important;
  box-shadow: var(--ColorPicker-boxShadow) !important;
}
