/* src/public/css/contrast-checker.css … WCAG準拠 カラーコントラスト比チェッカー
   ダークモードは theme-dark.css の末尾（=== コントラスト比チェッカー ===）にあります。
   💡 見え方（.cc-preview）・提案の見本・例のボタンは、選んだ色そのものを出すため、ダークモードでも色を変えません */

.cc-box {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    padding: 18px;
    margin-top: 18px;
}
.cc-h2 {
    font-size: 1.05rem;
    color: #2a5298;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cc-hint { font-size: 0.85rem; color: #64748b; margin: 0 0 10px; line-height: 1.6; }

/* --- 色の入力 --- */
.cc-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}
.cc-label { display: block; font-weight: bold; color: #2a5298; margin-bottom: 6px; }
.cc-color-row { display: flex; gap: 8px; }
.cc-picker {
    flex: 0 0 52px;
    width: 52px;
    height: 46px;
    padding: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}
.cc-text {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 1.05rem;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
}
.cc-text:focus { border-color: #3498db; }
.cc-error { margin: 6px 0 0; color: #b91c1c; font-size: 0.85rem; }
.cc-error[hidden] { display: none; }
.cc-copy-row { display: flex; gap: 6px; margin-top: 8px; }
.cc-mini {
    padding: 5px 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #475569;
    cursor: pointer;
}
.cc-mini:hover { background: #e2e8f0; }
.cc-swap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #2a5298;
    cursor: pointer;
    font-size: 1rem;
}
.cc-swap:hover { background: #e2e8f0; }
.cc-status { display: block; min-height: 1.2em; margin-top: 6px; font-size: 0.85rem; color: #16a34a; }

/* --- 結果 --- */
.cc-result-box {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
    gap: 18px;
    align-items: center;
}
.cc-ratio-wrap { text-align: center; }
.cc-ratio-label { display: block; font-size: 0.85rem; color: #64748b; }
.cc-ratio { display: block; font-size: 2.6rem; color: #1e3a8a; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cc-ratio-note { display: block; font-size: 0.85rem; color: #475569; margin-top: 4px; }
.cc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.cc-table th, .cc-table td { padding: 8px; border-bottom: 1px solid #e2e8f0; text-align: left; }
.cc-table th { color: #475569; background: #f8fafc; font-weight: bold; }
.cc-table td:nth-child(2) { white-space: nowrap; color: #475569; }
.cc-result { font-weight: bold; white-space: nowrap; }
tr.is-pass .cc-result { color: #15803d; }
tr.is-pass .cc-result::before { content: '✓ '; }
tr.is-fail .cc-result { color: #b91c1c; }
tr.is-fail .cc-result::before { content: '✕ '; }

/* --- 見え方 --- */
.cc-preview { border-radius: 10px; padding: 18px; border: 1px solid #e2e8f0; }
.cc-preview p { margin: 0 0 10px; }
.cc-preview-large { font-size: 24px; font-weight: bold; }
.cc-preview-normal { font-size: 16px; }
.cc-preview-small { font-size: 13px; }
.cc-preview-ui {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 2px solid currentColor;
    border-radius: 8px;
    font-size: 14px;
}

/* --- 提案 --- */
.cc-suggest { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cc-suggest-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px;
}
.cc-suggest-sample {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2rem;
    border: 1px solid #e2e8f0;
}
.cc-suggest-info { display: flex; flex-direction: column; gap: 2px; font-size: 0.85rem; color: #475569; min-width: 0; }
.cc-suggest-target { font-weight: bold; color: #1e293b; }
.cc-suggest-what { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; overflow-wrap: anywhere; }
.cc-suggest-ratio { color: #15803d; font-weight: bold; }
.cc-suggest-actions { display: flex; gap: 6px; }

/* --- 例 --- */
.cc-samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cc-sample {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.cc-sample span { font-size: 0.7rem; font-weight: normal; font-family: 'SFMono-Regular', Consolas, monospace; }

@media (max-width: 640px) {
    .cc-inputs { grid-template-columns: minmax(0, 1fr); }
    .cc-swap { justify-self: center; transform: rotate(90deg); }
    .cc-result-box { grid-template-columns: minmax(0, 1fr); }
    .cc-suggest-item { grid-template-columns: 56px minmax(0, 1fr); }
    .cc-suggest-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
