/* Color contrast checker - two linked color/hex inputs, a live preview, a big ratio readout,
   and four WCAG pass/fail badges. Reuses base .btn-outline; all colors are theme tokens. The
   preview's color/background are set inline by JS; pass/fail tinting comes from --good/--bad. */

/* Controls beside the results on wide screens, stacked on narrow. */
.ccc-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
@media (max-width: 720px) { .ccc-layout { grid-template-columns: 1fr; } }

.ccc-controls { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ccc-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ccc-label { font-size: 14px; color: var(--muted); font-weight: 600; }

/* A color picker swatch next to its hex text field. */
.ccc-pick { display: flex; align-items: center; gap: 10px; }
.ccc-swatch-input {
    flex: 0 0 48px; width: 48px; height: 44px; padding: 0; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.ccc-swatch-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.ccc-hex {
    flex: 1 1 auto; min-width: 0; box-sizing: border-box; padding: 12px;
    font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
    font-size: 16px; font-weight: 600; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    font-variant-numeric: tabular-nums;
}
.ccc-hex:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.ccc-actions { margin-top: 4px; }

.ccc-results { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Preview panel - color and background are set inline by JS. */
.ccc-preview {
    padding: 24px; border: 1px solid var(--border); border-radius: 14px;
    display: flex; flex-direction: column; gap: 8px;
}
.ccc-sample-normal { margin: 0; font-size: 16px; }
.ccc-sample-large { margin: 0; font-size: 24px; font-weight: 700; }

/* Big ratio readout. */
.ccc-ratio-wrap { display: flex; flex-direction: column; gap: 2px; }
.ccc-ratio-label { font-size: 14px; color: var(--muted); font-weight: 600; }
.ccc-ratio { font-size: 40px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* Four pass/fail badges. */
.ccc-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 420px) { .ccc-badges { grid-template-columns: 1fr; } }

.ccc-badge {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface);
}
.ccc-badge-name { font-size: 14px; font-weight: 600; color: var(--muted); }

/* Pill result - tinted green on pass, red on fail. */
.ccc-badge-result {
    font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
    color: var(--muted);
}
.ccc-badge-result.is-pass { color: #fff; background: var(--good); }
.ccc-badge-result.is-fail { color: #fff; background: var(--bad); }
