.clr-picker {
  display: none;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  align-content: space-between;
  row-gap: 5px;
  padding: 15px;
  position: fixed;
  height: 560px;
  width: 100%;
  max-width: 450px;
  background-color: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 0 5px rgb(0 0 0 / 5%), 0 5px 20px rgb(0 0 0 / 10%);
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  overflow: visible;
  z-index: -1;
  margin: calc(var(--height) - 560px) 0 0;
}

.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: 190px;
  border: none;
  border-radius: 10px;
  background-image: linear-gradient(rgba(0, 0, 0, 0), #000),
    linear-gradient(90deg, #fff, currentColor);
  cursor: pointer;
  overflow: visible;
  z-index: 10;
  order: 1;
}

.clr-marker {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -12px 0 0-12px;
  border: 1px solid #fff;
  border-radius: 50%;
  background-color: currentColor;
  cursor: pointer;
  overflow: visible;
}

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

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

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

.clr-picker input[type="range"]::-moz-range-thumb {
  width: 8px;
  height: 8px;
  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%);
  overflow: visible;
}

.clr-hue,
.clr-alpha {
  position: relative;
  width: 100%;
  height: 22px;
  margin: 4px 0;
  border-radius: 7px;
  order: 2;
}

.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,
.clr-alpha input {
  position: absolute;
  width: calc(100% + 16px);
  height: 16px;
  left: -16px;
  top: -4px;
  margin: 0;
  background-color: transparent;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.clr-hue div,
.clr-alpha div {
  position: absolute;
  width: 32px;
  height: 32px;
  left: 0;
  top: 50%;
  margin-left: -16px;
  transform: translateY(-50%);
  border: 2px solid #fff;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 1px #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: 0;
  padding: 20px 0;
  width: 100%;
  margin: 0;
}

.clr-segmented {
  display: flex;
  position: relative;
  background: var(--bgColor);
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  box-sizing: border-box;
  color: #999;
  font-size: 14px;
  overflow: hidden;
}

.clr-segmented.light {
  background: #f3f3f3;
  color: #2c2c32
}

.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: 4px 0;
  font-size: inherit;
  font-weight: normal;
  line-height: initial;
  text-align: center;
  cursor: pointer;
}

.clr-segmented input:checked+label {
  color: var(--fontcolor);
  background-color: var(--color);
  border-radius: 10px;
}

.clr-swatches {
  order: 4;
  width: 100%;
  margin: 0 0px 40px;
}

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

.clr-swatches button {
  position: relative;
  width: calc(100% / 5);
  height: 52px;
  /* margin: 0 4px 6px 4px; */
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  overflow: hidden;
  cursor: pointer;
  background: currentColor;
}

.clr-swatches button:nth-of-type(1) {
  border-top-left-radius: 6px;
}

.clr-swatches button:nth-of-type(5) {
  border-top-right-radius: 6px;
}

.clr-swatches button:nth-of-type(6) {
  border-bottom-left-radius: 6px;
}

.clr-swatches button:nth-of-type(10) {
  border-bottom-right-radius: 6px;
}

/* .clr-swatches button:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border: 0;
  background-color: currentColor;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5); 
} */

input.clr-color {
  order: 3;
  width: calc(100% - 50px);
  height: 32px;
  margin: 15px 0px 20px auto;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #444;
  background-color: #fff;
  font-family: sans-serif;
  font-size: 14px;
  text-align: center;
  box-shadow: none;
}

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

#clr-title {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

#clr-title span {
  color: var(--buttonColor);
}

.clr-clear,
.clr-close {
  display: flex;
  width: 24px;
  height: 24px;
  border: 0;
  background-color: var(--buttonColor);
  cursor: pointer;
  border-radius: 0;
}

.clr-close {
  mask-image: url(../images/navigation/close.svg);
  -webkit-mask-image: url(../images/navigation/close.svg);
}

.clr-clear {
  mask-image: url(../images/navigation/trash.svg);
  -webkit-mask-image: url(../images/navigation/trash.svg);
}

.clr-preview {
  position: relative;
  width: 32px;
  height: 32px;
  margin: 15px 0 20px 0;
  background-color: currentColor;
  border-radius: 6px;
  overflow: hidden;
  order: 2;
}

/* .clr-preview:before,
.clr-preview:after {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  border: 0;
  border-radius: 0;
} */

/* .clr-preview:after {
  border: 0;
  background-color: currentColor;
} */

.clr-preview button {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: transparent;
  text-indent: -9999px;
  cursor: pointer;
}

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

.clr-field {
  display: flex;
  right: 25px;
  position: absolute;
}

.clr-field input {
  background: var(--color);
  border: none;
  border-radius: 10px;
  text-align: center;
  padding: 15px 5px;
  width: 135px;
  z-index: 1;
  color: var(--fontcolor);
  text-transform: uppercase;
  /* box-shadow: 1px 2px 3px rgb(0 0 0 /10%); */
}

.clr-field button {
  position: absolute;
  width: 30px;
  height: 30px;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  white-space: nowrap;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
}

.clr-field button:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: inherit;
  background-color: var(--color);
  box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5);
}

.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 2px #1e90ff, 0 0 2px 2px #fff;
}

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

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

.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: #202124;
}

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

.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 1px rgba(255, 255, 255, 0.5);
}

@media screen and (min-width: 720px) {
  .clr-picker {
    margin: auto;
    border-radius: 18px;
  }
}