/* ===============================================================
   Moppy Scalper 案件ページ専用スタイルシート
   =============================================================== */

/* --- 記事全体のラッパー --- */
.msc-article-wrapper { padding: 2rem 0; }

/* --- ヘッダーエリア --- */
.msc-entry-header { margin-bottom: 2rem; border-bottom: 1px solid #e0e0e0; padding-bottom: 2rem; }
.msc-entry-title { font-size: 2.5rem; margin-bottom: 1rem; line-height: 1.3; }
.msc-entry-lead { font-size: 1.1rem; line-height: 1.8; color: #333; }
.msc-post-thumbnail img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 1.5rem; }

/* --- 現在の還元率テーブル --- */
.msc-current-rate-section { margin: 2rem 0; }
.msc-current-rate-table { width: 100%; border-collapse: collapse; }
.msc-current-rate-table th, .msc-current-rate-table td { border: 1px solid #ddd; padding: 1rem; text-align: center; font-size: 1.2rem; }
.msc-current-rate-table th { background-color: #f7f7f7; font-weight: bold; }
.msc-current-rate-table td { font-weight: bold; color: #1d2327; }
.msc-last-checked { text-align: right; color: #555; font-size: 0.9rem; margin-top: 0.5rem; }

/* --- クイックナビゲーション --- */
.msc-quick-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2.5rem 0; padding: 0; list-style: none; }
.msc-quick-nav-item a { display: block; background-color: #f7f7f7; border: 1px solid #e0e0e0; border-radius: 8px; padding: 1rem; text-align: center; text-decoration: none; color: #333; transition: background-color 0.2s ease, transform 0.2s ease; }
.msc-quick-nav-item a:hover { background-color: #f0f0f0; transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.msc-quick-nav-item .nav-title { display: block; font-weight: bold; font-size: 1rem; margin-bottom: 0.25rem; }
.msc-quick-nav-item .nav-value { display: block; font-size: 1.2rem; font-weight: bold; color: #e53935; }
.msc-quick-nav-item .nav-subtitle { display: block; font-size: 0.8rem; color: #777; }

/* --- 過去最高還元率カード --- */
.msc-highest-rate-card { background: linear-gradient(135deg, #fff8e1, #ffecb3); border: 2px solid #ffca28; border-radius: 12px; padding: 1.5rem; margin: 2.5rem 0; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.msc-highest-rate-card .card-title { display: block; font-size: 1.1rem; font-weight: bold; color: #6d4c41; margin-bottom: 0.75rem; }
.msc-highest-rate-card .card-rate { display: block; font-size: 3.5rem; font-weight: 900; color: #e53935; line-height: 1; }
.msc-highest-rate-card .card-date { display: block; font-size: 0.9rem; color: #757575; margin-top: 0.75rem; }

/* --- 各セクション共通 --- */
.msc-section { margin-bottom: 3rem; }
.msc-section h2 { font-size: 1.8rem; margin-bottom: 1.5rem; }

/* --- ポイント獲得条件テーブル --- */
.msc-conditions-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.msc-conditions-table th, .msc-conditions-table td { border: 1px solid #e0e0e0; padding: 0.75rem 1rem; text-align: left; }
.msc-conditions-table th { background-color: #f9f9f9; width: 30%; font-weight: bold; }
.msc-conditions-details { margin-top: 1.5rem; padding: 1.5rem; border: 1px solid #e0e0e0; border-radius: 5px; background: #fafafa; }
.msc-conditions-details h3 { margin-top: 0; }

/* ▼▼▼【NEW】履歴データ用のタブとテーブルのスタイル ▼▼▼ */
.msc-tabs-nav {
    display: flex;
    gap: 10px; /* ボタン間の隙間 */
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}
.msc-tabs-nav li a {
    display: block;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    color: #555;
    transition: all 0.2s ease;
}
.msc-tabs-nav li.active a {
    background-color: #1d2327; /* WordPressの標準的な濃い色 */
    color: #fff;
    border-color: #1d2327;
}
.msc-tab-content {
    display: none;
}
.msc-tab-content.active {
    display: block;
}
.msc-history-data-table {
    width: 100%;
    border-collapse: collapse;
}
.msc-history-data-table th,
.msc-history-data-table td {
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    text-align: center;
}
.msc-history-data-table thead th {
    background-color: #f9f9f9;
    font-weight: bold;
}
.msc-history-data-table tbody tr:nth-child(even) {
    background-color: #f9f9f9; /* 交互に色付け */
}
/* ▲▲▲ ここまで ▲▲▲ */

/* --- スマートフォン用の調整 --- */
@media (max-width: 768px) {
    .msc-quick-nav { grid-template-columns: 1fr; }
    .msc-entry-title { font-size: 1.8rem; }
    .msc-section h2 { font-size: 1.5rem; }
    .msc-highest-rate-card .card-rate { font-size: 2.5rem; }
    .msc-tabs-nav { flex-wrap: wrap; } /* スマホではタブが折り返すように */
    .msc-tabs-nav li { margin-bottom: 5px; }
}

/* ===============================================================
   【NEW】メインCTAボタン
   =============================================================== */
.msc-primary-cta-container {
    margin-top: 1.5rem; /* 上のテーブルとの間隔 */
    text-align: center;
}
.msc-primary-cta-button {
    display: inline-block;
    background: linear-gradient(45deg, #ef5350, #f44336); /* 魅力的な赤のグラデーション */
    color: #ffffff;
    text-decoration: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.msc-primary-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.5);
}

/* ===============================================================
   【NEW】関連記事エリア
   =============================================================== */
.msc-related-posts {
    margin-top: 3rem;
}
.msc-related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* PCでは横3列 */
    gap: 1.5rem; /* 各記事の間隔 */
    list-style: none;
    padding: 0;
    margin: 0;
}
.msc-related-post-item a {
    display: block;
    text-decoration: none;
    color: #1d2327;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    background-color: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.msc-related-post-item a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.msc-related-thumbnail img {
    width: 100%;
    height: 150px; /* 高さを統一 */
    object-fit: cover; /* 画像の比率を保ったままトリミング */
    display: block;
}
.msc-related-title {
    font-weight: bold;
    font-size: 1rem;
    padding: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* スマートフォン用の調整 */
@media (max-width: 768px) {
    .msc-related-posts-grid {
        grid-template-columns: 1fr; /* スマホでは縦1列 */
    }
}
/* ===============================================================
   【NEW】目次 (Table of Contents)
   =============================================================== */
.msc-toc-container {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
}
.msc-toc-container h3 {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.msc-toc-container h3::before {
    content: '📝';
    margin-right: 0.5rem;
    font-size: 1.5rem;
}
.msc-toc-container ol {
    list-style: none;
    counter-reset: toc-counter;
    padding-left: 0;
    margin: 0;
}
.msc-toc-container li {
    counter-increment: toc-counter;
    margin-bottom: 0.8rem;
}
.msc-toc-container li:last-child {
    margin-bottom: 0;
}
.msc-toc-container li a {
    text-decoration: none;
    color: #0073aa; /* WordPress標準のリンク色 */
    font-weight: bold;
    display: block;
    padding: 0.5rem;
    border-bottom: 1px dotted #ccc;
    transition: background-color 0.2s;
}
.msc-toc-container li a:hover {
    background-color: #f0f0f0;
}
.msc-toc-container li a::before {
    content: counter(toc-counter) ". ";
    color: #0073aa;
    font-weight: bold;
}
/* ===============================================================
   ファーストビュー情報ボックス
   =============================================================== */
.msc-infobox-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 2rem 0;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.msc-infobox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 横2列 */
    border-top: 1px solid #e0e0e0; /* ★上に線を追加 */
    border-left: 1px solid #e0e0e0; /* ★左に線を追加 */
}
.msc-infobox-item {
    padding: 1rem; /* パディングを調整 */
    border-bottom: 1px solid #e0e0e0; /* ★下に線を追加 */
    border-right: 1px solid #e0e0e0; /* ★右に線を追加 */
}
.msc-infobox-item .label {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: bold;
}
.msc-infobox-item .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1d2327;
    text-align: center;
}
/* ランクアップ対象のスタイル */
.msc-infobox-item .value.rank-up-true {
    color: #e53935; /* 対象の場合の色 */
}
.msc-infobox-item .value.rank-up-false {
    color: #757575; /* 対象外の場合の色 */
}
.msc-infobox-footer {
    text-align: right;
    font-size: 0.9rem;
    color: #777;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}