/* =========================================================
   Affiliate Blocks - LP09 FAQ
   faq-block.css
========================================================= */

.ab-faq-box,
.ab-faq-box * {
  box-sizing: border-box;
}

.ab-faq-box {
  --ab-faq-main: #1e88e5;
  --ab-faq-main-dark: #0d47a1;
  --ab-faq-soft: rgba(30, 136, 229, 0.08);
  --ab-faq-border: rgba(30, 136, 229, 0.28);
  --ab-faq-text: #111827;
  --ab-faq-muted: #4b5563;
  --ab-faq-line: #e5e7eb;

  width: 100%;
  max-width: 860px;
  margin: 30px auto;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ab-faq-text);
}

/* =========================================================
   カラー
========================================================= */

.ab-faq-box.is-blue {
  --ab-faq-main: #1e88e5;
  --ab-faq-main-dark: #0d47a1;
  --ab-faq-soft: rgba(30, 136, 229, 0.08);
  --ab-faq-border: rgba(30, 136, 229, 0.28);
}

.ab-faq-box.is-green {
  --ab-faq-main: #16a34a;
  --ab-faq-main-dark: #166534;
  --ab-faq-soft: rgba(22, 163, 74, 0.08);
  --ab-faq-border: rgba(22, 163, 74, 0.28);
}

.ab-faq-box.is-orange {
  --ab-faq-main: #ff9800;
  --ab-faq-main-dark: #e65100;
  --ab-faq-soft: rgba(255, 152, 0, 0.1);
  --ab-faq-border: rgba(255, 152, 0, 0.32);
}

.ab-faq-box.is-red {
  --ab-faq-main: #e53935;
  --ab-faq-main-dark: #b71c1c;
  --ab-faq-soft: rgba(229, 57, 53, 0.08);
  --ab-faq-border: rgba(229, 57, 53, 0.3);
}

.ab-faq-box.is-gray {
  --ab-faq-main: #6b7280;
  --ab-faq-main-dark: #374151;
  --ab-faq-soft: #f3f4f6;
  --ab-faq-border: #d1d5db;
}

/* =========================================================
   タイトル
========================================================= */

.ab-faq-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 15px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--ab-faq-main) 0%, var(--ab-faq-main-dark) 100%);
  border-radius: 18px 18px 0 0;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
}

.ab-faq-title::before {
  content: "Q&A";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

/* =========================================================
   FAQリスト
========================================================= */

.ab-faq-list {
  background: #ffffff;
  border: 3px solid var(--ab-faq-main);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}


/* :has 非対応でも問題ないようにカード側で自然に見える設計 */

.ab-faq-item {
  margin: 0;
  border-bottom: 1px solid var(--ab-faq-border);
  background: #ffffff;
}

.ab-faq-item:last-child {
  border-bottom: none;
}

.ab-faq-item[open] {
  background: linear-gradient(180deg, var(--ab-faq-soft) 0%, #ffffff 72%);
}

/* =========================================================
   質問
========================================================= */

.ab-faq-question {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  padding: 17px 52px 17px 18px;
  color: #111827;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.75;
}

.ab-faq-question::-webkit-details-marker {
  display: none;
}

.ab-faq-question::after {
  content: "＋";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  background: var(--ab-faq-main);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.ab-faq-item[open] .ab-faq-question::after {
  content: "－";
  background: var(--ab-faq-main-dark);
}

.ab-faq-q-label {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-top: 1px;
  color: #ffffff;
  background: var(--ab-faq-main);
  border-radius: 50%;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
}

.ab-faq-question-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* =========================================================
   回答
========================================================= */

.ab-faq-answer {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 0 18px 18px;
}

.ab-faq-a-label {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-top: 3px;
  color: #ffffff;
  background: #ff9800;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(255, 152, 0, 0.2);
}

.ab-faq-answer-text {
  flex: 1 1 auto;
  min-width: 0;
  color: #374151;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.95;
}

.ab-faq-answer-text p {
  margin: 0 0 0.8em;
}

.ab-faq-answer-text p:last-child {
  margin-bottom: 0;
}

.ab-faq-answer-text a {
  color: var(--ab-faq-main-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ab-faq-answer-text strong {
  color: #111827;
  font-weight: 900;
}

/* =========================================================
   表示スタイル：カード型
========================================================= */

.ab-faq-layout--card .ab-faq-list {
  border-radius: 0 0 18px 18px;
}

.ab-faq-layout--card .ab-faq-item {
  transition: background 0.2s ease;
}

.ab-faq-layout--card .ab-faq-question:hover {
  background: var(--ab-faq-soft);
}

/* =========================================================
   表示スタイル：コンパクト型
========================================================= */

.ab-faq-layout--compact {
  max-width: 820px;
}

.ab-faq-layout--compact .ab-faq-title {
  padding: 12px 15px;
  border-radius: 14px 14px 0 0;
  font-size: 18px;
}

.ab-faq-layout--compact .ab-faq-list {
  border-width: 2px;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.ab-faq-layout--compact .ab-faq-question {
  padding: 13px 46px 13px 14px;
  gap: 9px;
  font-size: 14px;
  line-height: 1.65;
}

.ab-faq-layout--compact .ab-faq-question::after {
  right: 14px;
  width: 24px;
  height: 24px;
  font-size: 16px;
}

.ab-faq-layout--compact .ab-faq-q-label,
.ab-faq-layout--compact .ab-faq-a-label {
  width: 26px;
  height: 26px;
  font-size: 13px;
}

.ab-faq-layout--compact .ab-faq-answer {
  padding: 0 14px 14px;
  gap: 9px;
}

.ab-faq-layout--compact .ab-faq-answer-text {
  font-size: 14px;
  line-height: 1.85;
}

/* =========================================================
   表示スタイル：フラット型
========================================================= */

.ab-faq-layout--flat {
  max-width: 820px;
}

.ab-faq-layout--flat .ab-faq-title {
  justify-content: flex-start;
  padding: 0 0 12px;
  color: #111827;
  background: transparent;
  border-bottom: 3px solid var(--ab-faq-main);
  border-radius: 0;
  text-align: left;
}

.ab-faq-layout--flat .ab-faq-title::before {
  color: #ffffff;
  background: var(--ab-faq-main);
}

.ab-faq-layout--flat .ab-faq-list {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.ab-faq-layout--flat .ab-faq-item {
  border-bottom: 1px solid var(--ab-faq-line);
  background: transparent;
}

.ab-faq-layout--flat .ab-faq-item[open] {
  background: transparent;
}

.ab-faq-layout--flat .ab-faq-question {
  padding: 16px 42px 16px 0;
}

.ab-faq-layout--flat .ab-faq-question::after {
  right: 0;
}

.ab-faq-layout--flat .ab-faq-answer {
  padding: 0 0 18px;
}

.ab-faq-layout--flat .ab-faq-question:hover {
  background: transparent;
}

/* =========================================================
   エディター用
========================================================= */

.ab-faq-editor-list {
  padding: 18px;
}

.ab-faq-editor-item {
  margin: 0 0 16px;
  padding: 16px;
  background: #ffffff;
  border: 2px solid var(--ab-faq-border);
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.ab-faq-editor-item:last-child {
  margin-bottom: 0;
}

.ab-faq-editor-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ab-faq-editor-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #ffffff;
  background: var(--ab-faq-main);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.ab-faq-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ab-faq-editor-actions .components-button {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.ab-faq-editor-answer {
  min-height: 68px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  color: #374151;
  font-size: 14px;
  line-height: 1.8;
}

.ab-faq-editor-controls {
  display: flex;
  justify-content: center;
  padding: 0 18px 18px;
}

.ab-faq-editor-controls .components-button {
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 900;
}

/* Gutenberg内 */
.editor-styles-wrapper .ab-faq-box {
  margin-top: 24px;
  margin-bottom: 24px;
}

.editor-styles-wrapper .ab-faq-title {
  margin-top: 0;
}

.editor-styles-wrapper .ab-faq-box p {
  margin-top: 0;
}

/* =========================================================
   スマホ最適化
========================================================= */

@media screen and (max-width: 700px) {
  .ab-faq-box {
    margin: 24px auto;
  }

  .ab-faq-title {
    padding: 13px 14px;
    font-size: 18px;
    border-radius: 16px 16px 0 0;
  }

  .ab-faq-title::before {
    margin-right: 8px;
    padding: 3px 8px;
    font-size: 11px;
  }

  .ab-faq-list {
    border-width: 2px;
    border-radius: 0 0 16px 16px;
  }

  .ab-faq-question {
    padding: 14px 44px 14px 14px;
    gap: 9px;
    font-size: 14px;
    line-height: 1.65;
  }

  .ab-faq-question::after {
    right: 13px;
    width: 25px;
    height: 25px;
    font-size: 16px;
  }

  .ab-faq-q-label,
  .ab-faq-a-label {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .ab-faq-answer {
    gap: 9px;
    padding: 0 14px 14px;
  }

  .ab-faq-answer-text {
    font-size: 14px;
    line-height: 1.85;
  }

  .ab-faq-editor-list {
    padding: 14px;
  }

  .ab-faq-editor-item {
    padding: 14px;
    border-radius: 14px;
  }

  .ab-faq-editor-item-head {
    display: block;
  }

  .ab-faq-editor-actions {
    margin-top: 10px;
  }

  .ab-faq-layout--flat .ab-faq-title {
    padding-bottom: 10px;
  }

  .ab-faq-layout--flat .ab-faq-question {
    padding: 14px 38px 14px 0;
  }

  .ab-faq-layout--flat .ab-faq-answer {
    padding: 0 0 14px;
  }
}

@media screen and (max-width: 420px) {
  .ab-faq-title {
    font-size: 17px;
  }

  .ab-faq-question {
    font-size: 13px;
  }

  .ab-faq-answer-text {
    font-size: 13px;
  }

  .ab-faq-q-label,
  .ab-faq-a-label {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
}
/* =========================================
   LP09 FAQ：テーマ見出し装飾リセット
========================================= */

.ab-faq-box .ab-faq-title,
.ab-faq-box .ab-faq-question,
.ab-faq-box .ab-faq-answer-text {
  border: none !important;
  border-left: none !important;
  border-bottom: none !important;
  background-image: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.ab-faq-box .ab-faq-title::after,
.ab-faq-box .ab-faq-question::before,
.ab-faq-box .ab-faq-answer-text::before,
.ab-faq-box .ab-faq-answer-text::after {
  content: none !important;
  display: none !important;
}

/* FAQタイトルのQ&Aバッジだけは残す */
.ab-faq-box .ab-faq-title::before {
  content: "Q&A" !important;
  display: inline-flex !important;
}