/**
 * 受験生画面の外枠。テーマの get_header() / get_footer() は使わない。
 */

.examportal-shell-header,
.examportal-shell-footer {
	background: #ffffff;
}

.examportal-shell-header {
	border-bottom: 1px solid #dbe4ee;
}

.examportal-shell-footer {
	border-top: 1px solid #dbe4ee;
	color: #5a6a7a;
	font-size: 0.875rem;
}

.examportal-shell-header__inner,
.examportal-shell-footer__inner {
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem 1.25rem;
}

.examportal-shell-brand,
.examportal-shell-nav a {
	color: #1b2838;
	text-decoration: none;
}

.examportal-shell-brand {
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
}

.examportal-shell-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem;
}

.examportal-shell-logout {
	margin: 0;
	padding: 0;
}

.examportal-shell-logout button {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #1b2838;
	font: inherit;
	cursor: pointer;
}

.examportal-shell-footer p {
	margin: 0;
}

.examportal-shell-main {
	display: block;
}

/* Plugin pages use their own shell, so the theme's sticky-footer rule does not apply. */
body.examportal-payment-screen,
body.examportal-connect-screen {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

body.examportal-payment-screen .examportal-shell-main,
body.examportal-connect-screen .examportal-shell-main {
	flex: 1 0 auto;
	min-width: 0;
}

body.admin-bar.examportal-payment-screen,
body.admin-bar.examportal-connect-screen {
	min-height: calc(100dvh - 32px);
}

@media (max-width: 782px) {
	body.admin-bar.examportal-payment-screen,
	body.admin-bar.examportal-connect-screen {
		min-height: calc(100dvh - 46px);
	}
}

/*
 * 購入〜決済完了の画面は、トップページ(D2)と同じ外枠にする。
 * 色: paper #F8F5EE / surface #FFFEFA / ink #09294F / muted #405B70。
 * 他の受験生画面には効かせない（body.examportal-payment-screen のみ）。
 */
body.examportal-payment-screen {
	background: #f8f5ee;
	color: #09294f;
	-webkit-font-smoothing: antialiased;
}

body.examportal-payment-screen .examportal-shell-header {
	background: #f8f5ee;
	border-bottom: 0;
}

body.examportal-payment-screen .examportal-shell-header__inner {
	max-width: none;
	min-height: 76px;
	padding: 0 clamp(24px, 6vw, 92px);
}

body.examportal-payment-screen .examportal-shell-brand {
	color: #09294f;
}

body.examportal-payment-screen .examportal-shell-brand--logo {
	display: inline-flex;
	align-items: center;
	width: 142px;
	min-height: 44px;
}

body.examportal-payment-screen .examportal-shell-brand--logo img {
	display: block;
	width: 100%;
	height: auto;
}

body.examportal-payment-screen .examportal-shell-nav {
	gap: 0.25rem;
}

body.examportal-payment-screen .examportal-shell-nav a,
body.examportal-payment-screen .examportal-shell-logout button {
	display: inline-flex;
	align-items: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0.45rem 0.75rem;
	color: #09294f;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
}

body.examportal-payment-screen .examportal-shell-nav a:hover,
body.examportal-payment-screen .examportal-shell-logout button:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

body.examportal-payment-screen :is(.examportal-shell-header, .examportal-shell-footer) :is(a, button):focus-visible {
	outline: 2px solid #09294f;
	outline-offset: 3px;
}

body.examportal-payment-screen .examportal-shell-footer {
	min-height: 76px;
	border-top: 1px solid rgba(9, 41, 79, 0.08);
	background: #fffefa;
	color: #405b70;
}

body.examportal-payment-screen .examportal-shell-footer__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	max-width: 1200px;
	min-height: 52px;
	padding: 12px clamp(24px, 6vw, 92px);
	gap: 0.5rem 1rem;
}

body.examportal-payment-screen .examportal-shell-footer__brand {
	justify-self: start;
	color: #09294f;
	text-decoration: none;
}

body.examportal-payment-screen .examportal-shell-footer__brand img {
	display: block;
	width: 108px;
	height: auto;
}

body.examportal-payment-screen .examportal-shell-footer__nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	justify-self: center;
	gap: 0.25rem;
}

body.examportal-payment-screen .examportal-shell-footer__nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.5rem 0.625rem;
	color: #09294f;
	font-size: 12px;
	text-underline-offset: 0.18em;
}

body.examportal-payment-screen .examportal-shell-footer .examportal-shell-footer__copyright {
	justify-self: end;
	color: #405b70;
	font-size: 9px;
}

@media (max-width: 560px) {
	body.examportal-payment-screen .examportal-shell-header__inner {
		min-height: 66px;
		padding-inline: 21px;
	}

	body.examportal-payment-screen .examportal-shell-brand--logo {
		width: 125px;
	}

	body.examportal-payment-screen .examportal-shell-nav a,
	body.examportal-payment-screen .examportal-shell-logout button {
		padding-inline: 0.7rem;
		font-size: 11px;
	}

	body.examportal-payment-screen .examportal-shell-footer {
		min-height: 65px;
	}

	body.examportal-payment-screen .examportal-shell-footer__inner {
		grid-template-columns: minmax(0, 1fr) auto;
		padding: 17px 22px;
	}

	body.examportal-payment-screen .examportal-shell-footer__brand img {
		width: 95px;
	}

	body.examportal-payment-screen .examportal-shell-footer__nav {
		grid-column: 1 / -1;
		justify-self: start;
		gap: 0 0.25rem;
	}

	body.examportal-payment-screen .examportal-shell-footer__nav a {
		min-height: 40px;
		padding-inline: 0.4rem;
		font-size: 11px;
	}

	body.examportal-payment-screen .examportal-shell-footer .examportal-shell-footer__copyright {
		grid-column: 2;
		grid-row: 1;
	}
}
