/* static/css/charcode_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;
}

.ccv-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;
}
.ccv-page h1 { font-size: 1.6rem; margin: 1.2rem 0 0.6rem; }
.ccv-page h2 { font-size: 1.25rem; }
.ccv-lead { color: #444; }

.ccv-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);
}

/* タブ(URL/Base64ツールと同じ見た目) */
.ccv-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 0.0625rem solid #edf2f7;
}
.ccv-tab {
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.55rem 1rem;
    border: 0.0625rem solid #d6deeb;
    border-radius: 999px;
    background: #fbfdff;
    color: #4b5563;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.ccv-tab:hover {
    border-color: #9eb8ef;
    color: #2f6ae6;
    transform: translateY(-0.0625rem);
}
.ccv-tab.is-active {
    background: #2f6ae6;
    border-color: #2f6ae6;
    color: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(47, 106, 230, 0.25);
}
.ccv-tab.is-active:hover {
    transform: none;
}

.ccv-field {
    margin-bottom: 1rem;
}
.ccv-field:last-child {
    margin-bottom: 0;
}
.ccv-field > label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.4rem;
}
.ccv-textarea,
.ccv-lookup-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.9375rem;
    border: 0.0625rem solid #d6deeb;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #1f2a44;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ccv-textarea {
    font-family: Consolas, Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
}
.ccv-lookup-input {
    max-width: 10rem;
    font-family: inherit;
    font-size: 1.75rem;
    line-height: 1.3;
    text-align: center;
}
.ccv-textarea:focus,
.ccv-lookup-input:focus {
    outline: none;
    border-color: #9eb8ef;
    box-shadow: 0 0 0 0.1875rem rgba(47, 106, 230, 0.18);
}
.ccv-textarea--output {
    background: #f8fbff;
}
.ccv-note {
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
    color: #6b7280;
}

/* 文字コード表 */
.ccv-lookup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.ccv-lookup-table th,
.ccv-lookup-table td {
    padding: 0.6rem 0.9rem;
    border: 0.0625rem solid #e3e9f4;
    text-align: left;
}
.ccv-lookup-table th {
    width: 11rem;
    background: #f5f8fd;
    color: #374151;
    font-weight: 700;
    white-space: nowrap;
}
.ccv-lookup-table td {
    font-family: Consolas, Menlo, monospace;
    color: #1f2a44;
    overflow-wrap: anywhere;
    user-select: all;
}

.ccv-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    background: #fbfdff;
    border: 0.0625rem solid #e3e9f4;
    border-radius: 0.75rem;
}
.ccv-option {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: #374151;
}
.ccv-option select {
    font: inherit;
    padding: 0.3rem 0.5rem;
    border: 0.0625rem solid #d6deeb;
    border-radius: 0.5rem;
    background: #fff;
}

.ccv-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 0 1rem;
}
.ccv-error::before {
    content: "⚠";
    flex: 0 0 auto;
}
.ccv-error[hidden] {
    display: none;
}

.ccv-copy-btn {
    display: inline-flex;
    align-items: center;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    margin-top: 0.6rem;
    border: 0.0625rem solid #2f6ae6;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #2f6ae6;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.ccv-copy-btn:hover {
    background: #eef4ff;
    transform: translateY(-0.0625rem);
}
.ccv-copy-btn.is-copied {
    background: #2f6ae6;
    border-color: #2f6ae6;
    color: #fff;
}

@media (max-width: 30rem) {
    .ccv-lookup-table th {
        width: auto;
        white-space: normal;
    }
    .ccv-tab {
        padding: 0.45rem 0.75rem;
        font-size: 0.8125rem;
    }
}

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