/* static/css/minimum_wage.css
   最低賃金 計算ツール専用の独自CSS(他ツールの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;
}

.mw-page {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1rem 2.5rem;
    box-sizing: border-box;
    background: #f6f8fb;
    font-family: 'M PLUS 1p', 'Sawarabi Gothic', sans-serif;
    line-height: 1.7;
    color: #1f2a44;
}
.mw-page h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin: 1.5rem 0 0.6rem;
    color: #111827;
}
.mw-page section {
    margin: 2rem 0 0;
}
.mw-page section > p {
    margin: 0 0 0.9rem;
    color: #4b5563;
}
.mw-page h2 {
    font-size: 1.15rem;
    margin: 0 0 0.9rem;
    color: #222222;
}
.mw-lead {
    color: #4b5563;
    font-size: 1rem;
    margin: 0 0 1rem;
}

/* ===== ツール本体 ===== */
.mw-page .mw-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);
}

.mw-section-heading {
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
    color: #222222;
}

/* PC幅では関連する入力欄を横に並べてスペースを節約する。
   幅が足りない(スマホなど)場合は auto-fit により自然に1列へ戻る。 */
.mw-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0 1rem;
}
.mw-field {
    margin-bottom: 1rem;
}
.mw-field label,
.mw-field__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.4rem;
}
.mw-field .mw-radio {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 400;
    margin: 0 0 0.35rem;
}
.mw-radio input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #2f6ae6;
}
.mw-input {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 0.9375rem;
    padding: 0.65rem 0.8rem;
    border: 0.0625rem solid #d6deeb;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #1f2a44;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mw-input:focus {
    outline: none;
    border-color: #9eb8ef;
    box-shadow: 0 0 0 0.1875rem rgba(47, 106, 230, 0.18);
}

.mw-fieldset {
    margin: 0 0 1rem;
    padding: 0.9rem 1rem 0;
    background: #fbfdff;
    border: 0.0625rem solid #dbe4f0;
    border-radius: 0.875rem;
}
.mw-fieldset legend {
    padding: 0 0.4rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
}

/* 適用する最低賃金 */
.mw-applied {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    margin: 0 0 1.25rem;
    padding: 0.8rem 1rem;
    background: #eef4ff;
    border: 0.0625rem solid #c7d9f7;
    border-radius: 0.75rem;
}
.mw-applied__label {
    font-size: 0.8125rem;
    color: #64748b;
}
.mw-applied__value {
    font-weight: 700;
    color: #1d4ed8;
}
.mw-applied__note {
    flex-basis: 100%;
    font-size: 0.875rem;
    color: #7c2d12;
}

/* 給与の形態 */
.mw-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 0.0625rem solid #edf2f7;
}
.mw-mode-tab {
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.5rem 1.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;
}
.mw-mode-tab:hover {
    border-color: #9eb8ef;
    color: #2f6ae6;
    transform: translateY(-0.0625rem);
}
.mw-mode-tab.is-active {
    background: #2f6ae6;
    border-color: #2f6ae6;
    color: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(47, 106, 230, 0.25);
}
.mw-mode-tab.is-active:hover {
    transform: none;
}

.mw-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;
}
.mw-error::before {
    content: "⚠";
    flex: 0 0 auto;
}
.mw-error:empty {
    display: none;
}

/* ===== 結果 ===== */
.mw-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}
.mw-stat {
    padding: 0.9rem 1rem;
    background: #f8fbff;
    border: 0.0625rem solid #dbe4f0;
    border-radius: 0.875rem;
}
.mw-stat--big {
    grid-column: 1 / -1;
    background: #eef4ff;
    border-color: #c7d9f7;
}
.mw-stat__label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.3rem;
}
.mw-stat__value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    word-break: break-word;
}
.mw-stat--big .mw-stat__value {
    font-size: 1.75rem;
    color: #1d4ed8;
}

.mw-judgement {
    margin: 0 0 1rem;
    padding: 0.8rem 1rem;
    background: #f8fbff;
    border: 0.0625rem solid #dbe4f0;
    border-radius: 0.75rem;
    font-weight: 700;
    color: #374151;
}
.mw-judgement.is-ok {
    background: #ecfdf3;
    border-color: #a6e3bd;
    color: #166534;
}
.mw-judgement.is-ng {
    background: #fff7ed;
    border-color: #fdba74;
    color: #7c2d12;
}
.mw-judgement--sub {
    font-weight: 400;
}

.mw-hint {
    margin: 0 0 0.9rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.mw-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.55rem 1.1rem;
    border: 0.0625rem solid #2f6ae6;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #2f6ae6;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.mw-copy-btn:hover {
    background: #eef4ff;
    transform: translateY(-0.0625rem);
}
.mw-copy-btn.is-copied {
    background: #2f6ae6;
    border-color: #2f6ae6;
    color: #fff;
}

/* ===== 表(article-table相当の見た目) ===== */
.mw-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 0.75rem 0 1rem;
    -webkit-overflow-scrolling: touch;
}
.mw-table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    font-size: 0.9375rem;
    background: #fff;
}
.mw-table--summary {
    min-width: 0;
}
.mw-table th,
.mw-table td {
    border: 0.0625rem solid #cfcfcf;
    padding: 0.6rem 0.8rem;
    text-align: left;
    vertical-align: middle;
    line-height: 1.6;
}
.mw-table thead th {
    background: #f2f2f2;
    font-weight: 700;
    white-space: nowrap;
}
.mw-table tbody th {
    background: #fafafa;
    font-weight: 700;
    white-space: nowrap;
}
.mw-table tr:nth-child(even) td {
    background: #fcfcfc;
}
.mw-table a {
    color: #2f6ae6;
}

/* ===== 計算式 ===== */
.mw-formula {
    font-family: Consolas, Menlo, monospace;
    font-size: 0.875rem;
    background: #f1f5ff;
    border-radius: 0.5rem;
    padding: 0.6rem 0.9rem;
    margin: 0 0 0.6rem;
    color: #1f2a44;
}

/* ===== ほかの都道府県 ===== */
.mw-pref-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.mw-pref-links a,
.mw-pref-links span {
    display: block;
    padding: 0.45rem 0.6rem;
    border: 0.0625rem solid #d6deeb;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.875rem;
    text-align: center;
    text-decoration: none;
    color: #2f6ae6;
}
.mw-pref-links span {
    background: #2f6ae6;
    border-color: #2f6ae6;
    color: #fff;
    font-weight: 700;
}
.mw-pref-links a:hover {
    background: #eef4ff;
}

/* ===== 関連コラムのカード ===== */
.mw-other-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.75rem;
}
.mw-other-tools__card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 0.125rem 0.5rem rgba(15, 23, 42, 0.08);
    text-decoration: none;
    color: #222222;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mw-other-tools__card:hover,
.mw-other-tools__card:focus-visible {
    transform: translateY(-0.0938rem);
    box-shadow: 0 0.3125rem 1rem rgba(47, 106, 230, 0.16);
    outline: none;
}
.mw-other-tools__title {
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.5;
}
.mw-other-tools__more {
    margin-top: auto;
    padding-top: 0.5rem;
    color: #2f6ae6;
    font-size: 0.8125rem;
    font-weight: 700;
}

.mw-source {
    margin: 2rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
}
.mw-source a {
    color: #2f6ae6;
}

@media (max-width: 36rem) {
    .mw-page h1 {
        font-size: 1.5rem;
    }
    .mw-page .mw-tool-panel {
        padding: 1rem 0.9rem 1.25rem;
        border-radius: 1rem;
    }
    .mw-table {
        font-size: 0.875rem;
    }
}
