/* static/css/color_code_converter.css */

.breadcrumbs {
    margin: 1rem 0 1.25rem;
    font-size: .875rem;
    text-align: left;
}
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.breadcrumbs li {
    display: flex;
    align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
    content: ">";
    margin-left: .375rem;
    color: #666;
}
.breadcrumbs a {
    color: #0066cc;
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs span[aria-current="page"] {
    color: #333;
    font-weight: 600;
}

.ccc-page {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1rem 2.5rem;
    box-sizing: border-box;
    font-family: 'M PLUS 1p', 'Sawarabi Gothic', sans-serif;
    line-height: 1.7;
}
.ccc-page h1 { font-size: 1.6rem; margin: 1.2rem 0 0.6rem; }
.ccc-page h2 { font-size: 1.25rem; }
.ccc-lead { color: #444; }

.ccc-tool-panel {
    margin: 1.25rem 0 1.75rem;
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 1.25rem 1.25rem 1.5rem;
    box-shadow: 0 0.125rem 0.5rem rgba(15, 23, 42, 0.08);
}

.ccc-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.4rem;
}
.ccc-input-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.ccc-text-input {
    width: 100%;
    max-width: 12rem;
    box-sizing: border-box;
    padding: 0.6rem 0.9rem;
    font-family: Consolas, Menlo, monospace;
    font-size: 1rem;
    border: 0.0625rem solid #d6deeb;
    border-radius: 0.75rem;
    background: #fff;
    color: #1f2a44;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ccc-text-input:focus {
    outline: none;
    border-color: #9eb8ef;
    box-shadow: 0 0 0 0.1875rem rgba(47, 106, 230, 0.18);
}
.ccc-text-input.is-invalid {
    border-color: #e08b8b;
    background: #fffafa;
}
.ccc-picker {
    width: 3rem;
    height: 2.6rem;
    padding: 0.15rem;
    border: 0.0625rem solid #d6deeb;
    border-radius: 0.6rem;
    background: #fff;
    cursor: pointer;
    flex: 0 0 auto;
}

.ccc-error {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #b42318;
    background: #fffafa;
    border: 0.0625rem solid #f1c0c0;
    border-radius: 0.75rem;
    padding: 0.75rem 0.9375rem;
    font-size: 0.875rem;
    margin: -0.25rem 0 1rem;
}
.ccc-error::before {
    content: "⚠";
    flex: 0 0 auto;
}
.ccc-error[hidden] {
    display: none;
}

/* 透明(未入力)時に分かるよう市松模様を下地にする */
.ccc-preview {
    height: 5rem;
    margin-bottom: 1rem;
    border: 0.0625rem solid #e3e9f4;
    border-radius: 0.75rem;
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #eef1f6 25%, transparent 25%, transparent 75%, #eef1f6 75%),
        linear-gradient(45deg, #eef1f6 25%, transparent 25%, transparent 75%, #eef1f6 75%);
    background-size: 1rem 1rem;
    background-position: 0 0, 0.5rem 0.5rem;
}

.ccc-values {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.ccc-values th,
.ccc-values td {
    padding: 0.55rem 0.9rem;
    border-top: 0.0625rem solid #e3e9f4;
    border-bottom: 0.0625rem solid #e3e9f4;
    text-align: left;
}
.ccc-values th {
    width: 4rem;
    background: #f5f8fd;
    color: #374151;
    font-weight: 700;
}
.ccc-values td {
    font-family: Consolas, Menlo, monospace;
    color: #1f2a44;
    user-select: all;
}
.ccc-values td.ccc-values__copy {
    width: 1%;
    white-space: nowrap;
    text-align: right;
    user-select: none;
}

.ccc-copy-btn {
    font: inherit;
    font-family: 'M PLUS 1p', 'Sawarabi Gothic', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border: 0.0625rem solid #2f6ae6;
    border-radius: 0.5rem;
    background: #fff;
    color: #2f6ae6;
    cursor: pointer;
    transition: background 0.15s ease;
}
.ccc-copy-btn:hover {
    background: #eef4ff;
}
.ccc-copy-btn.is-copied {
    background: #2f6ae6;
    color: #fff;
}

/* コントラストチェック */
.ccc-contrast {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 0.0625rem solid #edf2f7;
}
.ccc-page .ccc-contrast__heading {
    font-size: 1.05rem;
    margin: 0 0 0.3rem;
}
.ccc-contrast__note {
    margin: 0 0 0.8rem;
    font-size: 0.875rem;
    color: #555;
}
.ccc-contrast__bg {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    white-space: nowrap;
}
.ccc-contrast__sample {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    border: 0.0625rem solid #e3e9f4;
    border-radius: 0.75rem;
    background: #fff;
}
.ccc-contrast__sample-normal { font-size: 1rem; }
/* WCAGの「大きな文字」= 18pt(24px)以上、または14pt(約18.66px)以上の太字 */
.ccc-contrast__sample-large { font-size: 1.5rem; font-weight: 700; }
.ccc-contrast__ratio {
    margin: 0 0 0.4rem;
    font-size: 1rem;
}
#ccc-contrast-ratio {
    font-family: Consolas, Menlo, monospace;
    font-size: 1.35rem;
    font-weight: 700;
}
.ccc-contrast__result {
    display: inline-block;
    margin: 0;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
}
.ccc-contrast__result:empty { display: none; }
.ccc-contrast__result[data-level="aaa"],
.ccc-contrast__result[data-level="aa"] {
    background: #e3f6e9;
    color: #1f7a45;
}
.ccc-contrast__result[data-level="aa-large"] {
    background: #fff4dc;
    color: #8a5a00;
}
.ccc-contrast__result[data-level="fail"],
.ccc-contrast__result:not([data-level]) {
    background: #fdecec;
    color: #b42318;
}

.ccc-faq dt {
    font-weight: bold;
    margin-top: 0.8rem;
}
.ccc-faq dd {
    margin: 0.2rem 0 0;
    color: #444;
}
