/* src/public/css/calculator/loan_repayment.css … 奨学金・教育ローン返済シミュレーター */

.calc-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-top: 20px;
}



.lrs-section-title {
    margin: 26px 0 12px;
    font-size: 1.1rem;
    color: #1e3c72;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}


.calc-box > .lrs-section-title:first-child { margin-top: 0; }



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



.input-group { margin-bottom: 16px; }


.input-group label,
.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #1e3c72;
    font-size: 0.92rem;
}


.input-group input[type="text"],
.input-group input[type="date"],
.input-group select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    background: #ffffff;
}



/* 数字欄＋単位 */
.lrs-unit-field {
    display: flex;
    align-items: center;
    gap: 6px;
}


.lrs-unit-field input { flex: 1; min-width: 0; text-align: right; }


.lrs-unit-field span {
    flex: 0 0 auto;
    color: #475569;
    font-size: 0.9rem;
    white-space: nowrap;
}



.check-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #334155;
    cursor: pointer;
}


.check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}



/* ボタン群 */
.btn-group {
    display: flex;
    gap: 15px;
    margin: 22px 0 8px;
}


.btn-calc {
    flex: 2;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #2a5298;
    color: white;
}


.btn-calc:hover { background-color: #1e3c72; }


.btn-clear-tool {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #e9ecef;
    color: #495057;
}


.btn-clear-tool:hover { background-color: #dee2e6; }



.lrs-message {
    margin: 0;
    min-height: 1.4em;
    font-size: 0.9rem;
    font-weight: bold;
    color: #b45309;
}


.lrs-total-sub { font-size: 0.85rem; color: #475569; }



.lrs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }


.lrs-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }


.lrs-table th,
.lrs-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}


.lrs-table thead th { background-color: #f1f5f9; color: #1e3c72; font-size: 0.85rem; white-space: nowrap; }


.lrs-table tbody th { color: #1e293b; font-weight: bold; }


.lrs-table .lrs-num { text-align: right; white-space: nowrap; }
@media (max-width: 768px) {


    .calc-box { padding: 20px; }


    .btn-group { gap: 10px; }


    .btn-calc,
.btn-clear-tool { padding: 12px; font-size: 0.95rem; }


    .lrs-table { font-size: 0.85rem; }


    .lrs-table th,
.lrs-table td { padding: 8px 6px; }
}
@media (max-width: 480px) {


    .lrs-grid { grid-template-columns: 1fr; }
}



/* === 自動車の維持費比較だけの部品 === */




.lrs-note { margin: 4px 0 12px; font-size: 0.8rem; color: #64748b; line-height: 1.55; white-space: pre-line; }


.lrs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }


.lrs-total-sub { font-size: 0.82rem; color: #475569; }



/* グラフ */
.lrs-chart-title,
.lrs-sub-title { margin: 18px 0 8px; font-size: 1rem; color: #1e3c72; }


.lrs-chart-wrap { position: relative; width: 100%; }


.lrs-chart { display: block; width: 100%; height: auto; overflow: visible; }



.lrs-gridline { stroke: #e9ecef; stroke-width: 1; }


.lrs-axis { stroke: #94a3b8; stroke-width: 1; }


.lrs-tick { fill: #64748b; font-size: 11px; }


.lrs-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }


.lrs-dot { stroke: #ffffff; stroke-width: 2; }


.lrs-crosshair { stroke: #64748b; stroke-width: 1; pointer-events: none; }


.lrs-hit { fill: transparent; cursor: crosshair; }


.lrs-hit:focus { outline: none; }


.lrs-hit:focus-visible { stroke: #2a5298; stroke-width: 2; }


.lrs-tooltip {
    position: absolute;
    z-index: 2;
    min-width: 160px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    font-size: 0.82rem;
    color: #334155;
    pointer-events: none;
}


.lrs-tip-title { font-weight: bold; color: #1e3c72; margin-bottom: 4px; }


.lrs-tip-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; }


.lrs-tip-row strong { color: #1e293b; }


.lrs-tip-name { color: #64748b; }



/* 表 */
.lrs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }


.lrs-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }


.lrs-table th,
.lrs-table td { padding: 9px 8px; border-bottom: 1px solid #e2e8f0; text-align: left; }


.lrs-table thead th { background-color: #f1f5f9; color: #1e3c72; font-size: 0.82rem; }


.lrs-table tbody th { color: #334155; font-weight: normal; min-width: 9em; }


.lrs-table .lrs-num { text-align: right; white-space: nowrap; }


.lrs-table td.lrs-num { color: #1e293b; }


.lrs-yearly { margin-top: 14px; }


.lrs-yearly summary { cursor: pointer; font-weight: bold; color: #2a5298; padding: 6px 0; }
@media (max-width: 900px) {


    .lrs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {


    .lrs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* === 返済シミュレーターだけの部品 === */
.lrs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.lrs-term { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.lrs-unit-field-sm { max-width: 220px; }

.lrs-unit-field-sm input { width: auto; flex: 1; }

.radio-group { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 5px; }

.radio-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 500; color: #334155; }

.lrs-variable { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }

.lrs-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }

.lrs-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }

.lrs-step input { width: 100%; padding: 9px 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 0.95rem; box-sizing: border-box; text-align: right; background: #ffffff; }

.lrs-step-remove { width: 38px; height: 38px; border: 1px solid #fecaca; border-radius: 6px; background: #fff5f5; color: #dc2626; cursor: pointer; }

.lrs-step-remove:hover { background: #fee2e2; }

.lrs-btn-sub {
    padding: 9px 16px; border: 1px solid #cbd5e1; border-radius: 6px; background: #f8fafc; color: #2a5298;
    font-weight: bold; font-size: 0.9rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}

.lrs-btn-sub:hover { background: #e2e8f0; }

.lrs-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }

.lrs-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 8px; background: #f1f3f5; min-width: 0; }

.lrs-card-title { font-size: 0.82rem; color: #64748b; font-weight: bold; }

.lrs-card-val { font-size: 1.35rem; font-weight: bold; color: #1e293b; overflow-wrap: anywhere; }

.lrs-card-main .lrs-card-val { color: #2a5298; }

.lrs-card-sub { font-size: 0.8rem; color: #475569; white-space: pre-line; line-height: 1.5; }

.lrs-sub-title { margin: 18px 0 8px; font-size: 1rem; color: #1e3c72; }

.lrs-chart-wrap { position: relative; width: 100%; }

.lrs-chart { display: block; width: 100%; height: auto; overflow: visible; }

.lrs-gridline { stroke: #e9ecef; stroke-width: 1; }

.lrs-axis { stroke: #94a3b8; stroke-width: 1; }

.lrs-tick { fill: #64748b; font-size: 11px; }

.lrs-line { fill: none; stroke: #2a78d6; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

.lrs-dot { fill: #2a78d6; stroke: #ffffff; stroke-width: 2; pointer-events: none; }

.lrs-crosshair { stroke: #64748b; stroke-width: 1; pointer-events: none; }

.lrs-hit { fill: transparent; cursor: crosshair; }

.lrs-hit:focus { outline: none; }

.lrs-hit:focus-visible { stroke: #2a5298; stroke-width: 2; }

.lrs-tooltip {
    position: absolute; z-index: 2; min-width: 170px; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px;
    background: #ffffff; box-shadow: 0 4px 14px rgba(0,0,0,0.12); font-size: 0.82rem; color: #334155; pointer-events: none;
}

.lrs-tip-title { font-weight: bold; color: #1e3c72; margin-bottom: 4px; }

.lrs-tip-row { display: flex; align-items: baseline; gap: 6px; padding: 2px 0; }

.lrs-tip-row strong { color: #1e293b; }

.lrs-tip-name { color: #64748b; }

.lrs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.lrs-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }

.lrs-table th,
.lrs-table td { padding: 8px 8px; border-bottom: 1px solid #e2e8f0; text-align: left; white-space: nowrap; }

.lrs-table thead th { background-color: #f1f5f9; color: #1e3c72; font-size: 0.8rem; position: sticky; top: 0; }

.lrs-table tbody th { color: #334155; font-weight: normal; }

.lrs-table .lrs-num { text-align: right; }

.lrs-table td.lrs-num { color: #1e293b; }

.lrs-table .lrs-row-bonus td { background: #f8fafc; }

.lrs-schedule { margin-top: 14px; }

.lrs-schedule summary { cursor: pointer; font-weight: bold; color: #2a5298; padding: 6px 0; }

.lrs-schedule-wrap { max-height: 480px; overflow-y: auto; }

.lrs-actions { margin-top: 12px; display: flex; justify-content: flex-end; }
@media (max-width: 900px) {

    .lrs-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {

    .lrs-grid { grid-template-columns: 1fr; }

    .lrs-cards { grid-template-columns: 1fr 1fr; }

    .lrs-card-val { font-size: 1.15rem; }
}
