/************************************************
	Sign-in, password reset link and new password screens.

	Prefixed .auth- because layouts.auth is shared with other views.
	Colours come from the --kuido-* variables in main.css.
************************************************/

.auth {
	--auth-ink: #231f20;
	--auth-grey: #5f676b;
	--auth-border: #e3e7e5;
	--auth-bg: #f6f8f7;
	--auth-error: #b92b23;
	--auth-error-bg: #fbebea;

	position: relative;
	min-height: 100vh;
	padding: 56px 20px 64px;
	overflow: hidden;
	background: var(--auth-bg);
	color: var(--auth-ink);
	font-family: "Open Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

.auth *,
.auth *::before,
.auth *::after {
	box-sizing: border-box;
}

/* Translucent background shapes and the green stripe */
.auth::before,
.auth::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.auth::before {
	width: 560px;
	height: 560px;
	left: -190px;
	top: -230px;
	background: radial-gradient(circle, rgba(var(--kuido-brand-rgb), .09), rgba(var(--kuido-brand-rgb), 0) 68%);
}

.auth::after {
	width: 720px;
	height: 720px;
	right: -260px;
	bottom: -300px;
	background: radial-gradient(circle, rgba(var(--kuido-brand-rgb), .07), rgba(var(--kuido-brand-rgb), 0) 70%);
}

.auth-stripe {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	height: 6px;
	background: var(--kuido-brand);
	z-index: 1;
}

.auth-canvas {
	position: relative;
	z-index: 2;
	max-width: 1180px;
	margin: 0 auto;
}

.auth-canvas.is-narrow {
	max-width: 480px;
}

/* ------------------------------------------------------------------- card */
.auth-card {
	display: flex;
	align-items: stretch;
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	border-bottom: 4px solid var(--kuido-brand);
	box-shadow: 0 24px 48px -24px rgba(35, 31, 32, .22), 0 2px 6px rgba(35, 31, 32, .05);
}

.auth-box {
	position: relative;
	flex: 0 0 440px;
	width: 440px;
	padding: 44px 48px 40px;
}

/* thin vertical green line between the two columns */
.auth-box.has-panel::after {
	content: "";
	position: absolute;
	top: 48px;
	bottom: 48px;
	right: 0;
	width: 1px;
	background: linear-gradient(180deg, rgba(var(--kuido-brand-rgb), 0), var(--kuido-brand) 22%, var(--kuido-brand) 78%, rgba(var(--kuido-brand-rgb), 0));
}

.auth-canvas.is-narrow .auth-box {
	flex: 1 1 auto;
	width: auto;
}

.auth-logo {
	display: inline-block;
	margin-bottom: 26px;
}

.auth-logo img {
	display: block;
	height: 52px;
	width: auto;
}

.auth-header {
	text-align: center;
	margin-bottom: 26px;
}

.auth-header img {
	height: 64px;
	width: auto;
}

.auth-accent {
	width: 40px;
	height: 4px;
	border-radius: 2px;
	background: var(--kuido-brand);
	margin-bottom: 16px;
}

.auth-title {
	margin: 0;
	font-size: 30px;
	font-weight: 300;
	line-height: 1.15;
	letter-spacing: -.01em;
	color: var(--auth-ink);
}

.auth-title b {
	font-weight: 700;
	color: var(--kuido-action);
}

.auth-subtitle {
	margin: 7px 0 26px;
	font-size: .9rem;
	color: var(--auth-grey);
}

.auth-subtitle b {
	font-weight: 700;
	color: var(--kuido-action);
}

/* ----------------------------------------------------------------- fields */
.auth-field {
	margin-bottom: 18px;
}

.auth-label {
	display: block;
	margin-bottom: 7px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--auth-grey);
}

.auth-control {
	display: flex;
	align-items: stretch;
	height: 46px;
	background: #ffffff;
	border: 1px solid var(--auth-border);
	border-radius: 5px;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-control:focus-within {
	border-color: var(--kuido-brand);
	box-shadow: 0 0 0 3px var(--kuido-focus);
}

.auth-icon {
	flex: 0 0 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--auth-grey);
	background: #fafbfa;
	border-right: 1px solid var(--auth-border);
	border-radius: 4px 0 0 4px;
}

.auth-control:focus-within .auth-icon {
	color: var(--kuido-action);
	border-right-color: var(--kuido-brand);
}

.auth-icon svg,
.auth-reveal svg,
.auth-button svg,
.auth-support svg,
.auth-back svg,
.auth-notice svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
	flex: 0 0 auto;
}

.auth-control input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0 14px;
	border: 0;
	background: transparent;
	color: var(--auth-ink);
	font: inherit;
	font-size: .9rem;
	outline: none;
}

.auth-control input::placeholder {
	color: #8a9296;
}

/* show/hide password button */
.auth-reveal {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	padding: 0 14px;
	border: 0;
	background: transparent;
	color: var(--auth-grey);
	cursor: pointer;
	border-radius: 0 4px 4px 0;
}

.auth-reveal:hover {
	color: var(--kuido-action);
}

.auth-reveal:focus-visible {
	outline: 2px solid var(--kuido-brand);
	outline-offset: -2px;
}

.auth-reveal .hide-icon {
	display: none;
}

.auth-reveal[aria-pressed="true"] .reveal-icon {
	display: none;
}

.auth-reveal[aria-pressed="true"] .hide-icon {
	display: block;
}

.auth-hint {
	margin: 7px 0 0;
	font-size: .8rem;
	color: var(--auth-grey);
}

.auth-hint.auth-resend {
	margin: 0 0 18px;
}

/* error next to the field */
.auth-control.is-error {
	border-color: var(--auth-error);
}

.auth-control.is-error .auth-icon {
	color: var(--auth-error);
	border-right-color: var(--auth-error);
}

.auth-control.is-error:focus-within {
	border-color: var(--auth-error);
	box-shadow: 0 0 0 3px rgba(185, 43, 35, .18);
}

.auth-error {
	display: flex;
	gap: 6px;
	align-items: flex-start;
	margin: 7px 0 0;
	font-size: .8rem;
	font-weight: 600;
	color: var(--auth-error);
}

/* password rules, checked as the user types */
.auth-rules {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
}

.auth-rules li {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: .8rem;
	color: var(--auth-grey);
}

.auth-rules li::before {
	content: "";
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 1.5px solid #b5bdb9;
	background: #ffffff center / 10px no-repeat;
}

.auth-rules li.passes {
	color: var(--kuido-action);
	font-weight: 600;
}

.auth-rules li.passes::before {
	border-color: var(--kuido-action);
	background-color: var(--kuido-action);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
}

.auth-rules li.fails {
	color: var(--auth-error);
}

.auth-rules li.fails::before {
	border-color: var(--auth-error);
}

/* ------------------------------------------------------- links and button */
.auth-row {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin: 4px 0 22px;
}

.auth-link,
.auth a.auth-link {
	font-size: .85rem;
	font-weight: 600;
	color: var(--kuido-action);
	text-decoration: none;
}

.auth-link:hover {
	text-decoration: underline;
	color: var(--kuido-action-hover);
}

.auth-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 48px;
	border: 0;
	border-radius: 30px;
	background: var(--kuido-action);
	color: #ffffff;
	font-family: inherit;
	font-size: .95rem;
	font-weight: 600;
	letter-spacing: .01em;
	cursor: pointer;
	box-shadow: 0 8px 18px -10px rgba(15, 122, 44, .85);
	transition: background-color .15s ease;
}

.auth-button:hover {
	background: var(--kuido-action-hover);
}

.auth-button:focus-visible {
	outline: 2px solid var(--kuido-brand);
	outline-offset: 3px;
}

.auth-button[disabled] {
	opacity: .7;
	cursor: wait;
}

.auth-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 20px;
	font-size: .85rem;
	font-weight: 600;
	color: var(--kuido-action);
	text-decoration: none;
}

.auth-back:hover {
	text-decoration: underline;
	color: var(--kuido-action-hover);
}

.auth-divider {
	height: 1px;
	margin: 26px 0 18px;
	background: var(--auth-border);
}

.auth-legal {
	margin: 0;
	font-size: .7875rem;
	line-height: 1.65;
	color: var(--auth-grey);
}

.auth-legal a,
.auth-support a,
.auth-cookies a {
	color: var(--kuido-action);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.auth-support {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 16px 0 0;
	font-size: .8125rem;
	color: var(--auth-grey);
}

.auth-support svg {
	fill: var(--kuido-brand);
	width: 15px;
	height: 15px;
}

.auth-support a {
	font-weight: 600;
	text-decoration: none;
}

/* ----------------------------------------------------------------- alerts */
.auth-notice {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-bottom: 20px;
	padding: 12px 16px;
	border-radius: 6px;
	font-size: .85rem;
	line-height: 1.55;
}

.auth-notice.is-error {
	background: var(--auth-error-bg);
	border: 1px solid #f1c9c6;
	border-left: 3px solid var(--auth-error);
	color: #7c1d17;
}

.auth-notice.is-success {
	background: var(--kuido-brand-bg);
	border: 1px solid #c3e2cc;
	border-left: 3px solid var(--kuido-action);
	color: #0b5a21;
}

.auth-notice svg {
	margin-top: 1px;
}

.auth-cookies {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin-top: 18px;
	padding: 13px 16px;
	background: #f1f3f2;
	border: 1px solid var(--auth-border);
	border-left: 3px solid var(--auth-grey);
	border-radius: 6px;
	font-size: .8125rem;
	line-height: 1.6;
	color: #545c60;
}

.auth-cookies p {
	margin: 0;
}

.auth-cookies svg {
	width: 16px;
	height: 16px;
	fill: #545c60;
	flex: 0 0 16px;
	margin-top: 2px;
}

/* ------------------------------------------------------------ brand panel */
.auth-panel {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	padding: 48px 48px 40px;
	overflow: hidden;
	background: linear-gradient(158deg, #f4fbf7 0%, #e9f6ee 100%);
}

.auth-panel::before,
.auth-panel::after {
	content: "";
	position: absolute;
	border-radius: 50%;
}

.auth-panel::before {
	width: 260px;
	height: 260px;
	right: -70px;
	top: -90px;
	background: rgba(255, 255, 255, .55);
}

.auth-panel::after {
	width: 150px;
	height: 150px;
	right: 120px;
	bottom: -60px;
	background: rgba(var(--kuido-brand-rgb), .07);
}

.auth-panel-body {
	position: relative;
	z-index: 1;
}

.auth-tab {
	margin: 0 0 12px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--kuido-action);
}

.auth-tagline {
	max-width: 520px;
	margin: 0 0 26px;
	font-size: 29px;
	font-weight: 300;
	line-height: 1.28;
	color: var(--auth-ink);
}

.auth-tagline b {
	font-weight: 700;
	color: var(--kuido-action);
}

/* framed carousel (partials.default-banners-slider) */
.auth-banner .carousel {
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid rgba(var(--kuido-brand-rgb), .22);
	box-shadow: 0 14px 30px -18px rgba(35, 31, 32, .35);
	background: #ffffff;
}

.auth-banner .carousel-indicators {
	margin-bottom: 10px;
}

.auth-banner .carousel-indicators [data-bs-target] {
	width: 26px;
	height: 4px;
	border: 0;
	border-radius: 2px;
	background-color: var(--kuido-brand);
	opacity: .35;
}

.auth-banner .carousel-indicators .active {
	width: 38px;
	opacity: 1;
}

/* ---------------------------------------------------------------- screens */
@media (max-width: 991px) {
	.auth-box {
		flex-basis: 400px;
		width: 400px;
		padding: 40px 36px 36px;
	}

	.auth-panel {
		padding: 40px 32px 32px;
	}

	.auth-tagline {
		font-size: 24px;
	}
}

/* Below 768px the brand panel is hidden, so the form fits on the screen. */
@media (max-width: 767px) {
	.auth {
		padding: 28px 16px 48px;
	}

	.auth-panel {
		display: none;
	}

	.auth-box,
	.auth-canvas.is-narrow .auth-box {
		flex: 1 1 auto;
		width: auto;
		padding: 32px 24px 28px;
	}

	.auth-box.has-panel::after {
		display: none;
	}

	.auth-title {
		font-size: 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.auth-control,
	.auth-button {
		transition: none;
	}
}
