/* =========================================================
   FAQ・よくある質問管理システム Public CSS
========================================================= */

/* =========================================================
   テーマ干渉対策・共通土台
========================================================= */

.fms-system {
  width: min(1100px, calc(100% - 32px));
  margin: 56px auto;
  color: #172033;
  font-size: 16px;
  line-height: 1.8;
  box-sizing: border-box;
}

.fms-system *,
.fms-system *::before,
.fms-system *::after {
  box-sizing: border-box;
}

.fms-system p {
  margin: 0;
}

.fms-system img {
  max-width: 100%;
  display: block;
}

.fms-system button,
.fms-system input,
.fms-system select,
.fms-system textarea {
  font: inherit;
}



/* =========================
   基本レイアウト
========================= */

.fms-faq-section {
  padding: 56px clamp(20px, 4vw, 56px);
  background: linear-gradient(
    180deg,
    var(--fms-bg-from, #f4f9ff) 0%,
    var(--fms-bg-to, #ffffff) 100%
  );
  box-sizing: border-box;
}

.fms-faq-section.fms-system {
  width: min(1100px, calc(100% - 32px));
  margin: 56px auto;
}

.fms-faq-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

/* =========================
   見出しエリア
========================= */

.fms-faq-head-wrap {
  text-align: center;
  margin-bottom: 30px;
}

.fms-faq-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 14px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--fms-accent-soft, #eaf4ff);
  color: var(--fms-accent, #1e7be8);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.fms-faq-head {
  text-align: center;
  margin-bottom: 0;
}

.fms-faq-head h2 {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--fms-title-color, #0f2f5f);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.35;
}

.fms-faq-head h2::before,
.fms-faq-head h2::after {
  content: none !important;
  display: none !important;
}

.fms-faq-lead {
  margin: 16px auto 0;
  max-width: 720px;
  color: #52657a;
  font-size: 16px;
  line-height: 1.9;
}

/* =========================
   タイトルデザイン
========================= */

/* シンプル */
.fms-faq-title-style-simple .fms-faq-head {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* 上ライン */
.fms-faq-title-style-topline .fms-faq-head {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 24px 0 22px;
  border-top: 2px solid var(--fms-title-line-top, var(--fms-title-line, #1e7be8));
  border-bottom: 0;
}

/* 上下ライン */
.fms-faq-title-style-line .fms-faq-head {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 24px 0 22px;
  border-top: 2px solid var(--fms-title-line-top, var(--fms-title-line, #1e7be8));
  border-bottom: 2px solid var(--fms-title-line-bottom, var(--fms-title-line, #1e7be8));
}

/* 薄い背景 */
.fms-faq-title-style-soft .fms-faq-head {
  padding: 28px 24px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--fms-accent-soft, #eaf4ff) 65%, #ffffff 35%);
}

/* カード */
.fms-faq-title-style-card .fms-faq-head {
  padding: 30px 24px;
  border: 1px solid color-mix(in srgb, var(--fms-accent, #1e7be8) 22%, #ffffff 78%);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(30, 123, 232, 0.08);
}

/* =========================
   カテゴリタブ
========================= */

.fms-faq-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 26px;
}

.fms-faq-tab {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--fms-accent, #1e7be8) 35%, #ffffff 65%);
  border-radius: 999px;
  background: var(--fms-tab-bg, #ffffff);
  color: color-mix(in srgb, var(--fms-accent, #1e7be8) 72%, #4a2a08 28%);
  padding: 9px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.fms-faq-tab:hover {
  border-color: var(--fms-accent, #1e7be8);
  background: color-mix(in srgb, var(--fms-tab-bg, #ffffff) 75%, var(--fms-accent-soft, #eaf4ff) 25%);
  color: color-mix(in srgb, var(--fms-accent, #1e7be8) 78%, #4a2a08 22%);
}

.fms-faq-tab.is-active {
  border-color: var(--fms-tab-active-bg, #1e7be8);
  background: var(--fms-tab-active-bg, #1e7be8);
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--fms-tab-active-bg, #1e7be8) 28%, transparent 72%);
}

/* =========================
   FAQ一覧
========================= */

.fms-faq-list {
  display: grid;
  gap: 14px;
}

.fms-faq-item {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--fms-accent, #1e7be8) 24%, #ffffff 76%);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(30, 123, 232, 0.08);
}

/* =========================
   質問
========================= */

.fms-faq-question {
  width: 100%;
  border: 0;
  background: #fff;
  color: #0f2f5f;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.fms-faq-question:hover {
  background: color-mix(in srgb, var(--fms-accent-soft, #eaf4ff) 58%, #ffffff 42%);
}

.fms-faq-q,
.fms-faq-a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  line-height: 1;
}

.fms-faq-q {
  background: var(--fms-q-bg, #1e7be8);
}

.fms-faq-question-text {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.6;
}

.fms-faq-icon {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
}

.fms-faq-icon::before,
.fms-faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fms-accent, #1e7be8) 78%, #6b3908 22%);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.fms-faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.fms-faq-item.is-open .fms-faq-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

/* =========================
   回答
========================= */

.fms-faq-answer {
  border-top: 1px solid #dbeafe;
  background: #f8fbff;
}

.fms-faq-answer-inner {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 20px 22px 24px;
}

.fms-faq-a {
  background: var(--fms-a-bg, #2f80ed);
  margin-top: -2px;
}

.fms-faq-answer-content {
  color: #334155;
  font-size: 16px;
  line-height: 1.8;
  padding-top: 1px;
}

.fms-faq-answer-content p {
  margin: 0;
  line-height: 1.8;
}

.fms-faq-answer-content > *:first-child {
  margin-top: 0;
}

.fms-faq-answer-content > *:last-child {
  margin-bottom: 0;
}

/* =========================
   空表示
========================= */

.fms-faq-empty,
.fms-faq-no-result {
  margin: 20px 0 0;
  padding: 20px 24px;
  border-radius: 16px;
  background: #fff;
  color: #52657a;
  text-align: center;
  box-shadow: 0 10px 24px rgba(30, 123, 232, 0.06);
}

/* =========================
   スマホ対応
========================= */

@media (max-width: 640px) {
  .fms-faq-section {
    padding: 40px 14px;
  }

  .fms-faq-section.fms-system {
    width: min(100% - 24px, 1100px);
    margin: 40px auto;
  }

  .fms-faq-container {
    width: 100%;
  }

  .fms-faq-head-wrap {
    margin-bottom: 22px;
  }

  .fms-faq-title-style-topline .fms-faq-head,
  .fms-faq-title-style-line .fms-faq-head {
    padding: 20px 0 18px;
  }

  .fms-faq-title-style-soft .fms-faq-head,
  .fms-faq-title-style-card .fms-faq-head {
    padding: 22px 16px;
    border-radius: 18px;
  }

  .fms-faq-lead {
    font-size: 15px;
    text-align: left;
  }

  .fms-faq-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 0 0 8px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
  }

  .fms-faq-tab {
    flex: 0 0 auto;
    padding: 8px 13px;
    font-size: 13px;
    white-space: nowrap;
  }

  .fms-faq-question {
    gap: 10px;
    padding: 16px 14px;
  }

  .fms-faq-question-text {
    font-size: 15px;
  }

  .fms-faq-q,
  .fms-faq-a {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 14px;
  }

  .fms-faq-answer-inner {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 16px 14px 18px;
  }

  .fms-faq-answer-content {
    font-size: 15px;
  }
}