@import "https://use.fontawesome.com/releases/v5.13.0/css/all.css";

/* リセット */

img {
    vertical-align: bottom;
}

li {
    list-style-type: none;
}

button,
iframe {
    background-color: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    padding: 0;
    appearance: none;
}

* {
    font-size: 16px;
}

html,
body {
    overflow: hidden;
    inset: 0;
    width: 100%;
    height: 100%;
}

a {
    text-decoration: none;
}

body {
    width: 100%;
    max-width: 100%;
    background-color: white;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
}

/* タブレット・PCでは#pc-wrapperの外側がビューポート全体になる。
   #pc-wrapper自身にtransformを与えてposition:fixedの子要素の基準をビューポートから
   #pc-wrapperへ切り替え、幅を絞った時にもfixed要素(#switchWrap等)が枠内に収まるようにする。
   モバイル幅では#pc-wrapperがビューポートと同じ大きさになるため見た目上の変化はない。

   ここは translateZ(0) にしないこと。translateZ()は3D変換のためChromeが
   #pc-wrapper を専用のGPU合成レイヤーへ強制的に昇格させる(いわゆるnull transform hack)。
   すると overflow:hidden と組み合わさって「合成レイヤー越しにWebGLのiframe(#mapiframe)を
   クリップする」構造になり、GPUの余力が少ない端末でコンポジタが子レイヤーを描き落とし、
   地図だけが消える(4台中、低性能な2台で発生。同じUIでもこの指定が無いtemplateでは出ない)。
   translate(0)は2D変換なので、包含ブロック・スタッキングコンテキスト・クリップの扱いは
   translateZ(0)と全く同じまま、レイヤー強制だけが起きない。 */
#pc-wrapper {
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    position: relative;
    transform: translate(0);
    overflow: hidden;
}

/* アプリダウンロード誘導バナー(PCのみ表示) */
.jrdapllink {
    display: none;
}

/* ロゴイメージ */
#bgopt {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 50%;
}

/* 上部メニュー */
.keiro {
    box-shadow: none;
}

#keiroWrap .keiro {
    background-color: #FFFFFF;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    padding: 10px 10px 2px 10px;
    position: relative;
    z-index: 10;
}

#keiroWrap input {
    padding-left: 26px;
    height: 40px;
    border: 2px solid rgba(0, 0, 0, .5);
    border-radius: 50px;
}

#langwrap {
    background-color: #FFFFFF;
    border-radius: 4px;
    align-items: center;
    border: 2px #9D9D9D solid;
    height: 33px;
    margin: 0 auto;
    width: 95%;
    text-align: center;
    position: relative;
}

#langwrap select {
    font-size: 12px;
    outline: none;
    border: none;
    background-color: transparent;
    text-align: center;
    width: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    margin: auto;
}

#langicon {
    position: absolute;
    bottom: 0;
    top: 0;
    left: 10px;
    margin: auto;
    width: 14px;
    vertical-align: middle;
}

#arrow {
    height: 8px;
    transform: rotate(0deg);
    margin: auto auto auto 5px;
}

#arrow.active {
    transform: rotate(180deg);
}

.fa-position-right {
    position: absolute;
    top: calc(50% - 0.5em);
    right: 1rem;
}

#keiroWrap {
    position: relative;
    bottom: 110px;
    z-index: 8;
}

#keiro_bg {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgb(0, 0, 0, 0.6);
    opacity: 0;
    z-index: 0;
    display: none;
}

#keiro_bg.active {
    opacity: 1;
    z-index: 7;
    display: block;
}

#keirowrapdeco {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    z-index: 10;
    /* translate3d(3D記法)はChromeにこの要素専用のGPU合成レイヤーを強制生成させる。
       地図(WebGLのiframe)と同じ画面で合成レイヤーを増やすほどGPUメモリを圧迫し、
       余力の少ない端末でWebGLコンテキストが失われる一因になる。
       ここは奥行き(Z)を使っていないので2D記法で十分。移動量は従来と同じ。
       (templateはこの要素自体に display:none が付いており描画されない) */
    -webkit-transform: translate(0, 0.75rem);
    transform: translate(0, 0.2rem);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

#jj_dateSlider:before {
    display: none;
}

/* WebKit(Safari)には、負のz-indexを持つ合成レイヤー(#mapiframe、内部でWebGLを使うiframe)と、
   それより手前にあるべき非負z-index/z-index:auto側兄弟(このjj_dateSlider)との重なりを、
   コンポジタが正しく解決できない既知の不具合がある(bugs.webkit.org #217154/#238589/#272318、
   #272318は2026年時点でも未修正)。#mapiframe側のz-indexを非負に変更する対策と対で、
   jj_dateSliderにも明示的な正のz-indexを与える(position: relativeは.splideクラスで
   既に付与されるが、明示しておく)。 */
#jj_dateSlider {
    position: relative;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.15);
}


.splide__slide.is-active>.jj_dateBox {
    background-color: #215D8B;
    color: #FFFFFF;
}

/* アイフレーム */
#calendarWrap {
    position: absolute;
    z-index: 5;
    border-radius: 10px;
}

#calendarWrap #calendariframe {
    width: 100%;
    height: calc(100% - 61px);
    border: none;
    background-color: transparent;
    position: absolute;
    z-index: 65535;
}

#mapiframe {
    width: 100%;
    height: calc(100% - 61px);
    border: none;
    background-color: transparent;
    position: absolute;
    /* 負のz-indexはWebKitの既知バグ(#jj_dateSliderのコメント参照)の発火条件のため使わない。
       ただしページ読み込み完了時にjs/index.jsのiframeChange()がonIframe/offIframeへ
       インラインでz-index(65536または0)を再設定するため、この値が実際に効くのは
       load イベント発火前の一瞬だけで、それ以降はiframeChange()側の値が優先される
       (インラインstyleは常に外部CSSより優先されるため)。 */
    z-index: 0;
    border-radius: 0 0 10px 10px;
    background-color: rgba(0, 0, 0, 0.5);
    background-image: url(../../common/img/SVG-Loaders-master/svg-loaders/oval.svg);
    background-position: center;
    background-repeat: no-repeat;
}

#calendarCover {
    position: absolute;
    z-index: 5;
}

#iframe_bg {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgb(0, 0, 0, 0.6);
    opacity: 0;
    z-index: 0;
    display: none;
}

#iframe_bg.active {
    opacity: 1;
    z-index: 15;
    display: block;
}

#spot_iframe {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 0;
    width: 96%;
    height: 85%;
    margin: auto;
    border: none;
    background-color: #FFFFFF;
    border-radius: 8px;
    vertical-align: bottom;
    display: none;
}

#spot_iframe.active {
    display: block;
    z-index: 65536;
    vertical-align: bottom;
}

/* カルーセル */
#carouselWrap {
    position: absolute;
    width: 100%;
    height: 100px;
    overflow: hidden;
    padding: 10px 0;
    z-index: 1;

}

#carouselWrap a img {
    height: 96px;
    width: 84px;
}

#carouselWrap a .carousel_badge {
    position: absolute;
    left: -12px;
    width: 32px;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
    top: -32px;
}

.swiper-container {
    width: 100%;
    max-width: 940px !important;
    overflow: visible !important;
    right: -14%;
}

.swiper-wrapper,
.swiper-slide,
.swiper-container {
    margin: 0 auto;
}

/* マップ、リスト切り替えボタン */
#switchWrap {
    position: fixed;
    bottom: 11px;
    width: 100%;
    text-align: center;
}

#switchInner {
    border: 1px #FFFFFF solid;
    border-radius: 24px;
    width: 65%;
    margin: 0 auto;
    padding: 6px 0;
    box-shadow: inset 0 10px 25px 0 rgba(0, 0, 0, 0.9);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
}

.switchicon {
    height: 16px;
    vertical-align: sub;
}

.switchText {
    color: #FFFFFF;
}

.ui-switcher {
    background-color: var(--swich_off_color);
    display: inline-block;
    height: 12px;
    width: 32px;
    border-radius: 10px;
    box-sizing: border-box;
    vertical-align: middle;
    position: relative;
    cursor: pointer;
    transition: border-color 0.25s;
    margin: -2px 4px 0 0;
    box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.15);
}

.ui-switcher:before {
    font-family: sans-serif;
    font-size: 10px;
    font-weight: 400;
    color: var(--swich_off_color);
    line-height: 1;
    display: inline-block;
    position: absolute;
    top: 6px;
    height: 12px;
    width: 20px;
    text-align: center;
}

.ui-switcher[aria-checked=false]:before {
    content: '';
    right: 7px;
}

.ui-switcher[aria-checked=true]:before {
    content: '';
    left: 7px;
}

.ui-switcher[aria-checked=true] {
    background-color: var(--swich_off_color);
}

.ui-switcher:after {
    background-color: var(--swich_on_color);
    content: '\0020';
    display: inline-block;
    position: absolute;
    top: -3px;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    transition: left 0.25s;
}

.ui-switcher[aria-checked=false]:after {
    left: 0px;
}

.ui-switcher[aria-checked=true]:after {
    left: 18px;
}

.form-check-input {
    display: none;
}

.search_box {
    width: 100%;
    margin: 2px auto 10px;
    display: block;
    -webkit-appearance: none;
}

#box {
    display: flex;
}

.settei {
    font-size: 12px;
    padding-left: 10px;
    color: #a9a9a9;
    margin-top: 10px;
}

#box_text {
    margin: auto 0;
    display: inline;
    vertical-align: baseline;
}

#magnifier {
    height: 20px;
    display: inline;
    vertical-align: baseline;
    margin: auto 5px auto auto;
}

#magnifier.active {
    display: none;
}

.container {
    position: relative;
    width: 96%;
    margin: 0 auto;
}

#input_magnifier {
    position: absolute;
    top: 10px;
    width: 19px;
    left: 8px;
}

/* ------- スマホ表示専用: 検索欄・カテゴリータブ・カルーセルをまとめたボトムシート -------
   地図は画面全体(#calendarWrapがposition:fixedで全面)に表示し、このシートを下から重ねる。
   ハンドルをドラッグして peek(検索欄のみ)/middle(89px、初期表示と同じ)/full(max-height)の
   3段階に高さを変えられる(スナップ位置の実値はjs/index.jsのgetMobileSheetSnapHeights参照)。
   PC/タブレット(768px以上)では#mobileBottomSheetごと非表示にし、上のkeiroWrapの
   開閉メニューと、carouselWrapの従来通りの配置(js/index.jsが表示モードに応じて戻す)を使う。 */
#mobileBottomSheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 45px;
    height: 89px;
    max-height: 200px;
    background-color: #ffffffd3;
    border-radius: 16px 16px 16px 16px;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.40);
    z-index: 15;
    overflow: hidden;
    transition: height 0.25s ease;
    touch-action: none;
    margin: 0 10px;
}

/* 検索欄表示中(js/index.jsのopenMobileSearch/closeMobileSearchでmm-search-activeを付け外し)は
   通常のfull(max-height:200px)より高さが必要なため、その間だけ上限を240pxに引き上げる */
#mobileBottomSheet.mm-search-active {
    max-height: 240px;
}

/* Android版乗換案内アプリ内で、キーボードの高さが分からず検索シートがキーボードに隠れてしまう場合
   (js/index.jsのapplyKeyboardAvoidで判定)だけ、入力中は画面上部の全幅の入力バーに切り替える。
   ハンドル・カテゴリータブ・カルーセルは隠して検索欄だけにし、周囲の地図を暗くして入力中であることを示す
   (暗い部分は影なのでタップは地図側に届き、入力欄のフォーカスが外れて検索欄が閉じる) */
#mobileBottomSheet.mm-search-top {
    top: 0;
    bottom: auto;
    height: auto !important;
    max-height: none;
    margin: 0;
    padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
    background-color: #ffffff;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.35);
    transition: none;
}

#mobileBottomSheet.mm-search-top #mobileSheetHandle,
#mobileBottomSheet.mm-search-top #mobileVisibilityBtn,
#mobileBottomSheet.mm-search-top #mobileSheetScroll {
    display: none;
}

#mobileBottomSheet.mm-sheet-dragging {
    transition: none;
}

#mobileSheetHandle {
    flex: none;
    width: 40px;
    height: 24px;
    margin: 10px auto 4px auto;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* タップ・ドラッグ領域(24px)はそのままに、見た目の灰色バーだけ元の5px幅に戻して中央に表示する */
#mobileSheetHandle::before {
    content: "";
    width: 40px;
    height: 5px;
    border-radius: 3px;
    background-color: #D0D0D0;
}

/* 既定は非表示。地図側の#searchBtn(#sidebotans内)がタップされた時だけJSでdisplay:flexにする */
#mobileBottomSheet #mobileSearchBar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 2px 10px 8px 10px;
}

#mobileSearchBar .container {
    width: auto;
    flex: 1;
    min-width: 0;
    margin: 0;
    position: relative;
}

#mobileSearchBar input {
    width: 100%;
    box-sizing: border-box;
    padding-left: 26px;
    padding-right: 30px;
    height: 40px;
    border: 2px solid rgba(0, 0, 0, .5);
    border-radius: 50px;
    background-color: #FFFFFF;
}

/* #input_magnifier(PC)と同じ大きさ・位置に揃える(idが違うため専用ルールが必要) */
#mobileInputMagnifier {
    position: absolute;
    top: 10px;
    width: 19px;
    left: 8px;
    z-index: 1;
}

#mobileSearchClearBtn {
    position: absolute;
    top: 40%;
    right: 8px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    line-height: 18px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, .5);
    color: #FFFFFF;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
}

/* map.css の #visibilityBtn/li/.active の見た目を、シート内のブロック要素として再現したもの */
#mobileBottomSheet #mobileVisibilityBtn {
    position: static;
    flex: none;
    overflow-x: auto;
    padding: 5px 0;
    background-color: rgb(15, 64, 103, 0.8);
    width: 100%;
}

#mobileVisibilityBtn::-webkit-scrollbar {
    display: none;
}

#mobileVisibilityBtn li {
    font-size: 12px;
    padding: 4px 15px;
    border-radius: 20px;
    text-align: center;
    border: solid 2px #FFFFFF;
    color: #FFFFFF;
    display: inline-block;
    text-decoration: none;
}

#mobileVisibilityBtn .active {
    color: #41DEEA;
    border: solid 2px #41DEEA;
}

/* シート下部(カルーセル)の高さは#mobileBottomSheet全体のドラッグでのみ変える想定のため、
   この領域単体での縦スクロールは禁止する */
#mobileSheetScroll {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 5px;
}

/* carouselWrapはPCと共有の要素。スマホ表示でシート内に移動している間だけ、
   絶対配置(position:absolute)をやめてシートの流れに沿わせる */
#mobileSheetScroll #carouselWrap {
    position: static;
    width: 100%;
    height: auto;
    padding: 10px 0;
}

/* シートに隠れないよう、地図/リスト切替ボタンをシートより前面に出す */
#switchWrap {
    z-index: 21;
}

.box::before {
    display: inline-block;
    height: 24px;
}

select {
    color: #000;
}

/* 矢印のクリック範囲など */
.button {
    background-color: transparent;
    /* ボタンの背景を透明にする */
    height: 15px;
    transition: .2s;
    width: 15px;
    border: none;
}

/* 矢印共通のスタイル */
.button::before {
    background-repeat: no-repeat;
    background-size: contain;
    right: 0;
    content: "";
    height: 15px;
    left: 0;
    margin: auto;
    position: absolute;
    top: 0;
    width: 15px;
    border: none;
}

.prev,
.next {
    filter: brightness(0) saturate(100%) invert(31%) sepia(73%) saturate(467%) hue-rotate(162deg) brightness(90%) contrast(98%);
}

#test {
    position: fixed;
    top: 0;
    z-index: 50;

}

/* スマホ用レスポンシブ */
@media screen and (max-width: 767px) {
    /* keirowrapdecoは.keiro(検索パネル)の背後に重ねる装飾用の背景(カードの縁取り風の
       演出)。スマホ幅では表示しない */
    #keirowrapdeco {
        display: none;
    }
    /* map.css の #visibilityBtn/li/.active の見た目を、シート内のブロック要素として再現したもの。スマホでは背景色なし */
    #mobileBottomSheet #mobileVisibilityBtn {
        background-color: transparent;
        padding: 0;
    }
    /* 背景色透過によるカラー変更 */
    #mobileVisibilityBtn li {
        border: solid 2px #215D8B;
        color: #215D8B;
        font-size: 14px;
        padding: 3px 8px;
    }
    /* 背景色透過によるカラー変更 */
    #mobileVisibilityBtn .active {
        color: #FFFFFF;
        border: solid 2px #215D8B;
        background-color: #215D8B;
    }
    .splide__track {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* タブレット用レスポンシブ */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    body {
        background-color: #0F4067;
    }

    #pc-wrapper {
        max-width: 600px;
        height: 100vh;
        border-radius: 16px;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
    }

    #keiroWrap .keiro {
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
    }

    /* タブレット以上は従来通りkeiroWrapの開閉メニューと地図内のカテゴリータブを使うため、
       スマホ専用のボトムシート(検索欄・カテゴリータブを含む)は隠す */
    #mobileBottomSheet {
        display: none;
    }
}

/* PC用レスポンシブ */
@media screen and (min-width: 1025px) {
    body {
        background-color: #0F4067;
    }

    #pc-wrapper {
        max-width: 86%;
        height: 100vh;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
        background-color: #334c71bf;
    }

    /* WMG2027に合わせ、スポット検索ボタンのエリアをカード全幅ではなく中央寄せの400px幅にする
       (bottomの値はWMG2027のものをそのまま使うとnumazuのresize()が計算する地図の位置と
       ズレるため、numazu側の元のbottom:110pxはそのまま維持する) */
    #keiroWrap {
        width: 400px;
        margin: 0 auto;
    }

    /* PCも従来通りkeiroWrapの開閉メニューと地図内のカテゴリータブを使うため、
       スマホ専用のボトムシート(検索欄・カテゴリータブを含む)は隠す */
    #mobileBottomSheet {
        display: none;
    }

    #spot_iframe {
        max-width: 390px;
        height: 92%;
    }

    #keiroWrap .keiro {
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    /* WMG2027に合わせ、地図(#calendarWrap/#mapiframe/#calendariframe)を左右に余白のある
       浮いたカード状にするため、幅を絞った分だけ四隅すべてを角丸にする(モバイルは下側のみ角丸) */
    #calendarWrap {
        border-radius: 20px;
    }

    #calendarWrap #calendariframe {
        border-radius: 20px;
    }

    /* PCのみ背景を白で塗りつぶす(スマホ・タブレットはjj_dateSlider側の既存デザインのまま) */
    #jj_dateSlider {
        background-color: rgba(255, 255, 255, 1);
    }

    /* WMG2027と同じく#pc-wrapper内右下に絶対配置(幅は#pc-wrapperの20%) */
    .jrdapllink {
        display: block;
        position: absolute;
        width: 20%;
        bottom: 5px;
        right: 0;
        z-index: 6;
        margin: 0 auto;
    }

    /* カルーセルが右端まで伸びるとjrdapllinkと重なるため、地図と同じ80%幅に揃えて右側を空ける */
    #carouselWrap {
        width: 58%;
        transform: translateX(35%);
    }

    .jrdapllink div {
        margin: 0 auto;
        position: relative;
    }

    .jrdapllink img {
        display: block;
        width: 100%;
        margin: 0 auto;
    }

    .dl_jrdlogo {
        width: 100%;
    }

    .dl_jrdlogo img {
        width: 60%;
        margin: 0 auto;
    }

    .dl_bnr {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: row;
        gap: 4px;
    }
}