/* css/style.css - modern, compact UI for the color picker */
.cp-wrapper {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  max-width: 820px;
  background: #fff;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(18,24,40,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}

/* Left area: SV + hue */
.cp-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* saturation/value square */
.cp-sv-container { width: 260px; height: 200px; position: relative; }
.cp-sv-square {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
  border: 1px solid rgba(0,0,0,0.06);
}
.cp-sv-cursor {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  position: absolute;
  transform: translate(-8px, -8px);
  pointer-events: none;
  background: rgba(0,0,0,0.0);
}

/* Hue */
.cp-hue-container { display: flex; align-items: center; }
.cp-hue-slider {
  width: 22px;
  height: 200px;
  border-radius: 8px;
  position: relative;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
  cursor: ns-resize;
}
.cp-hue-cursor {
  position: absolute;
  left: -4px;
  width: 30px;
  height: 6px;
  border-radius: 4px;
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  border: 1px solid rgba(0,0,0,0.08);
  pointer-events: none;
}

/* Right preview & controls */
.cp-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  min-width: 190px;
}

.cp-preview-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cp-preview-large {
  width: 110px;
  height: 80px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 18px rgba(2,6,23,0.04);
}

.cp-preview-small {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
}

/* Color code + copy */
.cp-code {
  display: flex;
  gap: 8px;
  width: 100%;
}
.cp-hex-input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  min-width: 110px;
  font-family: monospace;
  font-weight: 600;
  cursor: text;
}
.cp-copy-btn {
  padding: 8px 10px;
  border-radius: 8px;
  background: linear-gradient(180deg,#f6f7fb,#eef1fb);
  border: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
  font-weight: 600;
}

/* Swatches */
.cp-swatches {
  margin-top: 12px;
  width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.cp-swatch {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  outline: none;
  cursor: pointer;
  flex: 0 0 auto;
}

/* small responsive adjust */
@media (max-width: 720px) {
  .cp-wrapper { flex-direction: column; gap: 12px; }
  .cp-left { order: 1; }
  .cp-right { order: 2; flex-direction: row; align-items: center; }
  .cp-swatches { width: 100%; }
}
