@charset "UTF-8";

/* ==========================================
   1. 共通レイアウト・テーブル・タブ・汎用装飾
========================================== */
.table-scroll { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; margin-bottom: 20px; }
.matrix-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 0.9em; min-width: 500px; }
.matrix-table th, .matrix-table td { border: 1px solid #ccc; padding: 15px 10px; }
.matrix-table th { background-color: #f9f9f9; }

.custom-tab-container { margin: 25px 0; }
.custom-tab-links { list-style: none; padding: 0; display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; border-bottom: 2px solid #ddd; margin-bottom: 0;}
.custom-tab-links::-webkit-scrollbar { display: none; }
.custom-tab-links li { flex-shrink: 0; white-space: nowrap; padding: 10px 15px; cursor: pointer; background: #f5f5f5; border: 1px solid #ddd; border-bottom: none; margin-right: 5px; border-radius: 5px 5px 0 0; font-weight: bold;}
/* ※タブのアクティブカラーはサイトのアクセントカラー（赤系）に統一しています */
.custom-tab-links li.active { background: #fff; border-top: 3px solid #e74c3c; border-bottom: 2px solid #fff; margin-bottom: -2px; color: #e74c3c; }
.custom-tab-content { border: 1px solid #ddd; padding: 20px; background: #fff; border-top: none; }
.tab-pane { display: none; } .tab-pane.active { display: block; }

.visual-wrapper { text-align: center; margin: 25px 0; }
.visual-wrapper img { max-width: 100% !important; height: auto !important; display: block; margin: 0 auto; }

/* --- 汎用テキストカラー（Pythonコードから呼び出し用） --- */
.text-danger { color: #e74c3c; font-weight: bold; }
.text-primary { color: #3498db; font-weight: bold; }
.text-danger-lg { font-size: 1.1em; color: #e74c3c; font-weight: bold; }
.text-primary-lg { font-size: 1.1em; color: #3498db; font-weight: bold; }
.text-bold-lg { font-size: 1.1em; font-weight: bold; }
.text-sub { font-size: 0.75em; color: #555; }

/* --- 02-2 ガス比較用追加スタイル --- */
.demerit-list { background: #fff5f5; border: 1px solid #ffcccc; padding: 20px 20px 20px 40px; border-radius: 8px; margin-bottom: 20px; }
.demerit-list li { margin-bottom: 10px; color: #333; line-height: 1.6; }

/* ==========================================
   2. ボタン関連（共通・グループ）
========================================== */
.btn { display: block !important; width: 100% !important; max-width: 100% !important; text-align: center; border-radius: 50px !important; padding: 15px 20px !important; font-size: 1.1em !important; font-weight: bold !important; text-decoration: none !important; margin: 15px auto !important; box-sizing: border-box !important; transition: opacity 0.2s; border: none !important; }
.btn:hover { opacity: 0.8; color: #fff !important; }
.btn-red { background-color: #e74c3c !important; color: #fff !important; }
.btn-blue { background-color: #3498db !important; color: #fff !important; }
.btn-orange { background-color: #f39c12 !important; color: #fff !important; }
.btn-l, .btn-m { color: #fff !important; }

.btn-group-row { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; margin: 20px 0; }
.btn-group-row .btn { flex: 1; min-width: 280px; margin: 0 !important; }

/* ==========================================
   3. シミュレーター用スタイル
========================================== */
#simulator-app { font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif; background: #f4f7f6; padding: 15px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); max-width: 800px; margin: 20px auto; box-sizing: border-box; }
.sim-header { text-align: center; margin-bottom: 15px; }
.sim-lead { margin: 0; font-size: 0.9em; color: #666; line-height: 1.6; font-weight: bold; }
.sim-filter-area { background: #fff; padding: 10px 15px; border-radius: 8px; margin-bottom: 15px; border: 1px solid #eee; display: flex; align-items: center; }
.sim-filter-label { font-size: 0.85em; color: #333; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: bold; }
.sim-filter-label input { width: 18px; height: 18px; margin: 0; cursor: pointer; }

.preset-buttons { display: flex; gap: 8px; margin-bottom: 15px; justify-content: center; }
.preset-btn { background: #fff; border: 2px solid #3498db; color: #3498db; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: all 0.2s; font-size: 0.9em; flex: 1; }
.preset-btn:hover, .preset-btn.active { background: #3498db; color: #fff; }
.input-group { background: #fff; padding: 12px; border-radius: 8px; margin-bottom: 15px; }
.input-row { display: flex; align-items: center; margin-bottom: 10px; gap: 10px; }
.input-row:last-child { margin-bottom: 0; }
.input-label { font-weight: bold; min-width: 80px; color: #555; font-size: 0.9em; }
.sim-select, .sim-number { padding: 6px; border: 1px solid #ccc; border-radius: 4px; font-size: 0.95em; }
.sim-number { width: 70px; text-align: right; }
.slider-container { display: flex; align-items: center; flex-grow: 1; gap: 8px; width: 100%; }
.sim-slider { flex-grow: 1; cursor: pointer; width: 100%; }
.result-container { display: flex; flex-direction: column; gap: 12px; }
.result-card { background: #fff; border: 2px solid #ddd; border-radius: 8px; padding: 16px 12px 12px 12px; position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; transition: transform 0.2s; }
.result-card.rank-1 { border-color: #e74c3c; background: #fffdfd; transform: scale(1.01); box-shadow: 0 2px 8px rgba(231, 76, 60, 0.15); z-index: 1; }
.badge { position: absolute; top: -10px; left: 12px; background: #555; color: #fff; padding: 2px 10px; border-radius: 10px; font-size: 0.75em; font-weight: bold; }
.badge.badge-1 { background: #e74c3c; }
.badge.badge-target { background: #f39c12; }
.badge.badge-base { background: #3498db; }
.card-info { flex: 1; min-width: 180px; margin-top: 2px; }
.company-name { font-size: 0.8em; color: #777; margin-bottom: 0; line-height: 1.2; }
.plan-name { font-size: 1.1em; font-weight: bold; color: #333; margin: 0; line-height: 1.3; }
.plan-note { font-size: 0.75em; color: #e74c3c; margin-top: 5px; line-height: 1.3; font-weight: bold; }
.card-price { text-align: right; min-width: 130px; margin-top: 2px; }
.price-val { font-size: 1.6em; font-weight: bold; color: #e74c3c; line-height: 1; }
.price-unit { font-size: 0.8em; color: #555; }
.card-actions { width: 100%; margin-top: 8px; display: flex; justify-content: flex-end; }
.btn-primary { display: inline-block; padding: 8px 24px; border-radius: 4px; background: #e74c3c; color: #fff; text-decoration: none; font-weight: bold; font-size: 0.9em; text-align: center; border: 1px solid #e74c3c; }
.ranking-cta-block { margin-top: 20px; padding: 20px; background: #eaf2f8; border: 2px dashed #3498db; border-radius: 8px; text-align: center; display: none; }
.ranking-cta-text { font-size: 1.05em; font-weight: bold; color: #333; margin-bottom: 15px; line-height: 1.4; }
.btn-cta { display: inline-block; padding: 12px 30px; border-radius: 30px; background: #f39c12; color: #fff; text-decoration: none; font-weight: bold; font-size: 1.1em; box-shadow: 0 4px 6px rgba(243, 156, 18, 0.3); transition: all 0.2s; }

@media (max-width: 600px) {
    #simulator-app { padding: 12px; margin: 10px auto; }
    .preset-buttons { flex-direction: column; gap: 6px; }
    .preset-btn { width: 100%; padding: 10px; }
    .input-row { flex-direction: column; align-items: flex-start; gap: 5px; }
    .slider-container { width: 100%; gap: 5px; }
    .sim-slider { width: 65%; }
    .sim-number { width: 35%; }
    .result-card { flex-direction: column; align-items: flex-start; padding: 14px 10px 10px 10px; }
    .card-info { margin-top: 4px; width: 100%; }
    .card-price { text-align: left; margin-top: 4px; width: 100%; }
    .card-actions { width: 100%; justify-content: center; }
    .btn-primary { width: 100%; padding: 10px 0; }
}

/* ==========================================
   4. 燃料費調整額 警告ブロック
========================================== */
.fuel-warning-box { background-color: #fdfaf0; border: 2px solid #f39c12; border-radius: 12px; padding: 25px; margin: 30px auto; max-width: 750px; font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif; color: #333; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.fuel-warning-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; border-bottom: 1px dashed #f39c12; padding-bottom: 10px; }
.fuel-warning-header h3 { margin: 0; font-size: 1.25em; color: #d35400; font-weight: bold; }
.fuel-comparison-container { display: flex; justify-content: space-around; align-items: flex-end; gap: 20px; margin-bottom: 25px; padding: 10px 0; }
.iceberg-col { flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; }
.iceberg-visual { width: 100%; max-width: 180px; position: relative; margin-bottom: 15px; }
.ice-surface { background: #3498db; height: 45px; width: 80%; margin: 0 auto; border-radius: 4px 4px 0 0; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.75em; font-weight: bold; position: relative; z-index: 2; line-height: 1.2; }
.ice-deep { background: #2980b9; height: 90px; width: 90%; margin: 0 auto; border-radius: 0 0 8px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(255,255,255,0.95); font-size: 0.75em; font-weight: bold; gap: 8px; clip-path: polygon(0% 0%, 100% 0%, 85% 100%, 15% 100%); }
.sea-line { width: 100%; height: 3px; background: #f39c12; margin-bottom: 2px; position: relative; z-index: 3; }
.label-red { color: #e74c3c; font-weight: bold; font-size: 0.85em; margin-top: 5px; line-height: 1.4; }
.fuel-warning-desc { font-size: 0.95em; line-height: 1.7; background: #fff; padding: 15px; border-radius: 8px; border-left: 4px solid #f39c12; }
.fuel-warning-desc strong { color: #e67e22; background: linear-gradient(transparent 70%, #ffeb3b 70%); }
@media (max-width: 600px) {
    .fuel-warning-box { padding: 15px; margin: 20px auto; }
    .fuel-comparison-container { flex-direction: row; gap: 10px; }
    .fuel-warning-header h3 { font-size: 1em; }
    .iceberg-visual { max-width: 140px; margin-bottom: 5px; }
    .ice-surface { height: 35px; font-size: 0.65em; }
    .ice-deep { height: 75px; font-size: 0.65em; }
    .label-red { font-size: 0.7em; margin-top: 0; }
    .fuel-warning-desc { font-size: 0.85em; padding: 10px; }
}