/* WCAG 颜色对比度检查器 —— 取色、预览与判定样式 */

.cc-pickers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cc-picker {
    padding: 12px 14px;
    border: 1px solid var(--c-border, #e3e6ea);
    border-radius: 10px;
    background: var(--c-bg-soft, #f8fafc);
}

.cc-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13.5px;
    font-weight: 800;
}

.cc-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-color {
    flex: 0 0 52px;
    width: 52px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--c-border, #e3e6ea);
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.cc-hex {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--c-border, #e3e6ea);
    border-radius: 8px;
    background: var(--c-bg, #fff);
    color: var(--c-text, #222);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 14px;
    text-transform: uppercase;
}

.cc-hex:focus {
    outline: none;
    border-color: var(--c-primary, #3b82f6);
}

.cc-meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--c-text-sub, #888);
    line-height: 1.6;
}

.cc-preview {
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--c-border, #e3e6ea);
}

.cc-preview p {
    margin: 0 0 10px;
}

.cc-preview .cc-p-lg {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
}

.cc-preview .cc-p-md {
    font-size: 16px;
    line-height: 1.6;
}

.cc-preview .cc-p-bold {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.5;
}

.cc-preview .cc-p-line {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
}

.cc-preview .cc-btn-demo {
    padding: 6px 14px;
    border: 2px solid currentColor;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.cc-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--c-border, #e3e6ea);
    border-radius: 10px;
    background: var(--c-bg-soft, #f8fafc);
}

.cc-ratio {
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.cc-badge {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.cc-badge.aaa { background: #15803d; }
.cc-badge.aa { background: #16a34a; }
.cc-badge.aal { background: #ca8a04; }
.cc-badge.fail { background: #dc2626; }

.cc-score-note {
    flex: 1 1 200px;
    font-size: 12.5px;
    color: var(--c-text-sub, #888);
    line-height: 1.7;
}

.cc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.cc-table th,
.cc-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--c-border, #e3e6ea);
}

.cc-table thead th {
    background: var(--c-bg-soft, #f6f8fa);
    font-weight: 700;
}

.cc-yes {
    color: #16a34a;
    font-weight: 800;
}

.cc-no {
    color: #dc2626;
    font-weight: 800;
}

.cc-fix {
    display: grid;
    gap: 10px;
}

.cc-fix-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--c-border, #e3e6ea);
    border-radius: 10px;
}

.cc-fix-title {
    min-width: 108px;
    font-size: 13px;
    font-weight: 800;
}

.cc-swatch {
    width: 34px;
    height: 24px;
    border: 1px solid var(--c-border, #e3e6ea);
    border-radius: 6px;
}

.cc-fix-code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 14px;
    font-weight: 700;
}

.cc-fix-note {
    width: 100%;
    font-size: 12.5px;
    color: var(--c-text-sub, #888);
    line-height: 1.6;
}

.cc-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cc-preset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--c-border, #e3e6ea);
    border-radius: 999px;
    background: var(--c-bg, #fff);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12.5px;
    cursor: pointer;
}

.cc-preset:hover {
    border-color: var(--c-primary, #3b82f6);
}

.cc-preset i {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .2);
}

@media (max-width: 720px) {
    .cc-pickers {
        grid-template-columns: 1fr;
    }

    .cc-ratio {
        font-size: 26px;
    }
}
