:host {
  display: block;
}

.hb-color-picker-panel {
  padding: 12px;
  background-color: var(--hb-color-white, #ffffff);
  border-radius: 4px;
}

.hb-color-picker-panel__saturation {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 4px;
  overflow: hidden;
  cursor: crosshair;
}

.hb-color-picker-panel__saturation-white {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.hb-color-picker-panel__saturation-black {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}

.hb-color-picker-panel__saturation-pointer {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--hb-color-white, #ffffff);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.hb-color-picker-panel__controls {
  margin-top: 12px;
}

.hb-color-picker-panel__hue,
.hb-color-picker-panel__alpha {
  position: relative;
  height: 12px;
  border-radius: 2px;
  margin-bottom: 8px;
  cursor: pointer;
}

.hb-color-picker-panel__hue-bar {
  height: 100%;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
  border-radius: 2px;
}

.hb-color-picker-panel__alpha-bar {
  height: 100%;
  background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
  border-radius: 2px;
}

.hb-color-picker-panel__input {
  margin-top: 12px;
}

.hb-color-picker-panel__input-hex {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--hb-border-color, #dcdfe6);
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 8px;
}

.hb-color-picker-panel__input-rgb {
  display: flex;
  gap: 8px;
}

.hb-color-picker-panel__input-rgb input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--hb-border-color, #dcdfe6);
  border-radius: 4px;
  font-size: 13px;
}

.hb-color-picker-panel__predefine {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hb-border-color-lighter, #e4e7ed);
}

.hb-color-picker-panel__predefine-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s;
}

.hb-color-picker-panel__predefine-color:hover {
  transform: scale(1.1);
}

.hb-color-picker-panel__predefine-color--selected {
  border-color: var(--hb-color-primary);
  transform: scale(1.1);
}

