/* ===============================================
  本件に関するQ&A（専用ページ）
  ヘッダー・文字・問い合わせ先などの基本は migration_guide.css を使う
=============================================== */

/* -----------------------------------------------
  ヘッダー：左に「トップページへ戻る」、中央にロゴ
----------------------------------------------- */
.qa-page .guide-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem;
}

.guide-header__back {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.4rem;
  min-height: 4rem;
  padding: 0;
  color: var(--guide-navy);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.guide-header__back:hover {
  text-decoration: underline;
}

.guide-header__back-icon {
  width: 1.4rem;
  height: 1.4rem;
}

@media (max-width: 479px) {
  .guide-header__back {
    font-size: 1.3rem;
  }

  .qa-page .guide-header__logo {
    width: 10rem;
  }

  .guide-header__back-long {
    display: none;
  }
}

/* 冒頭の案内文 */
.qa-lead p:last-child {
  margin-bottom: 0;
}

/* -----------------------------------------------
  目次（カテゴリへのリンク）
----------------------------------------------- */
.qa-toc {
  margin-top: 2.4rem;
}

.guide .qa-toc__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qa-toc__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  box-sizing: border-box;
  height: 100%;
  min-height: 4.8rem;
  padding: 0.8rem 1.2rem;
  border: 1px solid #c9d1dd;
  border-radius: 0.6rem;
  color: var(--guide-navy);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

.qa-toc__list a:hover {
  background: var(--guide-fill);
}

.qa-toc__arrow {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
}

@media (max-width: 479px) {
  .guide .qa-toc__list {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------------
  カテゴリと質問
----------------------------------------------- */
.qa-category {
  margin-top: 4rem;
  scroll-margin-top: 7.2rem; /* 固定ヘッダーに見出しが隠れないようにする */
}

.qa-category h2 {
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--guide-navy);
}

.qa-item {
  border-bottom: 1px solid var(--guide-line);
}

.qa-item summary {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.4rem 0.4rem;
  color: var(--guide-navy);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.qa-item summary::-webkit-details-marker {
  display: none;
}

.qa-item summary:focus-visible {
  outline: 0.2rem solid var(--guide-navy);
  outline-offset: 0.2rem;
}

.qa-item__q,
.qa-item__a-label {
  flex: none;
  font-weight: 700;
}

.qa-item__text {
  flex: 1 1 auto;
}

/* 開閉の目印（＋／−） */
.qa-item__toggle {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  margin-top: 0.4rem;
  transition: transform 0.2s;
}

.qa-item[open] .qa-item__toggle {
  transform: rotate(45deg);
}

.qa-item__answer {
  display: flex;
  gap: 1rem;
  padding: 0 0.4rem 1.6rem;
}

.qa-item__a-label {
  color: var(--guide-sub);
}

.qa-item__answer-body > :last-child {
  margin-bottom: 0;
}

/* 回答内の補足（件名・注意など） */
.qa-box {
  margin: 0.8rem 0 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: 0.4rem;
  background: var(--guide-fill);
  font-size: 1.4rem;
}

.qa-box p:last-child,
.qa-box ul:last-child {
  margin-bottom: 0;
}

.qa-box__title {
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .qa-item__toggle {
    transition: none;
  }
}

/* 通常のよくある質問への導線 */
.qa-normal {
  margin-top: 3.2rem;
  font-size: 1.4rem;
}

/* -----------------------------------------------
  本件の詳細（当社コーポレートサイトのお知らせ）：incident_faq_4.html で使用
----------------------------------------------- */
.qa-release {
  margin-top: 2.4rem;
}

.qa-release h2 {
  margin-bottom: 0.8rem;
}

.qa-release p {
  margin-bottom: 0.4rem;
}

.qa-release ul {
  margin-bottom: 0;
}

.qa-release__icon {
  width: 1em;
  height: 1em;
  margin-left: 0.2em;
  vertical-align: -0.1em;
}

/* -----------------------------------------------
  PCでの本文幅を広げる（incident_faq_4.html）
  ※migration_guide.css の 64rem は幅480pxの別ウィンドウ向け。Q&Aページはブラウザで広く見るため 80rem にする
----------------------------------------------- */
.qa-page--wide .guide-header__inner,
.qa-page--wide .guide {
  max-width: 80rem;
}

/* 付箋は本文の右外側に置くため、余白が足りない幅（本文が広い分、1360px未満）では本文の上に置く */
@media (min-width: 1200px) and (max-width: 1359px) {
  .qa-page--wide .review-note--side {
    position: static;
    width: auto;
    max-width: 24rem;
    margin: 0 0 1.2rem;
  }
}

/* 「カテゴリから探す」の上の余白を倍にする（incident_faq_4.html） */
.qa-page--wide .qa-toc {
  margin-top: 4.8rem;
}

/* 見出し（h1）の下の余白を倍にする（incident_faq_4.html） */
.qa-page--wide .guide h1 {
  margin-bottom: 2.4rem;
}

/* -----------------------------------------------
  余白をゆったりさせる（incident_faq_4.html）
----------------------------------------------- */
.qa-page--wide .guide {
  padding-top: 4.8rem; /* タイトルの上 */
  padding-bottom: 6.4rem;
}

.qa-page--wide .qa-lead p {
  margin-bottom: 1.6rem;
}

.qa-page--wide .qa-lead p:last-child {
  margin-bottom: 0;
}

.qa-page--wide .qa-release {
  margin-top: 3.2rem;
}

.qa-page--wide .qa-toc__list {
  margin-top: 1.6rem;
}

.qa-page--wide .qa-category {
  margin-top: 5.6rem;
}

.qa-page--wide .qa-category h2 {
  margin-bottom: 1.6rem;
}

.qa-page--wide .qa-item summary {
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
}

.qa-page--wide .guide-contact {
  margin-top: 5.6rem;
  padding-top: 2.8rem;
}

.qa-page--wide .guide-contact p {
  margin-bottom: 1.2rem;
}
