/* このファイルは参考実装(references/web-manual)由来のCSSとは別に、
   本マニュアル独自の追加UI（トップへ戻る・検索・アクセシビリティ）用として新設した。
   参考実装側の更新を再取り込みする際に normalize.css / style.css との差分を汚さないための分離。 */

/* ─── トップへ戻るボタン ─────────────────────────────── */
.pagetop-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background-color: #004A50;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
  z-index: 100;
}
.pagetop-button.is-visible {
  opacity: 0.85;
  visibility: visible;
}
.pagetop-button:hover {
  background-color: #008675;
  opacity: 1;
}
/* 上向きの矢印（シェブロン）をCSSで描く。
   旧実装は arrow_topback.png（赤い丸＋白矢印の画像）に filter で白化をかけていたため、
   丸ごと白い丸になり矢印が見えなかった。画像に依存せず、色もbackground/borderで制御する */
.pagetop-button::before {
  content: "";
  display: block;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  margin: 8px auto 0;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
  transform: rotate(45deg);
}
.pagetop-button .pagetop-button-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
@media screen and (max-width: 1023px) and (orientation: portrait) {
  .pagetop-button {
    right: 4vw;
    bottom: 4vw;
    width: 12vw;
    height: 12vw;
  }
  .pagetop-button::before {
    width: 3.5vw;
    height: 3.5vw;
    margin-top: 1.75vw;
    border-width: 0.75vw;
  }
}

/* ─── ページ内検索 ─────────────────────────────── */
/* .faq-anchor は border-bottom + padding-bottom:15px でセパレータ線を持つため、
   その直後に置く本要素は margin-top側で線からの間隔を確保する */
.faq-search {
  margin: 30px 0 20px;
  text-align: center;
}
.faq-search-inner {
  display: inline-flex;
  align-items: center;
  width: 100%;
  max-width: 480px;
  border: 2px solid #004A50;
  border-radius: 24px;
  padding: 6px 8px 6px 20px;
  background-color: #fff;
}
.faq-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-size: 1.5rem;
}
.faq-search-clear {
  border: none;
  background: none;
  color: #666;
  font-size: 13px;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 12px;
  visibility: hidden;
}
.faq-search-clear.is-visible {
  visibility: visible;
}
.faq-search-count {
  margin-top: 8px;
  font-size: 13px;
  font-size: 1.3rem;
  color: #666;
}
.faq-search-no-hit {
  display: none;
  margin: 20px 0;
  text-align: center;
  color: #666;
}
.faq-search-no-hit.is-visible {
  display: block;
}
/* 検索で非マッチと判定された要素を隠す（検索していない時は常に非表示クラスは付かない） */
.is-search-hidden {
  display: none !important;
}
@media screen and (max-width: 1023px) and (orientation: portrait) {
  .faq-search-input {
    font-size: 3.75vw;
  }
}

/* ─── アコーディオン開閉トリガーのキーボード操作対応 ─────────────────────────────── */
/* dt要素はネイティブbuttonではないため、キーボードフォーカス時の視認性をCSSで補う */
.accordionlist dt:focus-visible {
  outline: 3px solid #004A50;
  outline-offset: -3px;
}

/* ─── 手順画像の横並び（ステップ分け用） ─────────────────────────────── */
/* 1項目に複数画像を載せる場合に使う（style.css の vp_img_* は縦積み前提のため分離して追加）。
   構造: <div class="vp_img_row"><figure><img class="vp_img_row_item"><h4 class="vp_img_title"></h4></figure>...</div> */
.vp_img_row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
  margin: 20px 0;
}
.vp_img_row figure {
  flex: 1 1 280px;
  max-width: 48%;
  margin: 0;
  text-align: center;
}
.vp_img_row figure.vp_img_row_wide {
  max-width: 100%;
}
.vp_img_row img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
}
.vp_img_row .vp_img_title {
  margin-top: 6px;
}
@media screen and (max-width: 640px) {
  .vp_img_row figure {
    max-width: 100%;
  }
}
/* ─── ステップ項目末尾の「次へ」リンク ─────────────────────────────── */
/* チュートリアル各ステップの項目末尾に置き、次のステップ項目へジャンプする（common.js が展開する） */
.manual_next {
  margin: 16px 0 0;
  text-align: right;
}
.manual_next a::after {
  content: " ▶";
}

/* ─── 評価用の全展開モード（?expand=all。JSが html に .expand-all を付与） ─────────────────── */
/* dd の開閉は common.js が inline style で行うため !important で常時表示に固定する */
.expand-all .accordionlist dd {
  display: block !important;
  height: auto !important;
}
.expand-all .accordionlist dt {
  cursor: default;
}

/* ─── 手順の後ろに置く「症状ごとのタイトルとリンク」（本筋から外れる場合への導線） ─────────────── */
.manual_trouble {
  margin: 12px 0 4px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.7);
  border-left: 4px solid #999;
  font-size: 0.95em;
}
.manual_trouble p {
  margin: 0 0 4px;
}
.manual_trouble ul {
  margin: 0;
}

/* ─── 準正常系の項目末尾に置く、正規手順へ戻るリンク ─────────────────────────────── */
.manual_back {
  margin: 16px 0 0;
  text-align: left;
}
.manual_back a::before {
  content: "◀ ";
}

/* ─── 画像・キャプション・本文の余白調整 ─────────────────────────────────────── */
/* style.css の vp_img_M は画像下に20pxの余白があり、キャプションが画像から離れて直後の文に詰まって見えた。
   「画像〜キャプション」を近く、「キャプション〜次の文」を広くして、キャプションが画像に属すると分かるようにする。 */
.accordionlist dd .vp_div_center > img {
  margin-bottom: 0;
  vertical-align: top;
}
.accordionlist dd .vp_div_center + .vp_img_title {
  margin: 8px 0 24px;
}
.accordionlist dd .vp_img_row {
  margin-bottom: 24px;
}
.accordionlist dd .vp_img_row img {
  vertical-align: top;
}
.accordionlist dd .vp_img_row .vp_img_title {
  margin: 8px 0 0;
}
