/*
Theme Name: 虎要素 Child (Cocoon)
Description: 阪神タイガースまとめブログ「虎要素」用 Cocoon 子テーマ。阪神カラー（黒×黄）でのもとけ風まとめレイアウトを実現。
Author: tora-yoso project
Template: cocoon-master
Version: 1.0.0
Text Domain: tora-yoso
*/

/* ============================================================
   CSS 変数（阪神カラー）
   ============================================================ */
:root {
  --ty-primary:           #000000;   /* 黒 - メイン */
  --ty-secondary:         #FFE201;   /* 黄 - アクセント */
  --ty-text-on-primary:   #FFE201;   /* 黒背景上のテキスト */
  --ty-text-on-secondary: #000000;   /* 黄背景上のテキスト */
  --ty-bg:                #f4f4f4;
  --ty-card-bg:           #ffffff;
  --ty-border:            #e0e0e0;
  --ty-link:              #8a7200;
  --ty-link-hover:        #000000;
  --ty-font-size-base:    15px;
  --ty-radius:            4px;
}

/* ============================================================
   基礎設定
   ============================================================ */
body {
  background-color: var(--ty-bg);
  font-size: var(--ty-font-size-base);
}

a {
  color: var(--ty-link);
}
a:hover {
  color: var(--ty-link-hover);
  text-decoration: underline;
}

/* ============================================================
   ヘッダー（サイト名：黒地に黄文字）
   ============================================================ */
#header,
.site-header {
  background-color: var(--ty-primary) !important;
  border-bottom: 3px solid var(--ty-secondary);
}

#header .site-name-text,
.site-header .site-name-text,
#header .site-name a,
.site-header .site-name a {
  color: var(--ty-text-on-primary) !important;
  font-weight: 700;
  letter-spacing: 0.05em;
}

#header .tagline,
.site-header .tagline {
  color: #cccccc !important;
  font-size: 0.8em;
}

/* ============================================================
   ナビゲーション
   ============================================================ */
#navi,
.navi {
  background-color: var(--ty-primary);
}

#navi .navi-in > ul > li > a,
.navi .navi-in > ul > li > a {
  color: var(--ty-text-on-primary) !important;
  font-weight: 600;
}

#navi .navi-in > ul > li > a:hover,
.navi .navi-in > ul > li > a:hover {
  background-color: var(--ty-secondary);
  color: var(--ty-text-on-secondary) !important;
}

/* ============================================================
   トップページ・記事一覧カード
   ============================================================ */
.entry-card,
.a-entry-card {
  background: var(--ty-card-bg);
  border: 1px solid var(--ty-border);
  border-radius: var(--ty-radius);
  transition: box-shadow 0.2s;
}

.entry-card:hover,
.a-entry-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.entry-card-title,
.a-entry-card-title {
  font-size: 1.0em;
  font-weight: 700;
  line-height: 1.4;
}

/* カテゴリバッジ */
.cat-label {
  background-color: var(--ty-primary) !important;
  color: var(--ty-text-on-primary) !important;
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 3px;
}

/* ============================================================
   記事ページ - タイトル
   ============================================================ */
.entry-title {
  font-size: 1.4em;
  font-weight: 700;
  border-left: 4px solid var(--ty-secondary);
  padding-left: 0.6em;
  margin-bottom: 0.8em;
}

/* ============================================================
   出典ボタン（記事本文直後）
   ============================================================ */
.ty-source-box {
  margin: 24px 0;
  padding: 16px;
  background: #f9f9f9;
  border: 1px solid var(--ty-border);
  border-left: 4px solid var(--ty-secondary);
  border-radius: var(--ty-radius);
}

.ty-source-box .ty-source-label {
  font-size: 0.75em;
  color: #888;
  margin-bottom: 6px;
}

.ty-source-button {
  display: inline-block;
  background-color: var(--ty-primary);
  color: var(--ty-text-on-primary) !important;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--ty-radius);
  text-decoration: none !important;
  transition: background 0.2s;
}

.ty-source-button:hover {
  background-color: #333;
  color: var(--ty-secondary) !important;
}

.ty-source-button::before {
  content: "▶ ";
}

/* ============================================================
   評価ボタン枠（P6 フェーズで実装。ここでは設置場所のみ確保）
   ============================================================ */
.ty-vote-placeholder {
  margin: 24px 0;
  padding: 16px;
  border: 2px dashed var(--ty-border);
  border-radius: var(--ty-radius);
  text-align: center;
  background: #fafafa;
  color: #aaa;
  font-size: 0.85em;
}

/* 評価ボタンが設置されたとき（P6）はメッセージを非表示 */
.ty-vote-placeholder.has-votes .ty-vote-placeholder-msg {
  display: none;
}

/* ============================================================
   広告枠（空でもスペース確保。AdSenseは後で薄く設置）
   ============================================================ */
.ty-ad-slot {
  display: block;
  min-height: 90px;
  background: transparent;
  text-align: center;
  margin: 24px 0;
}

/* 開発時のみ枠を見せる（本番で不要なら削除可） */
.ty-ad-slot:empty::after {
  content: "[広告枠]";
  display: block;
  line-height: 90px;
  color: #ddd;
  font-size: 0.8em;
  border: 1px dashed #e8e8e8;
}

/* ============================================================
   関連記事
   ============================================================ */
.ty-related-posts {
  margin: 32px 0;
}

.ty-related-posts h3 {
  font-size: 1em;
  font-weight: 700;
  border-bottom: 2px solid var(--ty-secondary);
  padding-bottom: 4px;
  margin-bottom: 12px;
}

.ty-related-posts ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ty-related-posts ul li {
  border-bottom: 1px solid var(--ty-border);
  padding: 7px 0;
}

.ty-related-posts ul li a {
  color: #333;
  font-size: 0.9em;
  font-weight: 600;
}

.ty-related-posts ul li a:hover {
  color: var(--ty-link);
}

/* ============================================================
   サイドバー共通
   ============================================================ */
#sidebar .widget-title,
.sidebar .widget-title {
  background-color: var(--ty-primary);
  color: var(--ty-text-on-primary);
  padding: 8px 12px;
  font-size: 0.95em;
  font-weight: 700;
  border-radius: var(--ty-radius) var(--ty-radius) 0 0;
  margin-bottom: 0;
}

#sidebar .widget,
.sidebar .widget {
  margin-bottom: 20px;
}

/* 選手タグ一覧ウィジェット */
.widget.ty-player-tags .tagcloud a {
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #333;
  display: inline-block;
  font-size: 13px !important;
  margin: 2px;
  padding: 3px 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.widget.ty-player-tags .tagcloud a:hover {
  background: var(--ty-secondary);
  color: var(--ty-text-on-secondary);
  border-color: var(--ty-secondary);
}

/* 3日間の人気記事ウィジェット */
.widget.ty-popular-posts ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget.ty-popular-posts ul li {
  border-bottom: 1px solid var(--ty-border);
  padding: 8px 0;
}

.widget.ty-popular-posts ul li:last-child {
  border-bottom: none;
}

.widget.ty-popular-posts ul li a {
  display: block;
  font-size: 0.9em;
  font-weight: 600;
  line-height: 1.4;
  color: #333;
}

.widget.ty-popular-posts ul li a:hover {
  color: var(--ty-link);
}

/* Xアカウント導線ウィジェット */
.ty-x-widget {
  text-align: center;
  padding: 12px;
}

.ty-x-follow-btn {
  display: inline-block;
  background: #000;
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 20px;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.9em;
  transition: background 0.2s;
}

.ty-x-follow-btn:hover {
  background: #333;
}

/* ============================================================
   フッター
   ============================================================ */
#footer,
.site-footer {
  background-color: var(--ty-primary) !important;
  color: #aaa;
  border-top: 3px solid var(--ty-secondary);
}

#footer a,
.site-footer a {
  color: var(--ty-secondary);
}

/* ============================================================
   モバイル対応（スマホファースト）
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --ty-font-size-base: 14px;
  }

  .entry-title {
    font-size: 1.15em;
  }

  .ty-source-button {
    display: block;
    text-align: center;
  }

  /* サイドバーはモバイルでは記事の下に表示（Cocoon設定に依存） */
  .sidebar {
    margin-top: 24px;
  }
}
