/**
 * Aligns IDP auth screens with myroster-next public UI (globals.css HSL tokens).
 */

/* .app-body is flex row; without this the auth shell shrinks to content width and sits left */
#main-container .app-body {
	width: 100%;
	min-width: 0;
}

#main-container .app-body > .idp-auth-shell {
	flex: 1 1 auto;
	width: 100%;
	max-width: 100%;
	align-self: stretch;
	min-width: 0;
}

.idp-auth-shell {
	min-height: calc(100vh - 8rem);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem 3rem;
	background: hsl(210 40% 98%);
	position: relative;
	box-sizing: border-box;
}

.idp-auth-shell::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(ellipse 480px 480px at 85% -10%, hsl(221 83% 53% / 0.12), transparent 55%),
		radial-gradient(ellipse 420px 420px at -15% 45%, hsl(221 83% 53% / 0.06), transparent 50%),
		radial-gradient(ellipse 400px 400px at 70% 100%, hsl(221 83% 53% / 0.05), transparent 45%);
}

.idp-auth-shell > .form-signin,
.idp-auth-shell > form.form-signin {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 28rem;
	margin: 0 auto;
	padding: 2rem 2rem 2.25rem;
	background: #fff;
	border-radius: 0.5rem;
	border: 1px solid hsl(214.3 31.8% 91.4%);
	box-shadow:
		0 1px 3px hsl(222 47% 11% / 0.06),
		0 12px 40px -12px hsl(221 83% 53% / 0.15);
}

.idp-auth-shell--wide > .container {
	position: relative;
	z-index: 1;
	max-width: 42rem;
	margin: 0 auto;
	padding: 2rem;
	background: #fff;
	border-radius: 0.5rem;
	border: 1px solid hsl(214.3 31.8% 91.4%);
	box-shadow:
		0 1px 3px hsl(222 47% 11% / 0.06),
		0 12px 40px -12px hsl(221 83% 53% / 0.12);
}

.idp-auth-shell .btn-primary {
	background: hsl(221 83% 53%);
	border-color: hsl(221 83% 48%);
	color: #fff;
	border-radius: 0.5rem;
	font-weight: 600;
	transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.idp-auth-shell .btn-primary:hover,
.idp-auth-shell .btn-primary:focus {
	background: hsl(221 83% 47%);
	border-color: hsl(221 83% 42%);
	box-shadow: 0 4px 14px hsl(221 83% 53% / 0.35);
	color: #fff;
}

.idp-auth-shell .btn-secondary {
	border-radius: 0.5rem;
	background: hsl(210 40% 96.1%);
	border: 1px solid hsl(214.3 31.8% 91.4%);
	color: hsl(222 47% 11%);
	font-weight: 600;
}

.idp-auth-shell .btn-secondary:hover {
	background: hsl(210 40% 92%);
	color: hsl(222 47% 11%);
}

.idp-auth-shell .btn-lg {
	font-size: 1rem;
}

.idp-auth-shell .form-control {
	border-radius: 0.5rem;
	border-color: hsl(214.3 31.8% 91.4%);
}

.idp-auth-shell .form-control:focus {
	border-color: hsl(221 83% 53%);
	box-shadow: 0 0 0 3px hsl(221 83% 53% / 0.2);
}

.idp-auth-shell h1.h3 {
	font-weight: 600;
	color: hsl(222 47% 11%);
	letter-spacing: -0.02em;
}

.idp-auth-shell .text-center.mb-4 > p,
.idp-auth-shell .form-signin > .text-center > p {
	color: hsl(215.4 16.3% 46.9%);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.idp-auth-shell .alert-danger {
	border-radius: 0.5rem;
	border: 1px solid hsl(0 84% 90%);
	background: hsl(0 84% 97%);
	color: hsl(0 62% 30%);
}

.idp-auth-shell .alert-info {
	border-radius: 0.5rem;
	border: 1px solid hsl(214.3 31.8% 91.4%);
	background: hsl(210 40% 96.1%);
	color: hsl(222 47% 11%);
}

.idp-auth-shell .alert-success {
	border-radius: 0.5rem;
}

header.app-header.navbar {
	background: hsl(221 83% 53%) !important;
	border-bottom: 1px solid hsl(221 83% 40%) !important;
}

header.app-header.navbar .nav-item .nav-link,
header.app-header.navbar .nav-item .dropdown-toggle {
	border-top: none !important;
	border-bottom: none !important;
	padding-top: 1rem !important;
	padding-bottom: 1rem !important;
	transition: opacity 0.15s ease, color 0.15s ease;
}

header.app-header.navbar .nav-link,
header.app-header.navbar .nav-item .dropdown-toggle {
	color: hsl(210 40% 98%) !important;
}

header.app-header.navbar .nav-item .nav-link:hover,
header.app-header.navbar .nav-item .nav-link:focus,
header.app-header.navbar .nav-item .nav-link.active,
header.app-header.navbar .nav-item .dropdown-toggle:hover,
header.app-header.navbar .nav-item .dropdown-toggle:focus {
	color: #fff !important;
	opacity: 0.9;
	border-top: none !important;
	border-color: transparent !important;
}

body,
.idp-auth-shell {
	font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
}

/*
 * main.css sets global a { color: #6fb29a }. Scope portal blue to main content + footer only
 * (header nav stays on rules above; .btn links keep their button colors).
 */
#main-container .app-body a:not(.btn),
#main-container .app-footer a:not(.btn) {
	color: hsl(221 83% 42%);
	text-decoration: none;
}

#main-container .app-body a:not(.btn):hover,
#main-container .app-body a:not(.btn):focus,
#main-container .app-footer a:not(.btn):hover,
#main-container .app-footer a:not(.btn):focus {
	color: hsl(221 83% 36%);
	text-decoration: underline;
}

#main-container .app-body a:not(.btn):focus-visible,
#main-container .app-footer a:not(.btn):focus-visible {
	outline: 2px solid hsl(221 83% 53%);
	outline-offset: 2px;
	text-decoration: underline;
}
