/* テーマの見出し・リンク・ボタンの装飾に影響されないよう、すべて #arkhe-division-popup 配下に限定する */

html.arkhe-popup-lock,
html.arkhe-popup-lock body {
	overflow: hidden;
}

#arkhe-division-popup,
#arkhe-division-popup *,
#arkhe-division-popup *::before,
#arkhe-division-popup *::after {
	box-sizing: border-box;
}

#arkhe-division-popup h2,
#arkhe-division-popup h3,
#arkhe-division-popup p,
#arkhe-division-popup a,
#arkhe-division-popup img,
#arkhe-division-popup button,
#arkhe-division-popup section {
	float: none;
	max-width: none;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-align: inherit;
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
}

#arkhe-division-popup h2::before,
#arkhe-division-popup h2::after,
#arkhe-division-popup h3::before,
#arkhe-division-popup h3::after,
#arkhe-division-popup p::before,
#arkhe-division-popup p::after {
	content: none;
}

#arkhe-division-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	color: #222;
	font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0;
	text-align: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.45s ease, visibility 0.45s ease;
}

#arkhe-division-popup:lang(zh) {
	font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

#arkhe-division-popup.arkhe-popup--latin {
	font-family: "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

#arkhe-division-popup.is-open {
	opacity: 1;
	visibility: visible;
}

#arkhe-division-popup .arkhe-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	cursor: pointer;
}

#arkhe-division-popup .arkhe-popup__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 1080px;
	height: 600px;
	max-width: calc(100vw - 32px);
	background: #fff;
}

#arkhe-division-popup .arkhe-popup__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

#arkhe-division-popup .arkhe-popup__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: block;
	width: 36px;
	height: 36px;
	cursor: pointer;
	appearance: none;
}

#arkhe-division-popup .arkhe-popup__close::before,
#arkhe-division-popup .arkhe-popup__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 1.5px;
	background: #171c61;
}

#arkhe-division-popup .arkhe-popup__close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

#arkhe-division-popup .arkhe-popup__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

#arkhe-division-popup .arkhe-popup__close:hover::before,
#arkhe-division-popup .arkhe-popup__close:hover::after,
#arkhe-division-popup .arkhe-popup__close:focus-visible::before,
#arkhe-division-popup .arkhe-popup__close:focus-visible::after {
	background: #0057b8;
}

#arkhe-division-popup .arkhe-popup__close:focus-visible {
	outline: 2px solid #0057b8;
	outline-offset: 2px;
}

#arkhe-division-popup .arkhe-popup__logo {
	display: block;
	width: 280px;
	height: auto;
}

#arkhe-division-popup .arkhe-popup__columns {
	display: flex;
	justify-content: center;
	gap: 40px;
	margin-top: 40px;
}

#arkhe-division-popup .arkhe-popup__card {
	display: block;
	width: 400px;
}

#arkhe-division-popup .arkhe-popup__banner {
	display: block;
	width: 400px;
	height: 225px;
	object-fit: cover;
}

#arkhe-division-popup .arkhe-popup__name {
	display: block;
	margin-top: 20px;
	padding-left: 0.2em;
	color: #1a1a1a;
	font-size: 32px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.2em;
}

/* 長い説明でも折り返さず、バナー幅を超える場合は左右へ均等にはみ出させる */
#arkhe-division-popup .arkhe-popup__desc {
	display: flex;
	justify-content: center;
	margin-top: 10px;
	color: #222;
	font-size: 19px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}

/* 英語・ベトナム語は文が長いので、カードの左右に20pxずつ広げた幅で折り返す */
#arkhe-division-popup.arkhe-popup--latin .arkhe-popup__name {
	padding-left: 0.05em;
	letter-spacing: 0.05em;
}

#arkhe-division-popup.arkhe-popup--latin .arkhe-popup__desc {
	display: block;
	margin-right: -20px;
	margin-left: -20px;
	font-size: 18px;
	line-height: 1.4;
	white-space: normal;
}

#arkhe-division-popup .arkhe-popup__btn {
	position: relative;
	width: 188px;
	margin: 20px auto 0;
}

#arkhe-division-popup .arkhe-popup__btn::after {
	content: "";
	position: absolute;
	top: calc(50% - 2px);
	right: -16px;
	z-index: 2;
	width: 32px;
	height: 4px;
	background: url("../img/btn-arrow.svg") no-repeat center / contain;
	transition: right 0.6s cubic-bezier(0.32, 0.94, 0.6, 1);
	pointer-events: none;
}

#arkhe-division-popup .arkhe-popup__btn a {
	position: relative;
	display: block;
	overflow: hidden;
	padding: 10px 0;
	border: 1px solid #171769;
	background: linear-gradient(90deg, #0057b8 0%, #171769 100%);
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.08em;
	text-align: center;
}

#arkhe-division-popup .arkhe-popup__btn a::after {
	content: none;
}

#arkhe-division-popup .arkhe-popup__btn a > span {
	position: relative;
	z-index: 2;
}

#arkhe-division-popup .arkhe-popup__btn a::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	z-index: 1;
	width: 100%;
	height: 100%;
	background: #fff;
	opacity: 0;
	transition: left 0.6s cubic-bezier(0.32, 0.94, 0.6, 1), opacity 0.6s cubic-bezier(0.32, 0.94, 0.6, 1);
}

#arkhe-division-popup .arkhe-popup__btn--eco a {
	border-color: #339900;
	background: #339900;
}

#arkhe-division-popup .arkhe-popup__btn a:focus-visible {
	outline: 2px solid #171769;
	outline-offset: 3px;
}

@media (hover: hover) {
	#arkhe-division-popup .arkhe-popup__btn:hover a {
		color: #171769;
	}

	#arkhe-division-popup .arkhe-popup__btn:hover a::before {
		left: 0;
		opacity: 1;
	}

	#arkhe-division-popup .arkhe-popup__btn--eco:hover a {
		color: #339900;
	}

	#arkhe-division-popup .arkhe-popup__btn:hover::after {
		right: -24px;
	}
}

@media (max-width: 1119px) {
	#arkhe-division-popup {
		padding: 12px 15px;
	}

	#arkhe-division-popup .arkhe-popup__dialog {
		justify-content: flex-start;
		width: 100%;
		max-width: 420px;
		height: auto;
		max-height: calc(100dvh - 24px);
		padding: 18px 0 20px;
		overflow-x: hidden;
		overflow-y: auto;
	}

	#arkhe-division-popup .arkhe-popup__close {
		top: 4px;
		right: 4px;
	}

	#arkhe-division-popup .arkhe-popup__logo {
		width: 72.5%;
		max-width: 250px;
	}

	#arkhe-division-popup .arkhe-popup__columns {
		flex-direction: column;
		align-items: center;
		gap: 20px;
		width: 100%;
		margin-top: 20px;
	}

	#arkhe-division-popup .arkhe-popup__card {
		width: 81%;
		max-width: 280px;
	}

	#arkhe-division-popup .arkhe-popup__banner {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}

	#arkhe-division-popup .arkhe-popup__name {
		margin-top: 10px;
		font-size: clamp(18px, 5.87vw, 24px);
	}

	#arkhe-division-popup .arkhe-popup__desc {
		margin-top: 5px;
		font-size: clamp(10px, 3.2vw, 13px);
	}

	#arkhe-division-popup.arkhe-popup--latin .arkhe-popup__desc {
		margin-right: 0;
		margin-left: 0;
		font-size: clamp(10px, 3.2vw, 13px);
		line-height: 1.35;
	}

	#arkhe-division-popup .arkhe-popup__btn {
		width: 52.5%;
		margin-top: 10px;
	}

	#arkhe-division-popup .arkhe-popup__btn::after {
		top: calc(50% - 1.5px);
		right: -13px;
		width: 26px;
		height: 3px;
	}

	#arkhe-division-popup .arkhe-popup__btn a {
		padding: 7px 0;
		font-size: clamp(11px, 3.47vw, 14px);
	}
}

@media (max-width: 1119px) and (max-height: 620px) {
	#arkhe-division-popup .arkhe-popup__dialog {
		padding: 12px 0 14px;
	}

	#arkhe-division-popup .arkhe-popup__logo {
		width: 62%;
	}

	#arkhe-division-popup .arkhe-popup__columns {
		gap: 12px;
		margin-top: 12px;
	}

	#arkhe-division-popup .arkhe-popup__card {
		width: 70%;
	}

	#arkhe-division-popup .arkhe-popup__name {
		margin-top: 6px;
	}

	#arkhe-division-popup .arkhe-popup__desc {
		margin-top: 3px;
	}

	#arkhe-division-popup .arkhe-popup__btn {
		margin-top: 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#arkhe-division-popup,
	#arkhe-division-popup .arkhe-popup__btn::after,
	#arkhe-division-popup .arkhe-popup__btn a::before {
		transition-duration: 0.01s;
	}
}
