/* ギャラリー記事のスライドショー操作部（gallery-nav.js が作る）。
   マウスのある PC は旧テーマのまま（カーソルが矢印になる＋サムネイル列）なので、タッチ端末と狭い画面だけに出す */
.gnav__btn, .gnav__count, .gnav__bar, .gnav__hint { display: none; }

@media (hover: none), (max-width: 800px) {
  .gallery-single-fv .gallery-single-fv__image-container.gnav { cursor: pointer; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }

  /* 旧テーマの「カーソルに付いてくる矢印」はタップ位置に残ってしまうので出さない */
  .gallery-single-fv .gnav .gallery-single-fv__arrow-wrap { display: none !important; }

  .gnav__btn {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 50%; z-index: 30; translate: 0 -50%;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .8); color: #333; cursor: pointer;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .14);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    -webkit-tap-highlight-color: transparent;
  }
  .gnav__btn[hidden] { display: none; }
  .gnav__btn--prev { left: 10px; }
  .gnav__btn--next { right: 10px; }
  .gnav__btn:active { background: #fff; }
  .gnav__btn:focus-visible { outline: 2px solid #333; outline-offset: 2px; }

  .gnav__count {
    display: block; position: absolute; left: 50%; bottom: 14px; z-index: 30; translate: -50% 0;
    margin: 0; padding: 3px 12px; border-radius: 99px;
    background: rgba(0, 0, 0, .42); color: #fff;
    font-size: 12px; line-height: 18px; letter-spacing: .1em; white-space: nowrap;
    font-variant-numeric: tabular-nums; pointer-events: none;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
  .gnav__count b { font-size: 1em; font-weight: 400; }

  .gnav__bar { display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; height: 2px; background: rgba(0, 0, 0, .1); pointer-events: none; }
  .gnav__bar i { display: block; height: 100%; background: #333; transition: width .4s ease-out; }

  .gnav__hint {
    display: block; position: absolute; left: 50%; bottom: 50px; z-index: 30; translate: -50% 0;
    margin: 0; padding: 7px 16px; border-radius: 99px;
    background: rgba(0, 0, 0, .62); color: #fff;
    font-size: 12px; line-height: 18px; letter-spacing: .06em; white-space: nowrap;
    opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; pointer-events: none;
  }
  .gnav--hint:not(.gnav--used) .gnav__hint { opacity: 1; visibility: visible; }
  .gnav--hint:not(.gnav--used) .gnav__btn--next { animation: gnav-nudge 1.2s ease-in-out 3; }
}

@keyframes gnav-nudge {
  0%, 100% { translate: 0 -50%; }
  50% { translate: -7px -50%; }
}
@media (prefers-reduced-motion: reduce) {
  .gnav--hint:not(.gnav--used) .gnav__btn--next { animation: none; }
  .gnav__bar i { transition: none; }
}
