/* ==================== V2H設定セクション スタイル ==================== */

.v2h-enable-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--funas-blue-soft);
    border: 2px solid #bfdbfe;
    border-radius: 10px;
    margin-bottom: 16px;
}
.v2h-enable-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}
.v2h-enable-row label {
    font-weight: 600;
    color: #1e40af;
    cursor: pointer;
    user-select: none;
}

.v2h-sub-title {
    margin: 18px 0 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    border-radius: 4px;
}

.v2h-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.v2h-spec-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.v2h-spec-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}
.v2h-spec-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
}
.v2h-spec-value.on { color: #059669; }
.v2h-spec-value.off { color: #9ca3af; }

.v2h-holiday-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.v2h-holiday-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}
.v2h-holiday-row input[type="number"] {
    width: 70px;
    padding: 4px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
}

.v2h-toggle-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    cursor: pointer;
    user-select: none;
}
.v2h-toggle-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.v2h-result-card {
    border: 2px solid var(--funas-blue);
    background: var(--funas-blue-soft);
}
.v2h-result-card .result-card-title {
    color: var(--funas-blue-dark);
}

.v2h-kpi-grid {
    display: grid;
    /* 5列固定 — 小画面では折り返す */
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 12px 0;
}
@media (max-width: 900px) {
    .v2h-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
    .v2h-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

.v2h-kpi-box {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 14px 14px 12px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 80px;   /* 全カードの高さを揃える */
}
.v2h-kpi-label {
    font-size: 11px;
    color: var(--gray-600);
    font-weight: 600;
    line-height: 1.4;
    /* ラベルの折り返しを抑制し高さを固定 */
    min-height: 30px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.v2h-kpi-label .kpi-sublabel {
    font-size: 10px;
    font-weight: 400;
    color: var(--gray-400);
}
.v2h-kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--funas-blue);
    margin-top: auto;
    word-break: break-word;
}
/* コスト（負の意味）= ゴールド寄りの警告色 */
.v2h-kpi-value.red  { color: var(--color-danger); }
/* 家庭メリット = Funas ブルー（既存） */
.v2h-kpi-value.blue { color: var(--funas-blue); }
/* 主要な「総合メリット」= ゴールドで際立たせる */
.v2h-kpi-value.gold { color: var(--funas-gold-dark); font-size: 22px; }

.v2h-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    font-size: 12px;
}
.v2h-detail-table th,
.v2h-detail-table td {
    border: 1px solid #e5e7eb;
    padding: 6px 8px;
    text-align: right;
}
.v2h-detail-table th {
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
}
.v2h-detail-table th:first-child,
.v2h-detail-table td:first-child {
    text-align: center;
    font-weight: 600;
    background: #f9fafb;
}
.v2h-detail-table tfoot td {
    background: var(--funas-blue-soft);
    font-weight: 700;
    color: var(--funas-blue-dark);
}

.v2h-gasoline-box {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--funas-gold-soft);
    border: 1px solid #F0D080;
    border-radius: 8px;
}
.v2h-gasoline-box .gsl-title {
    font-weight: 600;
    color: var(--funas-black);
    margin-bottom: 8px;
}
.v2h-gasoline-box .gsl-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    color: var(--gray-700);
}
.v2h-gasoline-box .gsl-row .gsl-value {
    font-weight: 600;
}
.v2h-gasoline-box .gsl-row.savings {
    border-top: 1px dashed var(--funas-gold);
    margin-top: 6px;
    padding-top: 8px;
    font-size: 15px;
    color: var(--funas-gold-dark);
    font-weight: 700;
}

.v2h-info-note {
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--funas-blue-soft);
    border-left: 3px solid var(--funas-blue);
    font-size: 12px;
    color: var(--funas-blue-dark);
    line-height: 1.5;
    border-radius: 4px;
}

.v2h-ev-preset-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

@media (max-width: 640px) {
    .v2h-ev-preset-row {
        grid-template-columns: 1fr;
    }
    .v2h-spec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 年式・容量の長い選択肢もモバイル幅に収める */
.v2h-ev-preset-row .input-group { min-width: 0; }
.v2h-ev-preset-row select { width: 100%; min-width: 0; }
.ev-variant-select { grid-column: 1 / -1; }
#evPresetNote { line-height: 1.7; }
