/* ======================================================
   jquery.slidemenu.css（最終統合版 2025/10/30）
   スマホ・PC両対応、縦スクロール対応、背景固定対応
====================================================== */

/* ドロワー以外のコンテンツ部分 */
#container {
	position: relative;
	z-index: 1;
	background: #FFF;
}

#container.show {
	-webkit-transform: translate3d(240px, 0, 1px);
	transform: translate3d(240px, 0, 1px);
	min-width: 320px;
}

/* ドロワーメニュー全体 */
#drawer {
	background-color: #418FD6;
	left: 0;
	top: 0;
	position: fixed;
	visibility: hidden;
	z-index: -1;
	-webkit-transition: visibility 0s linear .2s;
}

/* 開いた状態 */
#drawer.show {
	height: 100%;
	visibility: visible;
	z-index: 10;
	-webkit-transition: z-index 0s linear .2s;
}

/* コンテンツ部分（スクロール対応） */
#drawerContents {
	display: none;
	position: relative;
	width: 270px;
	height: 100vh;                     
	overflow-y: auto;                  
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch; 
	scrollbar-gutter: stable both-edges;
}

/* スクロールバー装飾 */
#drawerContents::-webkit-scrollbar {
	width: 6px;
}
#drawerContents::-webkit-scrollbar-thumb {
	background-color: rgba(255,255,255,0.4);
	border-radius: 3px;
}
#drawerContents::-webkit-scrollbar-track {
	background-color: rgba(0,0,0,0.1);
}

/* ヘッダ部 */
#drawerContents > p {
	background: #0068B7;
	padding: 7px 0;
	color: #fff;
	text-align: center;
	font-weight: bold;
}

/* メニューリスト */
#drawerList li a {
	display: block;
	padding: 10px 0 10px 30px;
	color: #FFF;
	text-decoration: none;
}
#drawerList li {
	background-size: 5%;
	background-repeat: no-repeat;
	background-position: 10px center;
	border-bottom: 1px solid #89C3EB;
}

/* closeボタン */
#close {
	padding: 10px 20px 0 0;
	text-align: right;
	color: #fff;
	font-weight: bold;
	cursor: pointer;
}

/* ===== PC表示用（body幅640pxに対応） ===== */
@media screen and (min-width: 641px) {
	body {
		position: relative;
	}

	#drawer {
		left: 50%;
		transform: translateX(-320px);
		width: 240px;
	}

	#drawerContents {
		width: 100%;
		box-sizing: border-box;
	}

	#drawerContents > p,
	#drawerList li,
	#drawerList li a {
		width: 100%;
		box-sizing: border-box;
	}

	#container.show {
		-webkit-transform: translate3d(240px, 0, 0);
		transform: translate3d(240px, 0, 0);
	}
}

/* ===== スマホ表示用（画面幅640px以下） ===== */
@media screen and (max-width: 640px) {
	#drawerContents {
		width: 70vw; /* 画面幅の70% */
	}
	#container.show {
		-webkit-transform: translate3d(70vw, 0, 0);
		transform: translate3d(70vw, 0, 0);
	}
}

/* メニュー開時に背後スクロールを停止 */
body.menu-open {
	overflow: hidden;
	height: 100%;
}
