/*
 * color-contrast-checker.css — per-tool styles for the colour pickers,
 * live preview and tint/shade swatches. Tokens only (CSP: style-src 'self').
 */

/* Colour input row: native swatch picker + editable hex field. */
.cc-color-row {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
}
.cc-swatch-input {
  flex: none;
  width: 48px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
}
.cc-swatch-input::-webkit-color-swatch-wrapper { padding: 0; }
.cc-swatch-input::-webkit-color-swatch { border: none; border-radius: var(--radius-sm); }
.cc-swatch-input::-moz-color-swatch { border: none; border-radius: var(--radius-sm); }
.cc-hex-input {
  flex: 1 1 auto;
  min-width: 0;
  text-transform: uppercase;
}

/* Live preview swatch — colours set via JS (CSSOM). */
.cc-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: var(--surface-sunken);
}
.cc-preview-lg {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 var(--space-2);
}
.cc-preview-sm {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

/* Ratio card + verdict badge. */
.cc-ratio-grid { grid-template-columns: 1fr; }
.cc-verdict { margin: var(--space-2) 0 0; }

/* Colour name dot beside each conversion heading. */
.cc-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  margin-right: var(--space-2);
  vertical-align: -1px;
}

/* Conversion columns side by side, stacking on narrow panels. */
.cc-conv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}
.cc-swatch-label { margin-bottom: var(--space-2); }

/* Tint / shade strip. */
.cc-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.cc-chip {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.cc-chip:hover { border-color: var(--border-strong); }
.cc-chip:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.cc-chip-base {
  border-color: var(--text-primary);
  border-width: 2px;
}
