/**
 * Apollo Viewer — full-viewport auth screens (employee + super admin).
 */

html.apollo-viewer-auth-html,
body.apollo-viewer-login-page,
body.apollo-viewer-auth-page {
	background: #f8fafc !important;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0 !important;
	overflow-x: hidden;
}

body.apollo-viewer-login-page #page,
body.apollo-viewer-auth-page #page,
body.apollo-viewer-login-page .site,
body.apollo-viewer-auth-page .site,
body.apollo-viewer-login-page .site-content,
body.apollo-viewer-auth-page .site-content,
body.apollo-viewer-login-page #content,
body.apollo-viewer-auth-page #content,
body.apollo-viewer-login-page #primary,
body.apollo-viewer-auth-page #primary,
body.apollo-viewer-login-page #main,
body.apollo-viewer-auth-page #main,
body.apollo-viewer-login-page .site-main,
body.apollo-viewer-auth-page .site-main,
body.apollo-viewer-login-page article.page,
body.apollo-viewer-auth-page article.page,
body.apollo-viewer-login-page .ast-container,
body.apollo-viewer-auth-page .ast-container,
body.apollo-viewer-login-page .ast-separate-container .ast-article-single,
body.apollo-viewer-auth-page .ast-separate-container .ast-article-single,
body.apollo-viewer-login-page .entry-content,
body.apollo-viewer-auth-page .entry-content {
	background: transparent !important;
	max-width: none !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	min-height: 100vh;
	min-height: 100dvh;
}

body.apollo-viewer-login-page .entry-header,
body.apollo-viewer-auth-page .entry-header,
body.apollo-viewer-login-page .entry-title,
body.apollo-viewer-auth-page .entry-title,
body.apollo-viewer-login-page h1.entry-title,
body.apollo-viewer-auth-page h1.entry-title,
body.apollo-viewer-login-page .page-title,
body.apollo-viewer-auth-page .page-title,
body.apollo-viewer-login-page .wp-block-post-title,
body.apollo-viewer-auth-page .wp-block-post-title,
body.apollo-viewer-login-page .page-header,
body.apollo-viewer-auth-page .page-header,
body.apollo-viewer-login-page .ast-page-title,
body.apollo-viewer-auth-page .ast-page-title,
body.apollo-viewer-login-page .ast-single-entry-banner,
body.apollo-viewer-auth-page .ast-single-entry-banner,
body.apollo-viewer-login-page .ast-title-bar-wrap,
body.apollo-viewer-auth-page .ast-title-bar-wrap,
body.apollo-viewer-login-page .ast-breadcrumbs-wrapper,
body.apollo-viewer-auth-page .ast-breadcrumbs-wrapper,
body.apollo-viewer-login-page .ast-archive-description,
body.apollo-viewer-auth-page .ast-archive-description,
body.apollo-viewer-login-page #masthead,
body.apollo-viewer-auth-page #masthead,
body.apollo-viewer-login-page .site-header,
body.apollo-viewer-auth-page .site-header,
body.apollo-viewer-login-page header.site-header,
body.apollo-viewer-auth-page header.site-header,
body.apollo-viewer-login-page .site-footer,
body.apollo-viewer-auth-page .site-footer,
body.apollo-viewer-login-page #colophon,
body.apollo-viewer-auth-page #colophon {
	display: none !important;
}

.apollo-viewer-login-shell {
	display: grid;
	grid-template-columns: 1fr;
	width: 100%;
	max-width: none;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
}

body.apollo-viewer-auth-page .apollo-viewer-login-shell {
	position: fixed;
	inset: 0;
	z-index: 1;
}

@media (min-width: 1024px) {
	.apollo-viewer-login-shell {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
}

/* Brand panel (desktop left only) */
.apollo-viewer-login__brand {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	background: #163a5f;
	color: #f8fafc;
	padding: clamp(2rem, 4vw, 3.5rem);
	min-height: 100vh;
	min-height: 100dvh;
}

@media (min-width: 1024px) {
	.apollo-viewer-login__brand {
		display: flex;
	}
}

.apollo-viewer-login__brand-top {
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.apollo-viewer-login__brand-logo {
	display: block;
	width: auto;
	height: var(--apollo-dhi-logo-height, 52px);
	max-width: none;
	object-fit: contain;
}

.apollo-viewer-login__brand-name {
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.apollo-viewer-login__brand-heading {
	margin: 0;
	font-size: clamp(1.75rem, 3vw, 2rem);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.apollo-viewer-login__brand-lede {
	margin: 0.85rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	opacity: 0.82;
	max-width: 36rem;
}

.apollo-viewer-login__features {
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
	display: grid;
	gap: 1.25rem;
	max-width: 36rem;
}

.apollo-viewer-login__feature {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

.apollo-viewer-login__feature-icon {
	flex: 0 0 auto;
	color: #f58220;
	margin-top: 0.1rem;
}

.apollo-viewer-login__feature-copy {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	font-size: 0.8125rem;
	line-height: 1.45;
	opacity: 0.9;
}

.apollo-viewer-login__feature-copy strong {
	font-size: 0.875rem;
	font-weight: 600;
	opacity: 1;
}

.apollo-viewer-login__brand-footer {
	margin: 0;
	font-size: 0.75rem;
	opacity: 0.6;
}

/* Sign-in panel — full viewport column */
.apollo-viewer-login__main {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem);
	background: #f8fafc;
	box-sizing: border-box;
}

.apollo-viewer-login-shell--full .apollo-viewer-login__main {
	justify-content: center;
}

.apollo-viewer-login__panel {
	width: 100%;
	max-width: min(36rem, 100%);
	margin: 0 auto;
	box-sizing: border-box;
}

.apollo-viewer-login__panel--full {
	max-width: min(32rem, 100%);
}

@media (min-width: 1024px) {
	.apollo-viewer-login-shell--full .apollo-viewer-login__panel,
	.apollo-viewer-login-shell--full .apollo-viewer-login__panel--full {
		max-width: min(28rem, 88%);
	}
}

.apollo-viewer-login__mobile-brand {
	display: none;
}

@media (max-width: 1023px) {
	.apollo-viewer-login__brand {
		display: none !important;
	}

	.apollo-viewer-login__mobile-brand {
		display: none !important;
	}

	.apollo-viewer-login-shell,
	.apollo-viewer-login-shell--full,
	.apollo-viewer-login-shell--super {
		grid-template-columns: 1fr;
	}

	.apollo-viewer-login__main {
		min-height: 100vh;
		min-height: 100dvh;
		padding: clamp(1.25rem, 5vw, 2rem) 1.25rem;
	}

	.apollo-viewer-login__panel,
	.apollo-viewer-login__panel--full,
	.apollo-viewer-login__panel--super {
		max-width: none;
		width: 100%;
	}
}

.apollo-viewer-login__mobile-logo {
	width: auto;
	height: var(--apollo-dhi-logo-height, 52px);
	max-width: none;
	object-fit: contain;
}

.apollo-viewer-login__mobile-name {
	font-size: 1rem;
	font-weight: 600;
	color: #111827;
}

.apollo-viewer-login__heading {
	margin: 0;
	font-size: clamp(1.35rem, 4vw, 1.5rem);
	font-weight: 600;
	line-height: 1.25;
	color: #111827;
	letter-spacing: -0.02em;
}

.apollo-viewer-login__subhead {
	margin: 0.5rem 0 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #64748b;
}

.apollo-viewer-login__auth {
	margin-top: 1.5rem;
}

.apollo-viewer-login__auth .apollo-viewer-login__error {
	margin-top: 0;
}

.apollo-viewer-login__auth .apollo-viewer-login__sso-wrap,
.apollo-viewer-login__auth .apollo-viewer-login__ms-btn {
	margin-top: 0;
}

.apollo-viewer-login__auth .apollo-viewer-login__sso-wrap + .apollo-viewer-login__ms-btn,
.apollo-viewer-login__auth .apollo-viewer-login__error + .apollo-viewer-login__sso-wrap,
.apollo-viewer-login__auth .apollo-viewer-login__error + .apollo-viewer-login__ms-btn {
	margin-top: 1rem;
}

.apollo-viewer-login__super {
	margin-top: 0.25rem;
}

.apollo-viewer-login__error {
	margin: 1rem 0 0;
	padding: 0.65rem 0.75rem;
	border-radius: 6px;
	border: 1px solid rgba(220, 38, 38, 0.35);
	background: rgba(220, 38, 38, 0.08);
	color: #b91c1c;
	font-size: 0.8125rem;
}

.apollo-viewer-login__ms-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	width: 100%;
	margin-top: 1.5rem;
	min-height: 48px;
	padding: 0.75rem 1rem;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #ffffff;
	color: #111827 !important;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none !important;
	box-sizing: border-box;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.apollo-viewer-login__ms-btn:hover,
.apollo-viewer-login__ms-btn:focus-visible {
	background: #f1f5f9;
	border-color: #94a3b8;
	color: #111827 !important;
	outline: none;
}

.apollo-viewer-login__sso-wrap {
	margin-top: 1.5rem;
}

.apollo-viewer-login__sso-wrap a {
	width: 100%;
}

.apollo-viewer-login__note {
	display: flex;
	align-items: flex-start;
	gap: 0.4rem;
	margin: 1.5rem 0 0;
	font-size: 0.75rem;
	line-height: 1.45;
	color: #64748b;
}

.apollo-viewer-login__note svg {
	flex: 0 0 auto;
	margin-top: 0.1rem;
	color: #64748b;
}

.apollo-viewer-login__super-link {
	margin: 0;
	font-size: 0.75rem;
	color: #64748b;
}

.apollo-viewer-login__super-link a {
	font-weight: 600;
	color: #163a5f;
}

/* Super admin */
.apollo-viewer-login__panel--super {
	max-width: min(28rem, 100%);
}

.apollo-viewer-login__super-head {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin-bottom: 1rem;
}

.apollo-viewer-login__super-icon {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 6px;
	background: #163a5f;
	color: #ffffff;
}

.apollo-viewer-login__super-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: #163a5f;
}

.apollo-viewer-login__super-sub {
	margin: 0.15rem 0 0;
	font-size: 0.75rem;
	color: #64748b;
}

.apollo-viewer-login__super-card {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #ffffff;
	padding: 1rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.apollo-viewer-login__super-card-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: #163a5f;
}

.apollo-viewer-login__super-card-lede {
	margin: 0.35rem 0 0;
	font-size: 0.75rem;
	line-height: 1.45;
	color: #64748b;
}

.apollo-viewer-login__super-form {
	margin-top: 0.85rem;
	display: grid;
	gap: 0.75rem;
}

.apollo-viewer-login__field-label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #475569;
}

.apollo-viewer-login__input {
	width: 100%;
	min-height: 2.25rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 0.9375rem;
	box-sizing: border-box;
	background: #ffffff;
	color: #0f172a;
}

.apollo-viewer-login__input:focus {
	outline: none;
	border-color: #163a5f;
	box-shadow: 0 0 0 2px rgba(22, 58, 95, 0.15);
}

.apollo-viewer-login__super-submit {
	width: 100%;
	min-height: 2.5rem;
	margin-top: 0.25rem;
	border: 0;
	border-radius: 6px;
	background: #163a5f;
	color: #ffffff;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
}

.apollo-viewer-login__super-submit:hover {
	background: #102a45;
}

.apollo-viewer-login__back-link {
	margin: 0.85rem 0 0;
	text-align: center;
	font-size: 0.6875rem;
}

.apollo-viewer-login__back-link a {
	color: #64748b;
	text-decoration: underline;
}

.apollo-viewer-login__signed-in {
	text-align: center;
}

/* Loading overlay */
.apollo-viewer-login__loading {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	place-items: center;
	background: #f8fafc;
}

.apollo-viewer-login__loading[hidden] {
	display: none !important;
}

.apollo-viewer-login__loading-inner {
	text-align: center;
	padding: 1.5rem;
}

.apollo-viewer-login__loading-logo {
	display: block;
	margin: 0 auto 0.85rem;
	width: auto;
	height: var(--apollo-dhi-logo-height, 52px);
	max-width: none;
	object-fit: contain;
}

.apollo-viewer-login__loading-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: #163a5f;
}

.apollo-viewer-login__loading-sub {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0.5rem 0 0;
	font-size: 0.875rem;
	color: #64748b;
}

.apollo-viewer-login__spinner {
	width: 1rem;
	height: 1rem;
	border: 2px solid #cbd5e1;
	border-top-color: #163a5f;
	border-radius: 50%;
	animation: apollo-viewer-login-spin 0.8s linear infinite;
}

@keyframes apollo-viewer-login-spin {
	to {
		transform: rotate(360deg);
	}
}

body.apollo-viewer-login-page.apollo-viewer-login-loading .apollo-viewer-login-shell,
body.apollo-viewer-auth-page.apollo-viewer-login-loading .apollo-viewer-login-shell {
	visibility: hidden;
}
