.ol-ext-colorpicker.ol-popup {
  width: 2em;
  height: 1.5em;
  background-color: transparent;
  background-image: 
    linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%), 
    linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%);
  background-size: 10px 10px;
  background-position: 0 -1px, 5px 4px;
}

.ol-ext-colorpicker .ol-tabbar {
  background-color: #eee;
  border-bottom: 1px solid #999;
  display: none;
}
.ol-ext-colorpicker.ol-tab .ol-tabbar {
  display: block;
}

.ol-ext-colorpicker .ol-tabbar > div {
  display: inline-block;
  background-color: #fff;
  padding: 0 .5em;
  border: 1px solid #999;
  border-radius: 2px 2px 0 0;
  position: relative;
  top: 1px;
  cursor: pointer;
}
.ol-ext-colorpicker .ol-tabbar > div:nth-child(1) {
  border-bottom-color: #fff;
}
.ol-ext-colorpicker.ol-picker-tab .ol-tabbar > div:nth-child(1) {
  border-bottom-color: #999;
}
.ol-ext-colorpicker.ol-picker-tab .ol-tabbar > div:nth-child(2) {
  border-bottom-color: #fff;
}

.ol-ext-colorpicker.ol-popup.ol-tab .ol-popup {
  width: 180px;
}
.ol-ext-colorpicker.ol-tab .ol-palette {
  margin: 0 10px;
}
.ol-ext-colorpicker.ol-tab .ol-container {
  display: none;
}
.ol-ext-colorpicker.ol-tab.ol-picker-tab .ol-container {
  display: block;
}
.ol-ext-colorpicker.ol-tab.ol-picker-tab .ol-palette {
  display: none;
}

.ol-ext-colorpicker.ol-popup .ol-popup {
  width: 340px;
}

.ol-ext-colorpicker.ol-popup .ol-vignet {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border: 0;
  background-color: currentColor;
  pointer-events: none;
}

.ol-ext-colorpicker .ol-container {
  position: relative;
  display: inline-block;
  vertical-align: top;
}
.ol-ext-colorpicker .ol-cursor {
  pointer-events: none;
}

.ol-ext-colorpicker .ol-picker {
  position: relative;
  cursor: crosshair;
  width: 150px;
  height: 150px;
  border: 5px solid #fff;
  background-color: currentColor;
  background-image: linear-gradient(0, #000, transparent),
    linear-gradient(90deg, #fff, transparent);
}
.ol-ext-colorpicker .ol-picker .ol-cursor {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(0,0,0,.7);
  box-shadow: 0 0 0 1px rgba(255,255,255,.7);
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.ol-ext-colorpicker .ol-slider {
  position: relative;
  cursor: crosshair;
  background-color: #fff;
  height: 10px;
  width: 150px;
  margin: 5px 0 10px;
  border: 5px solid #fff;
  border-width: 0 5px;
  background-image: 
    linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%), 
    linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%);
  background-size: 10px 10px;
  background-position: 0 -1px, 5px 4px;
}
.ol-ext-colorpicker .ol-slider > div {
  width: 100%;
  height: 100%;
  background-image: linear-gradient(45deg, transparent, #fff);
  pointer-events: none;
}
.ol-ext-colorpicker .ol-slider .ol-cursor {
  position: absolute;
  width: 4px;
  height: 12px;
  border: 1px solid #000;
  top: 50%;
  left: 0;
  background: transparent;
  transform: translate(-50%, -50%);
}
.ol-ext-colorpicker .ol-tint {
  position: absolute;
  cursor: crosshair;
  width: 10px;
  height: 150px;
  border: 5px solid #fff;
  border-width: 5px 0;
  box-sizing: border-box;
  top: 0;
  right: 5px;
  background-image: linear-gradient(0, #f00, #f0f, #00f, #0ff, #0f0, #ff0, #f00)
}
.ol-ext-colorpicker .ol-tint .ol-cursor {
  position: absolute;
  top: 0;
  left: 50%;
  border: 1px solid #000;
  height: 4px;
  width: 12px;
  transform: translate(-50%, -50%);
}

.ol-ext-colorpicker .ol-clear {
  position: absolute;
  border: 2px solid #999;
  right: 4px;
  top: 163px;
  width: 10px;
  height: 10px;
}
.ol-ext-colorpicker .ol-clear:before,
.ol-ext-colorpicker .ol-clear:after {
  content: "";
  position: absolute;
  width: 15px;
  height: 2px;
  background-color: #999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}
.ol-ext-colorpicker .ol-clear:after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ol-ext-colorpicker.ol-nopacity .ol-slider,
.ol-ext-colorpicker.ol-nopacity .ol-clear {
  display: none;
}
.ol-ext-colorpicker.ol-nopacity .ol-alpha {
  display: none;
}

.ol-ext-colorpicker .ol-rgb {
  position: relative;
  padding: 5px;
  width: 170px;
  display: none;
}
.ol-ext-colorpicker .ol-rgb input {
  width: 25%;
  box-sizing: border-box;
  padding: 0 0 0 2px;
  border: 1px solid #999;
  border-radius: 2px;
  font-size: 13px;
}
.ol-ext-colorpicker .ol-rgb input:nth-child(1) {
	background-color: rgba(255,0,0,.1);
}
.ol-ext-colorpicker .ol-rgb input:nth-child(2) {
	background-color: rgba(0,255,0,.1);
}
.ol-ext-colorpicker .ol-rgb input:nth-child(3) {
	background-color: rgba(0,0,255,.12);
}

.ol-ext-colorpicker button,
.ol-ext-colorpicker .ol-txt-color {
  font-size: 13px;
  margin: 0 5px 5px;
  text-align: center;
  width: 170px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid #999;
  border-radius: 2px;
  display: block;
}
.ol-ext-colorpicker button {
  background-color: #eee;
}
.ol-ext-colorpicker button:hover {
  background-color: #e9e9e9;
}

.ol-ext-colorpicker .ol-txt-color.ol-error {
  background-color: rgba(255,0,0,.2);
}

.ol-ext-colorpicker .ol-palette {
  padding: 2px;
  display: inline-block;
  width: 152px;
}
.ol-ext-colorpicker .ol-palette > div {
  width: 15px;
  height: 15px;
  display: inline-block;
  background-image: 
    linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%), 
    linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  margin: 2px;
  box-shadow: 0 0 2px 0px #666;
  border-radius: 1px;
  cursor: pointer;
  position: relative;
}
.ol-ext-colorpicker .ol-palette > div:before {
  content: "";
  position: absolute;
  background-color: currentColor;
  width: 100%;
  height: 100%;
}
.ol-ext-colorpicker .ol-palette > div.ol-select:after {
  content: "";
  position: absolute;
  width: 6px;
  height: 12px;
  box-shadow: 1px 1px #fff, 2px 2px #000;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}
.ol-ext-colorpicker .ol-palette > div:hover {
  box-shadow: 0 0 2px 1px #d90;
}
.ol-ext-colorpicker .ol-palette hr {
  margin: 0;
}
