.clr-picker {
  display: none;
  flex-wrap: wrap;
  position: absolute;
  width: 12.5rem;
  z-index: 1000;
  border-radius: 0.625rem;
  background-color: #fff;
  justify-content: flex-end;
  direction: ltr;
  box-shadow: 0 0 0.3125rem rgba(0,0,0,.05), 0 0.3125rem 1.25rem rgba(0,0,0,.1);
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}

@media(aspect-ratio <= 0.9) and (resolution >= 2x){
.clr-picker {
  z-index: unset;
  box-shadow: unset
}
}

.clr-picker.clr-open,
.clr-picker[data-inline="true"] {
  display: flex;
}

.clr-picker[data-inline="true"] {
  position: relative;
}

.clr-gradient {
  position: relative;
  width: 100%;
  height: 6.25rem;
  margin-bottom: 0.9375rem;
  border-radius: 0.1875rem 0.1875rem 0 0;
  background-image: linear-gradient(rgba(0,0,0,0), #000), linear-gradient(90deg, #fff, currentColor);
  cursor: pointer;
}

.clr-marker {
  position: absolute;
  width: 0.75rem;
  height: 0.75rem;
  margin: -0.375rem 0 0 -0.375rem;
  border: 0.0625rem solid #fff;
  border-radius: 50%;
  background-color: currentColor;
  cursor: pointer;
}

.clr-picker input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 1rem;
}

.clr-picker input[type="range"]::-webkit-slider-thumb {
  width: 1rem;
  height: 1rem;
  -webkit-appearance: none;
}

.clr-picker input[type="range"]::-moz-range-track {
  width: 100%;
  height: 1rem;
  border: 0;
}

.clr-picker input[type="range"]::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border: 0;
}

.clr-hue {
  background-image: linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%);
}

.clr-hue,
.clr-alpha {
  position: relative;
  width: calc(100% - 2.5rem);
  height: 0.5rem;
  margin: 0.3125rem 1.25rem;
  border-radius: 0.25rem;
}

.clr-alpha span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background-image: linear-gradient(90deg, rgba(0,0,0,0), currentColor);
}

.clr-hue input[type="range"],
.clr-alpha input[type="range"] {
  position: absolute;
  width: calc(100% + 2rem);
  height: 1rem;
  left: -1rem;
  top: -0.25rem;
  margin: 0;
  background-color: transparent;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.clr-hue div,
.clr-alpha div {
  position: absolute;
  width: 1rem;
  height: 1rem;
  left: 0;
  top: 50%;
  margin-left: -0.5rem;
  transform: translateY(-50%);
  border: 0.125rem solid #fff;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 0.0625rem #888;
  pointer-events: none;
}

.clr-alpha div:before {
  content: '';
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  border-radius: 50%;
  background-color: currentColor;
}

.clr-format {
  display: none;
  order: 1;
  width: calc(100% - 2.5rem);
  margin: 0 1.25rem 1.25rem;
}

.clr-segmented {
  display: flex;
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0.0625rem solid #ddd;
  border-radius: 0.9375rem;
  box-sizing: border-box;
  color: #999;
  font-size: 0.75rem;
}

.clr-segmented input,
.clr-segmented legend {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
}

.clr-segmented label {
  flex-grow: 1;
  margin: 0;
  padding: 0.25rem 0;
  font-size: inherit;
  font-weight: normal;
  line-height: initial;
  text-align: center;
  cursor: pointer;
}

.clr-segmented label:first-of-type {
  border-radius: 0.625rem 0 0 0.625rem;
}

.clr-segmented label:last-of-type {
  border-radius: 0 0.625rem 0.625rem 0;
}

.clr-segmented input:checked + label {
  color: #fff;
  background-color: #666;
}

.clr-swatches {
  order: 2;
  width: calc(100% - 2rem);
  margin: 0 1rem;
}

.clr-swatches div {
  display: flex;
  flex-wrap: wrap;
  padding-bottom: 0.75rem;
  justify-content: center;
}

.clr-swatches button {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0 0.25rem 0.375rem 0.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  text-indent: -62.5rem;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.clr-swatches button:after {
  content: '';
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: inherit;
  background-color: currentColor;
  box-shadow: inset 0 0 0 0.0625rem rgba(0,0,0,.1);
}

input.clr-color {
  order: 1;
  width: calc(100% - 5rem);
  height: 2rem;
  margin: 0.9375rem 1.25rem 1.25rem auto;
  padding: 0 0.625rem;
  border: 0.0625rem solid #ddd;
  border-radius: 1rem;
  color: #444;
  background-color: #fff;
  font-family: sans-serif;
  font-size: 0.875rem;
  text-align: center;
  box-shadow: none;
}

input.clr-color:focus {
  outline: none;
  border: 0.0625rem solid #1e90ff;
}

.clr-close,
.clr-clear {
  display: none;
  order: 2;
  height: 1.5rem;
  margin: 0 1.25rem 1.25rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 0.75rem;
  color: #fff;
  background-color: #666;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  cursor: pointer;
}

.clr-close {
  display: block;
  margin: 0 1.25rem 1.25rem auto;
}

.clr-preview {
  position: relative;
  width: 2rem;
  height: 2rem;
  margin: 0.9375rem 0 1.25rem 1.25rem;
  border-radius: 50%;
  overflow: hidden;
}

.clr-preview:before,
.clr-preview:after {
  content: '';
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  border: 0.0625rem solid #fff;
  border-radius: 50%;
}

.clr-preview:after {
  border: 0;
  background-color: currentColor;
  box-shadow: inset 0 0 0 0.0625rem rgba(0,0,0,.1);
}

.clr-preview button {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  outline-offset: -0.125rem;
  background-color: transparent;
  text-indent: -9999px;
  cursor: pointer;
  overflow: hidden;
}

.clr-marker,
.clr-hue div,
.clr-alpha div,
.clr-color {
  box-sizing: border-box;
}

.clr-field {
  display: inline-block;
  position: relative;
  color: transparent;
}

.clr-field input {
  margin: 0;
  direction: ltr;
}

.clr-field.clr-rtl input {
  text-align: right;
}

.clr-field button {
  position: absolute;
  width: 1.875rem;
  height: 100%;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  text-indent: -62.5rem;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}

.clr-field.clr-rtl button {
  right: auto;
  left: 0;
}

.clr-field button:after {
  content: '';
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: inherit;
  background-color: currentColor;
  box-shadow: inset 0 0 0.0625rem rgba(0,0,0,.5);
}

.clr-alpha,
.clr-alpha div,
.clr-swatches button,
.clr-preview:before,
.clr-field button {
  background-image: repeating-linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%, #aaa), repeating-linear-gradient(45deg, #aaa 25%, #fff 25%, #fff 75%, #aaa 75%, #aaa);
  background-position: 0 0, 0.25rem 0.25rem;
  background-size: 0.5rem 0.5rem;
}

.clr-marker:focus {
  outline: none;
}

.clr-keyboard-nav .clr-marker:focus,
.clr-keyboard-nav .clr-hue input:focus + div,
.clr-keyboard-nav .clr-alpha input:focus + div,
.clr-keyboard-nav .clr-segmented input:focus + label {
  outline: none;
  box-shadow: 0 0 0 0.125rem #1e90ff, 0 0 0.125rem 0.125rem #fff;
}

.clr-picker[data-alpha="false"] .clr-alpha {
  display: none;
}

.clr-picker[data-minimal="true"] {
  padding-top: 1rem;
}

.clr-picker[data-minimal="true"] .clr-gradient,
.clr-picker[data-minimal="true"] .clr-hue,
.clr-picker[data-minimal="true"] .clr-alpha,
.clr-picker[data-minimal="true"] .clr-color,
.clr-picker[data-minimal="true"] .clr-preview {
  display: none;
}

/** Dark theme **/

.clr-dark {
  background-color: #444;
}

.clr-dark .clr-segmented {
  border-color: #777;
}

.clr-dark .clr-swatches button:after {
  box-shadow: inset 0 0 0 0.0625rem rgba(255,255,255,.3);
}

.clr-dark input.clr-color {
  color: #fff;
  border-color: #777;
  background-color: #555;
}

.clr-dark input.clr-color:focus {
  border-color: #1e90ff;
}

.clr-dark .clr-preview:after {
  box-shadow: inset 0 0 0 0.0625rem rgba(255,255,255,.5);
}

.clr-dark .clr-alpha,
.clr-dark .clr-alpha div,
.clr-dark .clr-swatches button,
.clr-dark .clr-preview:before {
  background-image: repeating-linear-gradient(45deg, #666 25%, transparent 25%, transparent 75%, #888 75%, #888), repeating-linear-gradient(45deg, #888 25%, #444 25%, #444 75%, #888 75%, #888);
}

/** Polaroid theme **/

.clr-picker.clr-polaroid {
  border-radius: 0.375rem;
  box-shadow: 0 0 0.3125rem rgba(0,0,0,.1), 0 0.3125rem 1.875rem rgba(0,0,0,.2);
}

.clr-picker.clr-polaroid:before {
  content: '';
  display: block;
  position: absolute;
  width: 1rem;
  height: 0.625rem;
  left: 1.25rem;
  top: -0.625rem;
  border: solid transparent;
  border-width: 0 0.5rem 0.625rem 0.5rem;
  border-bottom-color: currentColor;
  box-sizing: border-box;
  color: #fff;
  filter: drop-shadow(0 -0.25rem 0.1875rem rgba(0,0,0,.1));
  pointer-events: none;
}

.clr-picker.clr-polaroid.clr-dark:before {
  color: #444;
}

.clr-picker.clr-polaroid.clr-left:before {
  left: auto;
  right: 1.25rem;
}

.clr-picker.clr-polaroid.clr-top:before {
  top: auto;
  bottom: -0.625rem;
  transform: rotateZ(180deg);
}

.clr-polaroid .clr-gradient {
  width: calc(100% - 1.25rem);
  height: 7.5rem;
  margin: 0.625rem;
  border-radius: 0.1875rem;
}

.clr-polaroid .clr-hue,
.clr-polaroid .clr-alpha {
  width: calc(100% - 1.875rem);
  height: 0.625rem;
  margin: 0.375rem 0.9375rem;
  border-radius: 0.3125rem;
}

.clr-polaroid .clr-hue div,
.clr-polaroid .clr-alpha div {
  box-shadow: 0 0 0.3125rem rgba(0,0,0,.2);
}

.clr-polaroid .clr-format {
  width: calc(100% - 1.25rem);
  margin: 0 0.625rem 0.9375rem;
}

.clr-polaroid .clr-swatches {
  width: calc(100% - 0.75rem);
  margin: 0 0.375rem;
}
.clr-polaroid .clr-swatches div {
  padding-bottom: 0.625rem;
}

.clr-polaroid .clr-swatches button {
  width: 1.375rem;
  height: 1.375rem;
}

.clr-polaroid input.clr-color {
  width: calc(100% - 3.75rem);
  margin: 0.625rem 0.625rem 0.9375rem auto;
}

.clr-polaroid .clr-clear {
  margin: 0 0.625rem 0.9375rem 0.625rem;
}

.clr-polaroid .clr-close {
  margin: 0 0.625rem 0.9375rem auto;
}

.clr-polaroid .clr-preview {
  margin: 0.625rem 0 0.9375rem 0.625rem;
}

/** Large theme **/

.clr-picker.clr-large {
  width: 17.1875rem;
}

.clr-large .clr-gradient {
  height: 9.375rem;
}

.clr-large .clr-swatches button {
  width: 1.375rem;
  height: 1.375rem;
}

/** Pill (horizontal) theme **/

.clr-picker.clr-pill {
  width: 23.75rem;
  padding-left: 11.25rem;
  box-sizing: border-box;
}

.clr-pill .clr-gradient {
  position: absolute;
  width: 11.25rem;
  height: 100%;
  left: 0;
  top: 0;
  margin-bottom: 0;
  border-radius: 0.1875rem 0 0 0.1875rem;
}

.clr-pill .clr-hue {
  margin-top: 1.25rem;
}
