@charset "utf-8";

/* ------------------------------------------------------------------
   エネルギー・マーケット ダッシュボード（/energy/）
   仕様: doc/specs/energy-hub.md

   ダッシュボード共通の見た目（.sm-card / .sm-layer / .sm-treemap など）は
   semiconductor.css を共有している。このファイルは /energy/ 固有の差分のみ。
   上昇=赤(#da0000) / 下落=緑(#009944) はサイト共通の配色に合わせる。
------------------------------------------------------------------ */

/* ------------------------------------------------------------------
   S2下段. その他テーマの小カード
   テーマ名・前日比・強弱バーのみ。PC3カラム / SP2カラム
------------------------------------------------------------------ */
.en-chip-title {
    font-size: 1em;
    font-weight: bold;
    color: #555;
    margin: 25px 0 10px;
    padding-left: 8px;
    border-left: 3px solid #d5d5d5;
}

.en-chip-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px 10px;
}

.en-chip {
    box-sizing: border-box;
    display: block;
    width: calc(33.333% - 10px);
    /* タップ領域の確保も兼ねて高さを固定し、描画によるレイアウトシフトを防ぐ */
    min-height: 68px;
    padding: 9px 12px;
    margin: 0 5px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    background: #fff;
    text-decoration: none;
    color: #333;
}

.en-chip:hover,
.en-chip:focus {
    background: #fafafa;
    text-decoration: none;
    color: #333;
}

/* テーマ名と強弱バーを1行に収める */
.en-chip-head {
    display: flex;
    align-items: center;
}

.en-chip-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1em;
    line-height: 1.3;
    color: #333;
    /* テーマ名が長くてもカード高さを変えないよう1行に省略する */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* バーはテーマ名の右隣に短く置く。主役は前日比の数値なので幅を取らせない */
.en-chip .sm-bar {
    flex: 0 0 52px;
    width: 52px;
    height: 6px;
    margin-left: 10px;
}

.en-chip-ratio {
    display: block;
    font-size: 1.35em;
    font-weight: bold;
    line-height: 1.3;
    margin: 4px 0 0;
}

/* ------------------------------------------------------------------
   SP（Bootstrap3 の 767px を境界にする）
------------------------------------------------------------------ */
@media screen and (max-width: 767px) {

    .en-chip {
        width: calc(50% - 10px);
        min-height: 64px;
        padding: 8px 10px;
    }

    .en-chip-label {
        font-size: 0.95em;
    }

    .en-chip .sm-bar {
        flex: 0 0 40px;
        width: 40px;
        margin-left: 8px;
    }

    .en-chip-ratio {
        font-size: 1.2em;
    }
}
