/* ==========================================================================
   追従ナビ専用 CSS（common/fixed-nav.php）… サブスク zeus-web fixed-nav.css / CHARGE fixed-nav.scss と同じ見た目
   - 読み込み: wimax_faq/index.php（使うページを増やすときはそのページの <head> に追加）
   - PC/タブレット: 右下の TOPへ戻る ＋ その左隣にチャットボットの吹き出し
   - SP（767px以下）: 画面下部のバー（よくあるご質問 / TOPへ戻る を右寄せ）
   - 表示/非表示は js/fixed-nav.js が .fixed-nav に is-show を付け外しする
   - 旧 #page_top のスタイル（wimax.css）とは別物で、このパーツには当たらない
   - ページ別の差分はページ側で上書きしない（全ページ同じ見た目にするため）
   ========================================================================== */

/* --------------------------------------------------------------------------
   ラッパー（中身はすべて position: fixed。ラッパー自体は高さ 0）
   -------------------------------------------------------------------------- */
.fixed-nav {
  position: relative;
  z-index: 10000000;
  visibility: hidden;
  opacity: 0;
  transition: .3s all;
}
.fixed-nav.is-show {
  visibility: visible;
  opacity: 1;
}
/* リンク内の画像・文字を押してもクリック先がリンク本体になるようにする */
.fixed-nav a * {
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   PC/タブレット: 右下の TOPへ戻る
   -------------------------------------------------------------------------- */
.fixed-nav__top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: block;
}
.fixed-nav__top img {
  display: block;
  width: 60px;
  height: auto;
  filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, .2));
}

/* SP: 画面下部のバー（PC/タブレットでは非表示） */
.fixed-nav__bar {
  display: none;
}

/* --------------------------------------------------------------------------
   チャットボット（common/chatbot-loader.php が読み込む popup iframe）
   - PC/タブレット: 吹き出し（.zwcsc-launcher-bubble）を TOPへ戻る の左隣に置く。
     吹き出しは iframe 内で右・下とも 12px 内側に描画される（widget の root offset）ため、その分を差し引く。
     ✕ ボタンが右上へはみ出すので TOP ボタンとの間は 20px 空ける。
     吹き出し右端 = 20 + 60 + 20 = 100px → iframe right 88px / 吹き出し下端 = TOP ボタン下端 20px → iframe bottom 8px
   - loader がインライン style で right/bottom: 0 を入れるため !important で上書きする
   - 既定は非表示。js/fixed-nav.js が追従ナビと同じタイミングで表示する
   - SP は吹き出しを出さず（data-launcher="none"）、よくあるご質問ボタンで開く。
     展開パネルは画面幅いっぱいになるので loader 既定位置（right/bottom 0）のまま。
     開いている間に消えないよう常に表示するルール（.is-host-launcher）は chatbot-loader.php 側
   -------------------------------------------------------------------------- */
body > iframe[data-zwcsc-popup] {
  display: none;
  right: 88px !important;
  bottom: 8px !important;
}

/* --------------------------------------------------------------------------
   SP（767px以下）
   -------------------------------------------------------------------------- */
@media screen and (max-width: 767px) {
  .fixed-nav__top {
    display: none;
  }

  body > iframe[data-zwcsc-popup] {
    right: 0 !important;
    bottom: 0 !important;
  }

  /* よくあるご質問 … TOP を右寄せ */
  .fixed-nav__bar {
    position: fixed;
    right: 0;
    bottom: 1%;
    left: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    width: 90%;
    margin: 0 auto;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2));
    transform: translateZ(0);
  }

  /* よくあるご質問（アイコン＋テキスト） */
  .fixed-nav__bar-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    width: 55vw;
    max-width: 214px;
    height: 55px;
    padding: 8px 8px 9px 13px;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 100vh;
    color: #000;
    font-weight: bold;
    text-decoration: none;
  }

  /* アイコン幅はボタン内側の幅に対する割合 */
  .fixed-nav__bar-icon {
    flex-shrink: 0;
    width: 13%;
    height: auto;
  }

  .fixed-nav__bar-label {
    flex: 1;
    margin-right: 4px;
    font-size: 20px;
    line-height: 20px;
    text-align: center;
  }

  /* TOPへ戻る */
  .fixed-nav__bar-top {
    display: block;
    flex-shrink: 0;
  }
  .fixed-nav__bar-top img {
    display: block;
    width: 42px;
    height: auto;
    filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, .2));
  }
}

/* --------------------------------------------------------------------------
   SP 小さめ（415px以下）
   -------------------------------------------------------------------------- */
@media screen and (max-width: 415px) {
  .fixed-nav__bar {
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2));
  }
  .fixed-nav__bar-btn {
    width: 50vw;
    height: 45px;
  }
  .fixed-nav__bar-label {
    font-size: 16px;
  }
}
