@charset "UTF-8";
/* ----------------------------------------------------
最終更新日: 2025.07.16
最終編集者: MH
dialog.css： 外部ファイル読み込み
---------------------------------------------------- */

/*====================================
ダイアログ
===================================*/
dialog{
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	box-sizing: border-box;
	overflow-y: auto;
	position: fixed;
	inset: 0;
	margin: auto;
	overscroll-behavior: none;
	scrollbar-width: none;
  background: rgba(0, 0, 0, 0);
	:focus {
		outline: 4px solid #ff0;
    box-shadow: 0 0 2px #fff;
	}
}
::backdrop {
	opacity: 0;
}

/*幅とか高さとか決める。Closeボタンの位置を決めるために必要*/
.mdl-inner {
	/* max-height: 90dvh; */
  max-height: calc(90dvh - 40px);
	position: relative;
}

/*内容が入る部分（はみ出したらスクロール出る設定）*/
.mdl-contents {
	width: 100%;
	max-height: 90dvh;
	box-sizing: border-box;
	background: #fff;
	overflow-y: auto;
}

/*閉じるボタン*/
.org-close {
	width: 40px;
	margin: 0;
	background: rgba(0, 0, 0, 0.6);
	border: none;
	color: #fff;
	text-transform: uppercase;
	position: absolute;
	/*top: -20px;
	right: -20px;*/
  top: -40px;
  right: 0px;
	aspect-ratio: 1;
	overflow: hidden;
  cursor: pointer;

	border: solid 1px #fff;
  font-size: 0;

	&::before,
	&::after {
		content: "";
		position: absolute;
		display: block;
		top: 50%;
		left: 50%;
		width: 100%;
		height: 3px;
		background: #fff;
		translate: -50% -50%;
	}

	&::before {
		rotate: 45deg;
	}

	&::after {
		rotate: -45deg;
	}
}

/*背景の半透明の黒---クリックすると閉じる*/
.mdl-overlay {
	border: none;
	width: 100%;
	height: calc(100% + 1px);
	background-color: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	position: absolute;
	inset: 0;
	z-index: -1;
}

/*アニメーション*/
.mdl-inner {
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .4s .2s, transform .4s .2s;
	&.modalOpen {
		opacity: 1;
		transform: translateY(0);
	}
	&.modalClose {
		transition: opacity .3s, transform .3s;
		opacity: 0;
		transform: translateY(10px);
	}
}
.mdl-overlay {
	opacity: 0;
	transition: opacity 0.3s;
	&.modalOpen {
		opacity: 1;
	}
	&.modalClose {
		opacity: 0;
	}
}

/*ダイアログが開いた後の効果*/
:modal {
	display: flex;
	align-items: center;
	justify-content: center;
}



/*各パターン---自由に成形できるタイプ*/
.dialog-free {
	.mdl-inner {
		width: min(90%, 800px);
	}
	.mdl-contents {
		padding: 30px 40px;
	}
}
/*各パターン---スクショ*/
.dialog-image {
	.mdl-inner {
		max-width: min(90%, 800px);
	}
	.mdl-contents {
		background: transparent;
	}
	img {
		max-width: 100%;
    max-height: 90dvh;
		height: auto;
	}
}
/*各パターン---動画*/
.dialog-movie {
	.mdl-inner {
		width: 96%;
		max-width: 900px;
	}
	.mdl-contents {
		background: #000;
	}
	iframe {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
		display: block;
	}
}
