.color-pop {
  position: fixed;
  z-index: 30;
  width: 276px;
  padding: 12px;
  background: #fff;
  color: #29282d;
  border: 1px solid #eee;
  border-radius: 14px;
  box-shadow: 0 10px 28px #22222224;
}
.color-sv {
  position: relative;
  height: 148px;
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
}
.color-sv i,
.color-hue i,
.color-alpha i {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #0006;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.color-hue,
.color-alpha {
  position: relative;
  height: 12px;
  margin-top: 12px;
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
}
.color-hue {
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.color-alpha {
  background-image:
    linear-gradient(90deg, #0000, #000), linear-gradient(45deg, #e6e4ea 25%, transparent 25%),
    linear-gradient(-45deg, #e6e4ea 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6e4ea 75%),
    linear-gradient(-45deg, transparent 75%, #e6e4ea 75%);
  background-size:
    auto,
    8px 8px,
    8px 8px,
    8px 8px,
    8px 8px;
  background-position:
    0 0,
    0 0,
    0 4px,
    4px -4px,
    -4px 0;
  background-color: #fff;
}
.color-sliders {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.color-bars {
  flex: 1;
  display: grid;
  gap: 10px;
}
.color-bars .color-hue,
.color-bars .color-alpha {
  margin-top: 0;
}
#color-eyedropper {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 4px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #39363f;
}
#color-eyedropper:hover {
  background: #f4f4f6;
}
#color-eyedropper svg {
  width: 18px;
  height: 18px;
}
.color-row {
  display: flex;
  gap: 1px;
  margin-top: 12px;
  border: 1px solid #eceaf0;
  border-radius: 8px;
  background: #eceaf0;
  overflow: hidden;
}
.color-pop .color-row label {
  flex-direction: row;
  font-size:var(--fs-small);
}
.color-row label {
  display: flex;
  align-items: center;
  background: #f4f4f6;
  color: #85818b;
  padding: 0 8px;
}
.color-hex-field {
  flex: 1;
  gap: 2px;
}
.color-alpha-field {
  width: 58px;
  gap: 2px;
}
.color-row label[hidden] {
  display: none;
}
.color-row input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: #39363f;
  padding: 7px 0;
  font: inherit;
  -moz-appearance: textfield;
}
.color-row input::-webkit-inner-spin-button {
  display: none;
}
.color-section-title {
  margin-top: 12px;
  color: #85818b;
  font-size:var(--fs-micro);
  font-weight: 600;
}
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.color-section-title + .color-swatches {
  margin-top: 7px;
}
.color-swatches button {
  width: 20px;
  min-width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #00000014;
  background: var(--swatch);
}

dialog.color-pop { box-sizing: border-box; margin: 0; inset: auto; max-width: calc(100vw - 24px); max-height: calc(100vh - 16px); overflow: auto; }
.color-picker-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; font-size:var(--fs-base); }
.color-picker-heading button { border:0; background:transparent; color:inherit; font-size:var(--fs-title); padding:0 4px; }
.color-pop .color-sv, .color-pop .color-hue { padding:0; border:0; width:100%; display:block; }
.color-pop .color-row label { margin:0; }
.color-pop .color-row input { min-height:0; margin:0; border-radius:0; }
#color-eyedropper[hidden] { display:none; }
