/**
 * mania.romptn.com 用 目次上記事要約CTAブロック
 * ダーク×紫テーマに最適化
 */

/* =========================
   コンテナ本体
   ========================= */
body:not(.wp-admin) .romptn-toc-summary-cta-container {
  background:
    radial-gradient(circle at top left, rgba(155, 77, 255, 0.28), transparent 55%),
    radial-gradient(circle at bottom right, rgba(66, 133, 244, 0.15), transparent 55%),
    linear-gradient(135deg, #190030 0%, #0b0213 100%);
  border: 1px solid rgba(155, 77, 255, 0.6);
  border-radius: 18px;
  padding: 1.8rem 1.8rem 1.9rem;
  box-shadow:
    0 0 18px rgba(0, 0, 0, 0.6),
    0 0 22px rgba(155, 77, 255, 0.45);
  position: relative;
  margin: 2rem auto;
  max-width: 720px;
  color: #ffffff;
  box-sizing: border-box;
}

/* 背景グリッド（うっすら紫のサイバー感） */
body:not(.wp-admin) .romptn-toc-summary-cta-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(155, 77, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 77, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.35;
}

/* コンテンツは必ず前面に出す */
body:not(.wp-admin) .romptn-toc-summary-cta-container > * {
  position: relative;
  z-index: 1;
}

/* =========================
   タイトル
   ========================= */
body:not(.wp-admin) .romptn-toc-summary-title {
  color: #d2a3ff !important;       /* 明るめ紫 */
  font-size: 18px !important;
  font-weight: 700 !important;
  margin: 0 0 1.4rem 0 !important;
  line-height: 1.3 !important;
  text-align: center;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* =========================
   要点リスト
   ========================= */
body:not(.wp-admin) .romptn-toc-summary-list {
  list-style: none !important;
  padding-left: 0 !important;
  text-align: left;
  margin: 0 auto 1.4rem auto !important;
}

body:not(.wp-admin) .romptn-toc-summary-list li {
  position: relative;
  padding-left: 1.5rem !important;
  margin-bottom: 0.75rem !important;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.7;
}

/* 行頭のドット */
body:not(.wp-admin) .romptn-toc-summary-list li::before {
  content: "●";
  position: absolute;
  left: 0;
  top: 0.15em;
  color: #9b4dff;                 /* ネオン紫 */
  font-size: 11px;
}

/* 固定項目も通常行と同じ見た目に統一 */
body:not(.wp-admin) .romptn-toc-summary-list .romptn-fixed-item {
  background: none;
  border: none;
  border-radius: 0;
  padding-left: 1.5rem !important;
  margin-bottom: 0.75rem !important;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.7;
}

/* =========================
   ハイライトマーカー
   ========================= */
body:not(.wp-admin) .romptn-highlight-marker {
  background: linear-gradient(
    transparent 60%,
    rgba(155, 77, 255, 0.55) 60%
  );
  font-weight: 700;
  color: #ffffff;
  padding: 0 2px;
}

/* =========================
   補足テキスト & CTA
   ========================= */
body:not(.wp-admin) .romptn-toc-summary-promotion {
  color: #c2a6ff !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  text-align: center;
  margin: 1.3rem 0 0.5rem 0 !important;
}

body:not(.wp-admin) .romptn-toc-summary-cta-wrapper {
  text-align: center;
}

/* CTAボタン：紫〜マゼンタのグラデ */
body:not(.wp-admin) .romptn-toc-summary-cta-button {
  display: inline-block !important;
  background: linear-gradient(45deg, #6f1aff, #d500f9, #6f1aff);
  background-size: 260% 260%;
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 0.95rem 3rem !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 14px;
  box-shadow:
    0 4px 15px rgba(155, 77, 255, 0.6),
    0 0 18px rgba(111, 26, 255, 0.75);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-position 0.4s ease;
  animation: romptn-gradient-shift 3s ease infinite;
}

@keyframes romptn-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

body:not(.wp-admin) .romptn-toc-summary-cta-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 22px rgba(155, 77, 255, 0.9),
    0 0 24px rgba(210, 163, 255, 0.9);
  animation-duration: 1.2s;
}

/* =========================
   レスポンシブ
   ========================= */
@media (max-width: 768px) {
  body:not(.wp-admin) .romptn-toc-summary-cta-container {
    margin: 1.2rem 0.6rem;
    padding: 1.3rem 1.1rem 1.4rem;
    max-width: none;
  }

  body:not(.wp-admin) .romptn-toc-summary-title {
    font-size: 16px !important;
  }

  body:not(.wp-admin) .romptn-toc-summary-cta-button {
    padding: 0.8rem 2.4rem !important;
    font-size: 13px;
  }
}

/* テーマ側マージンとの競合回避（念のため） */
body:not(.wp-admin) .entry-content .romptn-toc-summary-cta-container,
body:not(.wp-admin) .post-content .romptn-toc-summary-cta-container,
body:not(.wp-admin) .page-content .romptn-toc-summary-cta-container {
  margin: 2rem auto;
}

/* ブロックエディター内プレビュー用 */
.wp-block-promptn-toc-summary .romptn-toc-summary-cta-container {
  margin: 0;
}
