/**
 * Gold Price Display - フロントエンドスタイル
 * 
 * インゴット: 既存の2列グリッド形式
 * 金・プラチナ・コンビ: divテーブル形式
 */

/* ========================================
   メインコンテナ
======================================== */
.gold-price-wrapper {
    font-family: YakuHanJP, "Noto Sans JP", sans-serif;
    margin: 20px 0;
}

/* 更新情報 */
.gold-price-update-info {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* ========================================
   インゴットグループ（2列グリッド）
======================================== */
.gold-price-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 0;
    padding: 0;
}

.gold-price-item {
    background: #fff;
    border: 1px solid #000;
    padding: 1.25rem;
    text-align: center;
}

/* 金属名 */
.gold-price-type {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* 価格表示 */
.gold-price-value {
    font-size: 24px;
    font-weight: 700;
    color: #c4a446;
    margin-bottom: 8px;
    line-height: 1.2;
}

.gold-price-unit {
    font-size: 15px;
    font-weight: 700;
    margin-left: 2px;
}

/* 前日比 */
.gold-price-change {
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
}

.gold-price-change.positive {
    background-color: rgba(255, 0, 0, 0.1);
    color: #dc3545;
}

.gold-price-change.negative {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.gold-price-change.neutral {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* ========================================
   金・プラチナ・コンビグループ（divテーブル）
======================================== */
.gpd-price-table.gpd-simple {
    background: #fff;
    border: 1px solid #000;
    width: 100%;
}

/* ヘッダー行: 見出しのみ */
.gpd-price-table.gpd-simple .gpd-price-header {
    background: #fbf9f4;
    padding: 12px;
}

/* 見出し */
.gpd-price-table.gpd-simple .gpd-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin: 0;
}

/* データ行: 3カラム */
.gpd-price-table.gpd-simple .gpd-price-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    border-bottom: 1px solid #eee;
	align-items: center;
}

.gpd-price-table.gpd-simple .gpd-price-row:last-child {
    border-bottom: none;
}

.gpd-price-table.gpd-simple .gpd-price-row > div {
    padding: 8px 10px;
}

/* 前日比なしの場合（2カラム） */
.gpd-price-table.gpd-simple.gpd-no-change .gpd-price-row {
    grid-template-columns: 3fr 2fr;
}

/* 銘柄名 */
.gpd-price-table.gpd-simple .gpd-metal-name {
    font-size: 13px;
    font-weight: 600;
	line-height:1.5;
    color: #333;
}

/* 価格 */
.gpd-price-table.gpd-simple .gpd-price-value {
    font-size: 13px;
    font-weight: 700;
    color: #c4a446;
    text-align: right;
}

/* 前日比 */
.gpd-price-table.gpd-simple .gpd-price-change {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

/* 前日比の色分け */
.gpd-price-table.gpd-simple .gpd-price-change.gpd-positive {
    color: #dc3545;
}

.gpd-price-table.gpd-simple .gpd-price-change.gpd-negative {
    color: #28a745;
}

.gpd-price-table.gpd-simple .gpd-price-change.gpd-neutral {
    color: #666;
}

/* ========================================
   レスポンシブ対応
======================================== */

/* タブレット */
@media (max-width: 768px) {
    /* インゴットグループ */
    .gold-price-container {
        gap: 12px;
    }
    
    .gold-price-item {
        padding: 1rem;
    }
    
    .gold-price-type {
        font-size: 14px;
    }
    
    .gold-price-value {
        font-size: 22px;
    }
    
    .gold-price-unit {
        font-size: 14px;
    }
    
    .gold-price-change {
        font-size: 11px;
        padding: 3px 8px;
    }
    
}

/* スマートフォン */
@media (max-width: 480px) {
    /* インゴットグループ */
    .gold-price-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .gold-price-item {
        padding: 0.875rem;
    }
    
    .gold-price-type {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .gold-price-value {
        font-size: 20px;
    }
    
    .gold-price-unit {
        font-size: 13px;
    }
    
    .gold-price-change {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    /* テーブルグループ */
    .gpd-price-table.gpd-simple .gpd-price-header {
        padding: 12px;
    }
    
    .gpd-price-table.gpd-simple .gpd-group-title {
        font-size: 13px;
    }
    
    .gpd-price-table.gpd-simple .gpd-price-row > div {
        padding: 8px 10px;
    }
    
    .gpd-price-table.gpd-simple .gpd-metal-name {
        font-size: 13px;
    }
    
    .gpd-price-table.gpd-simple .gpd-price-value {
        font-size: 13px;
    }
    
    .gpd-price-table.gpd-simple .gpd-price-change {
        font-size: 11px;
    }
}
