/* Color Picker & Converter — tool-specific styles */

.cp-top {
  display: flex;
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.cp-swatch-wrap {
  position: relative;
  flex-shrink: 0;
  width: 150px;
  display: flex;
  flex-direction: column;
}

#cp-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.cp-preview {
  flex: 1;
  min-height: 150px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #4f46e5;
  pointer-events: none;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.cp-fields { flex: 1; min-width: 0; }

.cp-field-row {
  display: flex;
  gap: 0.4rem;
}

.cp-field-row input {
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  flex: 1;
  min-width: 0;
}

.cp-copy { flex-shrink: 0; padding: 0 0.8rem; }

.cp-sliders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem 1rem;
}

#cp-r { accent-color: #dc2626; }
#cp-g { accent-color: #16a34a; }
#cp-b { accent-color: #2563eb; }

.cp-section-title {
  font-size: 1rem;
  margin: 1.25rem 0 0.6rem;
}

.cp-hint {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

.cp-scale {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.35rem;
}

.cp-step {
  height: 46px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: transform 0.12s ease;
}

.cp-step:hover { transform: scale(1.08); }

.cp-step::after {
  content: attr(data-hex);
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  color: var(--text-muted);
  font-family: monospace;
  white-space: nowrap;
}

.cp-scale { margin-bottom: 1.4rem; }

.cp-comp-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.cp-comp {
  width: 72px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.cp-comp-code {
  font-family: monospace;
  font-size: 0.95rem;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .cp-top { flex-direction: column; }
  .cp-swatch-wrap { width: 100%; }
  .cp-preview { min-height: 90px; }
  .cp-sliders { grid-template-columns: 1fr; }
  .cp-step::after { display: none; }
}
