/* 証明写真トリミング機能（rirekisyo.php専用）
   base.cssは編集しない方針のため、このファイルに分離している。 */

#photocropOverlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 1000;
	text-align: center;
}

#photocropOverlay.open {
	display: block;
	/* PCの横長画面だと画像の横幅に余裕がある分、縦が画面をはみ出しやすい。
	   はみ出した分はこのオーバーレイ自体をスクロールして確定・キャンセルボタンまで見られるようにする */
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

#photocropInner {
	position: relative;
	display: inline-block;
	margin: 30px auto;
	background-color: #fff;
	padding: 15px;
	border-radius: 5px;
	max-width: 94%;
	box-sizing: border-box;
}

#photocropStage {
	position: relative;
	display: inline-block;
	max-width: 100%;
	touch-action: none;
	/* 選択枠のbox-shadow（外側を暗くする効果）がステージの外（確定・キャンセルボタン側）まで
	   はみ出してかすんで見えるのを防ぐため、ここで切り取る */
	overflow: hidden;
}

#photocropStage img {
	display: block;
	max-width: 100%;
	max-height: 60vh;
	height: auto;
	user-select: none;
	-webkit-user-drag: none;
}

.photocropBox {
	position: absolute;
	border: 2px solid #20b1ba;
	box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.45);
	box-sizing: border-box;
	cursor: move;
	touch-action: none;
}

.photocropHandle {
	position: absolute;
	width: 18px;
	height: 18px;
	background-color: #20b1ba;
	border: 2px solid #fff;
	border-radius: 50%;
	box-sizing: border-box;
	touch-action: none;
}

.photocropHandle.nw { top: -10px; left: -10px; cursor: nwse-resize; }
.photocropHandle.ne { top: -10px; right: -10px; cursor: nesw-resize; }
.photocropHandle.sw { bottom: -10px; left: -10px; cursor: nesw-resize; }
.photocropHandle.se { bottom: -10px; right: -10px; cursor: nwse-resize; }

#photocropButtons {
	/* 画像が縦に長くオーバーレイがスクロールする場合でも、
	   ボタンは常に上部に見えるようにする */
	position: sticky;
	top: 0;
	background-color: #fff;
	padding-bottom: 10px;
	margin-bottom: 5px;
	z-index: 2;
}

#photocropButtons .btn02,
#photocropButtons .btn04 {
	float: none;
	display: inline-block;
	margin: 0 8px;
	cursor: pointer;
}
