/*
Theme Name: Lightning Child
Theme URI: 
Template: lightning
Description: 
Author: 
Tags: 
Version: 0.6.0
*/
/* ────────────── ランキングリスト ────────────── */
.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #eee;
  background-color: #fff;
}

.rank-link {
  display: flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.rank-num {
  width: 28px;
  height: 28px;
  font-weight: bold;
  text-align: center;
  line-height: 28px;
  margin-right: 10px;
  border-radius: 50%;
  background: #999;
  color: #fff;
  flex-shrink: 0;
}

.rank-1 .rank-num { color: #ff5722; font-size: 18px; }
.rank-2 .rank-num { color: #ff9800; font-size: 16px; }
.rank-3 .rank-num { color: #ffc107; font-size: 15px; }

.rank-thumb {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  margin-right: 10px;
  border-radius: 4px;
  background-color: #f0f0f0; /* no imageの四角背景用 */
  overflow: hidden;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rank-title {
  font-weight: bold;
  margin-bottom: 4px;
  line-height: 1.4;
}

.rank-meta {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

/* ────────────── 選択・ボタン風リンク ────────────── */
.ranking-period,
.ranking-type,
.ranking-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.period-btn,
.type-btn,
.sort-btn {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f9f9f9;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  color: #333;
}

.period-btn:hover,
.type-btn:hover,
.sort-btn:hover {
  background: #e0f0ff;
}

.period-btn.active,
.type-btn.active,
.sort-btn.active {
  background: #cce5ff; /* 薄い青でハイライト */
  color: #0073aa;
  font-weight: bold;
  border-color: #99ccff;
}

/* 余白・見やすさ調整 */
.ranking-list li,
.ranking-period a,
.ranking-type button,
.ranking-sort button {
  margin-bottom: 5px;
}

/* =========================
   みんなの話題 - 最終調整
========================= */

.topic-posts-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  margin: 28px 0 44px !important;
}

.topic-card {
  border-top: none !important;
  border-bottom: 1px solid #dfe7ef !important;
  padding: 22px 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.topic-card:first-child {
  border-top: 1px solid #dfe7ef !important;
}

.topic-card-link {
  display: block !important;
  color: inherit !important;
  text-decoration: none !important;
}

.topic-card-body {
  padding: 0 !important;
}

.topic-card-meta {
  margin-bottom: 10px !important;
}

.topic-card-date {
  font-size: 14px !important;
  color: #6f7b8a !important;
  font-weight: 500 !important;
}

.topic-card-title {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 0 10px !important;
  font-size: 24px !important;
  line-height: 1.6 !important;
  color: #1f2d3d !important;
  font-weight: 700 !important;
}

.topic-card-title-text {
  display: inline !important;
}

.topic-badge {
  display: inline-block !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  padding: 9px 15px !important;
  border-radius: 999px !important;
  flex-shrink: 0 !important;
  border: 2px solid transparent !important;
}

.topic-badge-aruaru {
  background: #2f5ea8 !important;
  color: #ffffff !important;
  border-color: #2f5ea8 !important;
  box-shadow: 0 4px 10px rgba(47, 94, 168, 0.22) !important;
}

.topic-badge-idea {
  background: #f0a500 !important;
  color: #ffffff !important;
  border-color: #f0a500 !important;
  box-shadow: 0 4px 10px rgba(240, 165, 0, 0.22) !important;
}

.topic-badge-other {
  background: #596273 !important;
  color: #ffffff !important;
  border-color: #596273 !important;
}

.topic-card-excerpt {
  font-size: 17px !important;
  line-height: 1.9 !important;
  color: #4f5d6b !important;
  margin: 0 !important;
}

@media (max-width: 767px) {
  .topic-card {
    padding: 16px 0 !important;
  }

  .topic-card-date {
    font-size: 13px !important;
  }

  .topic-card-title {
    font-size: 19px !important;
    gap: 10px !important;
  }

  .topic-badge {
    font-size: 12px !important;
    padding: 7px 12px !important;
  }

  .topic-card-excerpt {
    font-size: 15px !important;
    line-height: 1.8 !important;
  }
}
/* =========================
   みんなの話題 強制上書き
========================= */

/* カード全体 */
.topic-posts-grid {
  display: block !important;
}

/* 1記事 */
.topic-card {
  border-bottom: 1px solid #dfe7ef !important;
  padding: 24px 0 !important;
}

/* 日付 */
.topic-card-date {
  font-size: 15px !important;
  color: #6f7b8a !important;
}

/* タイトル（←ここが重要） */
.topic-card-title {
  font-size: 26px !important;
  font-weight: 800 !important;
  line-height: 1.6 !important;
  margin: 8px 0 !important;

  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* タイトル文字 */
.topic-card-title-text {
  font-size: inherit !important;
}

/* ラベル（←ここ超重要） */
.topic-badge {
  font-size: 15px !important;
  padding: 10px 16px !important;
  font-weight: 800 !important;
  border-radius: 999px !important;
}

/* あるある（強調） */
.topic-badge-aruaru {
  background: #2f5ea8 !important;
  color: #fff !important;
  border: 2px solid #2f5ea8 !important;
  box-shadow: 0 5px 12px rgba(47, 94, 168, 0.25) !important;
}

/* アイデア */
.topic-badge-idea {
  background: #f0a500 !important;
  color: #fff !important;
  border: 2px solid #f0a500 !important;
  box-shadow: 0 5px 12px rgba(240, 165, 0, 0.25) !important;
}

/* 抜粋 */
.topic-card-excerpt {
  font-size: 18px !important;
  line-height: 1.9 !important;
  color: #4f5d6b !important;
}

/* =========================================================
   コメント欄 最終版
   親コメントのみ番号表示 / 返信折りたたみ
========================================================= */

.ir-comments-area {
  margin-top: 36px;
}

.ir-comments-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8edf4;
}

.ir-comments-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: #222;
}

.ir-comments-count {
  margin-left: 4px;
  font-size: 16px;
  color: #666;
}

.ir-comments-subtitle {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.ir-comment-list,
.ir-comment-list ol,
.ir-comment-list ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ir-comment-item {
  margin: 0 0 18px !important;
  padding: 0 !important;
}

.ir-comment-card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.ir-comment-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.ir-comment-number {
  color: #2f80ed;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.ir-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.ir-comment-author {
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

.ir-comment-date {
  font-size: 12px;
  color: #8a8f98;
}

.ir-comment-body {
  margin-bottom: 14px;
}

.ir-comment-text {
  font-size: 16px;
  line-height: 1.9;
  color: #222;
  word-break: break-word;
}

.ir-comment-text p {
  margin: 0;
}

.ir-comment-awaiting {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff4d6;
  color: #8a6500;
  font-size: 13px;
}

.ir-comment-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}

.ir-comment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ir-comment-action a,
.comment-report-link,
.ir-replies-toggle {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #5c6f91;
  text-decoration: none;
  padding: 4px 0;
  margin: 0;
  line-height: 1.4;
  background: transparent;
  border: none;
  box-shadow: none;
  appearance: none;
  cursor: pointer;
}

.ir-comment-action a:hover,
.comment-report-link:hover,
.ir-replies-toggle:hover {
  color: #2f80ed;
  text-decoration: none;
  opacity: 1;
}

.ir-replies-toggle:focus {
  outline: none;
  box-shadow: none;
}

/* 返信一覧は初期非表示 */
.children {
  display: none;
  margin: 10px 0 0 20px !important;
  padding-left: 12px !important;
  border-left: 2px solid #e8eef7;
}

/* 子コメントは番号なし・少し軽め */
.ir-comment-child .ir-comment-number {
  display: none !important;
}

.ir-comment-child > .ir-comment-card {
  background: #fafcff;
  border: 1px solid #edf2f8;
  box-shadow: none;
  padding: 14px 16px;
}

.ir-comment-child .ir-comment-head {
  margin-bottom: 10px;
}

.ir-comment-child .ir-comment-author {
  font-size: 14px;
}

.ir-comment-child .ir-comment-date {
  font-size: 12px;
}

.ir-comment-child .ir-comment-text {
  font-size: 14px;
  line-height: 1.8;
}

/* WP ULike */
.ir-comment-card .wpulike,
.ir-comment-card .wp_ulike_general_class {
  margin: 0 0 10px;
}

.ir-comment-card .count-box,
.ir-comment-card .wp_ulike_counter {
  font-size: 13px;
}

/* 画像系を消す */
.comment-author img,
.comment-meta img,
.avatar {
  display: none !important;
}

/* フォーム */
.ir-comment-form-wrap {
  margin-top: 28px;
}

.comment-respond {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.comment-reply-title {
  margin: 0 0 10px;
  font-size: 22px;
  color: #222;
}

.ir-comment-note {
  margin: 0 0 14px;
  color: #666;
  font-size: 14px;
}

.comment-form-author,
.comment-form-email,
.comment-form-comment {
  margin-bottom: 14px;
}

.comment-form-author label,
.comment-form-email label,
.comment-form-comment label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 14px;
  color: #222;
}

.comment-form-author input,
.comment-form-email input,
.comment-form-comment textarea {
  width: 100%;
  border: 1px solid #d7dde6;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  font-size: 15px;
  box-sizing: border-box;
}

.comment-form-comment textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.8;
}

.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-comment textarea:focus {
  outline: none;
  border-color: #2f80ed;
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.12);
}

.form-submit .submit {
  appearance: none;
  border: none;
  border-radius: 999px;
  background: #2f80ed;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  cursor: pointer;
}

.form-submit .submit:hover {
  background: #1f69cf;
}

#cancel-comment-reply-link {
  display: inline-block;
  margin-left: 10px;
  font-size: 13px;
  color: #cc3d3d;
  text-decoration: none;
}

@media (max-width: 767px) {
  .ir-comments-title {
    font-size: 22px;
  }

  .ir-comment-card {
    padding: 14px;
  }

  .ir-comment-head {
    align-items: baseline;
  }

  .ir-comment-text {
    font-size: 15px;
  }

  .children {
    margin-left: 12px !important;
    padding-left: 10px !important;
  }

  .ir-comment-footer {
    align-items: flex-start;
  }
}
/* =========================
   返信ボタンと初期折りたたみの強制上書き
========================= */

/* 返信表示ボタンをリンク風に強制 */
.ir-comment-actions .ir-replies-toggle {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  color: #5c6f91 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  padding: 4px 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  border-radius: 0 !important;
  min-height: auto !important;
}

.ir-comment-actions .ir-replies-toggle:hover {
  color: #2f80ed !important;
  text-decoration: none !important;
  opacity: 1 !important;
}

.ir-comment-actions .ir-replies-toggle:focus,
.ir-comment-actions .ir-replies-toggle:active {
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* 初期状態では返信を必ず隠す */
ol.children,
ul.children,
.children {
  display: none !important;
  margin: 10px 0 0 20px !important;
  padding-left: 12px !important;
  border-left: 2px solid #e8eef7 !important;
}

/* JSで開いた時だけ表示 */
.children.is-open {
  display: block !important;
}
/* 番号を青丸からテキスト表示へ */
.ir-comment-number {
  background: transparent !important;
  border-radius: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  line-height: 1 !important;
  padding: 0 !important;
  color: #2f80ed !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  display: inline-block !important;
}
/* 返信を見るリンクを他と揃える */
.ir-replies-toggle {
  display: inline-block !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  color: #5c6f91 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  padding: 4px 0 !important;
  margin: 0 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

.ir-replies-toggle:hover {
  color: #2f80ed !important;
  text-decoration: none !important;
}
/* =========================
   通報モーダル
========================= */
.report-modal{
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.report-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.report-box{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 420px);
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  z-index: 2;
}

.report-box h3{
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.report-box select{
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d7dbe3;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  margin-bottom: 16px;
}

.report-actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.report-actions button{
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}

#report-submit{
  background: #2f80ed;
  color: #fff;
}

#report-cancel{
  background: #eef2f7;
  color: #333;
}
/* =========================
   通報ボタン調整
========================= */
.report-btn,
.report-comment-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 4px 0;
  margin: 0;
  color: #5c6f91;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
}

.report-btn:hover,
.report-comment-btn:hover {
  color: #2f80ed;
  text-decoration: none;
  opacity: 1;
}

.report-btn:focus,
.report-comment-btn:focus,
.report-btn:active,
.report-comment-btn:active {
  outline: none;
  box-shadow: none;
  background: transparent;
}

.ir-report-wrap {
  margin-top: 10px;
}