/* サイドメニュー用操作画面 (透過表示) */
#map-side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 透過表示 */
    z-index: 1001; /* マップと切替ボタンより前面に表示 */
    display: none; /* 初期状態では非表示 */
}

/* ホバー時のデザイン */
#map-side-menu-open-btn:hover {
    color: #007B8A; /* ホバー時に薄い青色の背景 */
}

/* サイドメニューボタン */
#map-side-menu-open-btn {
    position: fixed; /* 常に画面内で固定 */
    top: 10px;
    left: 10px;
    background: rgba(247, 247, 247, 1.0);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000; /* ボタンがマップの上に表示されるように (※レイヤー切替ボタンはデフォルトで[z-index: 1000]) */
}

/* A-Frameコンテナ */
#map-side-menu-container {
    position: relative;
    width: 100%;
    display: block;
}

/* サイドメニュー */
#map-side-menu {
    position: fixed;
    top: 0;
    left: -300px; /* 画面外に表示 */
    width: 300px;
    height: 100%;
    background: white;
    z-index: 1001; /* サイドメニューを最前面に表示 */
    transition: left 0.3s; /* スライド表示アニメーション */
}

/* サイドメニューのヘッダー */
#map-side-menu-header {
    background: none;
    color: gray;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
}

/* サイドメニューのコンテンツ */
#map-side-menu-content {
    padding: 20px;
}

#map-side-menu-content ul {
    list-style-type: none;
    padding: 0;
}

#map-side-menu-content ul li {
    margin-bottom: 10px;
}

/* ホバー時のデザイン */
#map-side-menu-content ul li a:hover {
    color: #007B8A; /* ホバー時に薄い青色の背景 */
}

/* ホバー時のデザイン */
#map-side-menu-content ul li a {
    text-decoration: none;
    color: #333;
}

/* ホバー時のデザイン */
#map-side-menu-close-btn:hover {
    color: #007B8A; /* ホバー時に薄い青色の背景 */
}

/* サイドメニューの閉じるボタン */
#map-side-menu-close-btn {
    background: none;
    border: none;
    color: gray;
    font-size: 20px;
    cursor: pointer;
}

/* 検索ボックスのスタイル */
#map-search-box {
    position: fixed;
    top: 12.5px;
    left: 80px;
    font-family: Arial, sans-serif;
    align-items: center;
    width: 60%;
    max-width: 300px;
    border: none;
    border-radius: 30px; /* 丸みを設定 */
    background-color: #ffffff; /* ボックスの背景色 */
    padding: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* 影を追加 */
    z-index: 1000; /* 前面に表示するための設定 */
    display: flex;
}

/* 検索フィールド（入力） */
#map-search-box-input {
    flex: 1; /* 横幅を最大化 */
    border: none; /* フォーカス時に青い下線 */
    outline: none;
    padding: 10px 40px;
    font-size: 14px;
    border-radius: 30px; /* 丸みを合わせる */
}

/* 検索アイコン */
#map-search-box-btn {
    border: none;
    background: none;
    font-size: 20px; /* アイコンサイズ */
    padding: 5px 20px 1px 0px;
    cursor: pointer;
    color: #555; /* アイコンの色 */
}

/* 検索アイコン用の画像スタイル */
#map-search-box-image {
    width: 20px; /* アイコンの幅 */
    height: 20px; /* アイコンの高さ */
    display: inline-block; /* アイコンをインラインで表示 */
}

/* 全体の位置を設定 */
#map-distance-mode-toggle {
    position: fixed; /* 固定表示 */
    bottom: 25px; /* 左下のレイヤーボタンの上部に表示 */
    right: 55px; /* 画面右端からの距離 */
    z-index: 1000; /* 前面に表示するための設定 */
    display: flex; /* 横並びにする */
    align-items: center; /* 垂直方向の中央揃え */
    font-family: 'Arial', sans-serif; /* フォント設定 */
    font-size: 12px; /* テキストサイズ */
    color: #333; /* テキスト色 */
    background: white; /* 背景を白にする */
    padding: 8px 12px; /* 内側の余白を設定 */
    border-radius: 8px; /* 角を丸くする */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* 影で立体感を追加 */
    cursor: pointer; /* クリック可能に見せる */
}

/* ラベル内を横並びにする */
.distance-mode-label {
    display: flex;
    align-items: center;
}

/* チェックボックスを非表示にしてカスタムスタイルで置き換える */
.distance-mode-label input[type="checkbox"] {
    display: none; /* 標準のチェックボックスを非表示にする */
}

/* トグルスイッチの見た目を設定 */
.toggle-slider {
    position: relative;
    width: 30px; /* トグルスイッチの幅 */
    height: 15px; /* トグルスイッチの高さ */
    border-radius: 12px; /* 丸みを付ける */
    background: #ccc; /* オフ時の背景色 */
    margin-left: 10px; /* テキストとスイッチ間の余白 */
    transition: background 0.3s ease; /* 背景色の変更を滑らかに */
}

/* トグルスイッチの丸いスライダー部分 */
.toggle-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px; /* スライダーの幅 */
    height: 10px; /* スライダーの高さ */
    background: white; /* スライダーの背景色 */
    border-radius: 50%; /* セミ円を作成 */
    transition: transform 0.3s ease; /* スライダーの動きを滑らかにする */
}

/* チェックオン時のトグルスイッチスタイル */
.distance-mode-label input[type="checkbox"]:checked + .toggle-slider {
    background: #339cff; /* チェック時の背景色 */
}

.distance-mode-label input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(15px); /* 丸部分を右に移動 */
}