/*!
 * Webダッシュボードで使用されるCSSデザイン
 */

body {
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, Meiryo,
        sans-serif;
    color: #222222;
    font-size: 18px;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .emphasis {
        font-size: 1.6666666667rem;
    }
    .only-sp {
        display: none;
    }
    .only-pc {
        display: inline;
    }
    .this_block {
        width: 100%;
        min-width: 370px;
        margin: 0 auto;
    }
    #chartdiv {
        width: 100%;
        height: 300px;
        margin: 0 auto;
        position: relative;
    }

    .graph_list li a {
        font-size: 0.5555555556rem;
        display: block;
        padding: 10px;
    }
    .graph_unit {
        width: 100%;
        text-align: left;
        font-size: 11px;
        margin-left: 20px;
    }
    .graph_title {
        font-size: 1.3333333333rem;
    }
}
@media (min-width: 992px) {
    .emphasis {
        font-size: 2.3333333333rem;
    }
    .only-sp {
        display: inline;
    }
    .only-pc {
        display: none;
    }
    .this_block {
        width: 30%;
        min-width: 400px;
        margin: 0 auto;
    }
    #chartdiv {
        width: 70%;
        height: 500px;
        display: block;
        margin: 0 auto;
        position: relative;
    }
    .graph_list li a {
        display: block;
        padding: 0 10px;
    }
    .graph_unit {
        width: 70%;
        position: relative;
        margin: 0 auto;
        text-align: left;
        font-size: 14px;
        margin-left: 20px;
    }
    .graph_title {
        font-size: 2rem;
    }
}

dt {
    font-weight: normal;
}

#footer {
    clear: both;
    text-align: center;
    padding-top: 10px;
    overflow: auto;
}

.center {
    text-align: center;
}

.update {
    margin-top: 60px;
}

.update_em {
    color: #00ae41;
    padding: 0px 4px;
    font-weight: 600;
    font-style: normal;
}

/* 共通レイアウト変数（調整用） */
:root {
    --metric-gap: 8px; /* 列間余白 */
    /* 列幅: 合計 = label + value + unit + gap*2 で幅計算 */
    --metric-label-width: 275px; /* ラベル列（複数行の可能性あり） */
    --metric-value-width: 180px; /* 値列 固定幅（桁増えても単位位置維持）*/
    --metric-unit-width: 60px; /* 最長 '世帯分' を想定（必要なら調整） */
    --metric-total-width: calc(
        var(--metric-label-width) + var(--metric-value-width) +
            var(--metric-unit-width) + (2 * var(--metric-gap))
    );
}

/* 発電量表示行（ラベル / 値 / 単位） */
.power {
    /* ラベル / 値 / 単位（全列固定幅で列位置統一） */
    display: grid;
    width: var(--metric-total-width);
    grid-template-columns: var(--metric-label-width) var(--metric-value-width) var(
            --metric-unit-width
        );
    column-gap: var(--metric-gap);
    align-items: baseline;
    margin: 40px auto;
}

.power dt {
    margin: 0;
}

/* 値（右揃え・桁揃え） */
.power_val_value {
    text-align: right;
    font-variant-numeric: tabular-nums; /* 桁幅揃え */
}

/* 単位（左揃え） */
.power_val_unit {
    text-align: left;
    width: 100%;
}

.power_val {
    color: #318cdd;
    font-weight: 600;
}

.power_info {
    color: #00ae41;
    font-weight: 600;
}

.this_header {
    text-align: center;
    font-size: 1.3333333333rem;
    line-height: 1.3333333333em;
    color: #222222;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding-bottom: 30px;
    margin-top: 40px;
}

.this_box {
    margin-top: 20px;
    height: 100px;
}

/* 親の .center 影響を受けずラベル/単位だけ左揃え。値は個別クラスで右揃え */
.this_power dt {
    text-align: left;
}
.this_power_value {
    text-align: right !important;
}
.this_power_unit {
    text-align: left !important;
}

.this_power {
    /* .power と同じ固定列幅 */
    display: grid;
    width: var(--metric-total-width);
    grid-template-columns: var(--metric-label-width) var(--metric-value-width) var(
            --metric-unit-width
        );
    column-gap: var(--metric-gap);
    align-items: end;
    margin-block-start: 0;
    margin-block-end: 0;
    margin-left: auto;
    margin-right: auto;
}

/* 値（右揃え） */
.this_power_value {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 単位（左揃え / 幅確保で開始位置統一） */
.this_power_unit {
    text-align: left;
    width: 100%;
}

/* レスポンシブ調整（狭い幅では縦積み） */
@media (max-width: 600px) {
    /* モバイルでは比率ベースに切り替え（折返し許容） */
    .power,
    .this_power {
        width: 100%;
        grid-template-columns: 52% 1fr auto; /* ラベル / 値 / 単位 */
    }
}

.this_note {
    margin-top: 10px;
    font-size: 1rem;
    line-height: 1.5em;
    text-align: left;
}

.this_power_co2,
.this_power_home {
    position: relative;
    padding-left: 50px;
    font-size: 16px;
}

.this_power_home:after {
    width: 50px;
    height: 50px;
    position: absolute;
    left: 0;
    top: 0;
    content: "";
    background-size: cover;
    background-image: url(../img/house_icon.svg);
}

.this_power_co2:after {
    width: 50px;
    height: 50px;
    position: absolute;
    left: 0;
    top: 0;
    content: "";
    background-size: cover;
    background-image: url(../img/co2_icon.svg);
}

a {
    text-decoration: none !important;
    color: inherit !important;
    background-color: transparent !important;
}

li {
    display: inline;
}

ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.graph_list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    list-style: none;
}

.graph_ul {
    padding: 60px 0;
    margin-top: 30px;
}

.graph_title {
    margin-top: 40px;
    text-align: center;
    font-weight: 600;
}
.graph_list li {
    position: relative;
    margin-bottom: 30px;
    /*margin-right: 1rem;*/
}

.graph_list li:hover {
    color: #00ae41;
}
.graph_list li.is-active {
    color: #00ae41;
}

.graph_list li.is-active:after {
    position: absolute;
    content: "";
    background-color: #00ae41;
    width: 80%;
    height: 2px;
    bottom: -8px;
    left: 0;
    right: 0;
    margin: 0 auto;
}

.graph_list li.is-disabled {
    color: #999999;
    pointer-events: none;
}
