/* Shared two-column auth/register layout: columns, light form side, patterned aside, floating card + gradient bar. */

.sign-in__columns,
.register__columns {
	display: flex;
	min-height: 100vh;
	min-height: 100dvh;
}

/* Geen extra scrollstrip: viewport minus admin bar. body.admin-bar (core); --wp-admin--admin-bar--height op html (core). */
body.admin-bar .sign-in__columns,
body.admin-bar .register__columns {
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px));
}

.sign-in__side,
.register__side {
	flex: 1;
}

.sign-in__side--aside,
.register__side--aside {
	position: relative;
	min-height: 100%;
	overflow: hidden;
	background-color: var(--surface-dark);
	background-image: url("../img/sidebar-pattern.webp");
	background-size: cover;
	background-position: center top;
	background-repeat: no-repeat;
	animation: claryss-sidebar-pan 560s linear infinite;
}

@keyframes claryss-sidebar-pan {
	0%   { background-position: center top; }
	50%  { background-position: center bottom; }
	100% { background-position: center top; }
}

.sign-in__welcome,
.register__information-card {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	box-sizing: border-box;
	width: 792px;
	max-width: calc(100% - 110px);
	/* The welcome / info card is centered with translate(-50%, -50%), so it
	   grows symmetrically around vh/2. The aside-bottom (sphere + support
	   button + legal links) is ~165px tall pinned to the bottom — for the
	   card not to overlap it, its half-height must stay under vh/2 - 165.
	   That gives max-height = vh - 330. Round to 340 for a small visual gap.
	   `body.admin-bar` shifts the aside down by 32px → bump to 372. */
	max-height: calc(100vh - 340px);
	padding: 41px 60px;
	border-radius: 15px;
	background: var(--surface-dark);
	transform: translate(-50%, -50%);
	/* Clip everything at the card edge — the gradient ::after is positioned
	   absolute against this box and must stay anchored at the bottom even
	   while body content scrolls. The actual scroll lives on a flex-child
	   (sign-in__welcome-text below; register has its own info-card-body). */
	overflow: hidden;
}

/* Flex column with one scrollable child so title + body scroll together
   while the absolutely-positioned gradient ::after stays anchored to the
   card's bottom edge. The PHP template wraps both .sign-in__welcome-title
   and .sign-in__welcome-text inside .sign-in__welcome-scroll for this.
   Register already wraps its content in .register__information-card-body. */
.sign-in__welcome {
	display: flex;
	flex-direction: column;
}

.sign-in__welcome-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
}

body.admin-bar .sign-in__welcome,
body.admin-bar .register__information-card {
	max-height: calc(100vh - 372px);
}

/* On laptop-sized viewports the symmetric centring wastes space at the
   bottom. Tighten the buffer (340/372 → 314/346) — the geometric minimum
   that still avoids touching the support sphere — so more body text fits
   inside the card. Big monitors keep the larger comfort gap above. */
@media (max-height: 1000px) {
	.sign-in__welcome,
	.register__information-card {
		/* Tight buffer (326/358) is exactly the symmetric-centring limit —
		   gap to the support sphere is ~6px regardless of viewport. The
		   inner scroll wrapper handles content that doesn't fit. */
		max-height: calc(100vh - 326px);
		/* Tighter padding here too — the same vertical room then fits a few
		   more lines of body text before the inner scroll kicks in. */
		padding: 28px 44px;
		/* Stay vertically centred — bottom-anchoring would put the card too
		   low and the empty space lands above it instead, which reads as
		   "not centred" on bigger laptops. */
	}
	body.admin-bar .sign-in__welcome,
	body.admin-bar .register__information-card {
		max-height: calc(100vh - 358px);
	}
}

/* Always-visible thin scrollbar inside the welcome scroll wrapper so users
   notice there is more to read on very short viewports — macOS hides
   scrollbars at rest by default, and the surrounding inner area can be
   only ~40px tall on a 513px viewport. */
.sign-in__welcome-scroll {
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}

.sign-in__welcome-scroll::-webkit-scrollbar {
	width: 6px;
}

.sign-in__welcome-scroll::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.4);
	border-radius: 3px;
}

.sign-in__welcome-scroll::-webkit-scrollbar-track {
	background: transparent;
}

/* min-height: 442 was forcing the sign-in welcome card past the support
   sphere on shorter viewports. Only apply it when there is room. */
@media (min-height: 850px) {
	.sign-in__welcome {
		min-height: 442px;
	}
}

/* Gradient als 4px “border” onderaan (echte border kan geen linear-gradient) */
.sign-in__welcome::after,
.register__information-card::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	border-radius: 0 0 15px 15px;
	background: var(--Gradient, linear-gradient(
	89deg,
	#090f75 -19.85%,
	#0d1581 -7.47%,
	#141e91 2.42%,
	#1c2ba8 12.32%,
	#1f2eae 14.8%,
	#2252b2 24.69%,
	#2aafbe 49.44%,
	#2edac4 59.34%,
	#2bc3bf 64.29%,
	#1d51a6 91.5%,
	#18249c 103.88%,
	#080e73 145.94%,
	#070d71 200.38%
	));
	pointer-events: none;
}

.sign-in__side--auth,
.register__side--form {
	position: relative;
	min-height: 100%;
	background: var(--gray-50);
}

/* Shared chrome: logo, back button, copyright (auth column), support + legal (aside). Sign in + Register. */

.sign-in__back {
	position: absolute;
	top: 24px;
	left: 55px;
	right: 55px;
	z-index: 2;
	display: flex;
	justify-content: flex-end;
}

/* Los van globale `button` (geen .button): transparant, wit, geen hover-invert */
.sign-in__back-btn {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 14px 18px;
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: #fff;
	text-decoration: none;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: none;
	transition:
		color 0.3s ease,
		border-bottom-color 0.3s ease;
}

.sign-in__back-btn-text,
.sign-in__back-btn-icon {
	display: inline-flex;
	align-items: center;
}

.sign-in__back-btn-icon {
	line-height: 0;
}

.sign-in__back-btn:hover {
	color: var(--primary-400);
	border-bottom-color: var(--primary-400);
	background-color: transparent;
}

.sign-in__back-btn:focus-visible {
	outline: 2px solid var(--primary-400);
	outline-offset: 2px;
}

.sign-in__back-btn svg {
	display: block;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.sign-in__aside-bottom {
	position: absolute;
	bottom: 6px;
	left: 55px;
	right: 55px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 95px;
	box-sizing: border-box;
	padding-top: 32px;
}

@media (min-width: 992px) and (max-height: 899px) {
	.sign-in__aside-bottom {
		gap: 20px;
	}
}

.sign-in__support-inline {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	gap: 30px;
	width: 100%;
}

.sign-in__logo {
	position: absolute;
	top: 24px;
	left: 68px;
	right: 68px;
	z-index: 2;
	text-align: left;
}

.sign-in__logo-link {
	display: inline-block;
	text-decoration: none;
	color: inherit;
}

.sign-in__logo-link:focus-visible {
	outline: 2px solid var(--primary-500);
	outline-offset: 4px;
}

.sign-in__copyright--auth {
	position: absolute;
	bottom: 14px;
	left: 68px;
	right: 68px;
	z-index: 2;
	margin: 0;
	text-align: left;
	font-size: 12px;
	line-height: 20px;
	color: var(--gray-300);
}

.sign-in__logo-img {
	width: auto;
	height: auto;
	max-width: 100%;
}

.sign-in__support-inline-image {
	cursor: pointer;
}

.sign-in__support-inline-img {
	display: block;
	box-sizing: border-box;
	width: 63px;
	height: 63px;
	object-fit: cover;
	border-radius: 50%;
}

.sign-in__legal-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 20px;
}

.sign-in__legal-link {
	font-size: 12px;
	line-height: 20px;
	color: #fff;
	text-decoration: none;
	padding: 8px 10px;
}

.sign-in__legal-link:hover {
	text-decoration: underline;
}

.sign-in__legal-link:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* <=991px: stack the two columns so the right (welcome/marketing) side drops
   below the sign-in form. The aside's children are absolutely positioned, so
   we flow them back into normal layout to give the section a natural height. */
@media (max-width: 991px) {
	.sign-in__columns {
		flex-direction: column;
	}

	.sign-in__columns .sign-in__side {
		flex: none;
	}

	/* Auth side: content-height. Its top/bottom padding still reserves room for
	   the absolutely positioned logo (top) and copyright (bottom). */
	.sign-in .sign-in__side--auth {
		min-height: auto;
	}

	/* Aside drops below and flows its content vertically. */
	.sign-in__side--aside {
		display: flex;
		flex-direction: column;
		min-height: auto;
		padding: 24px 30px 40px;
	}

	.sign-in__back {
		position: static;
		top: auto;
		left: auto;
		right: auto;
		justify-content: flex-end;
		margin-bottom: 16px;
	}

	.sign-in__welcome {
		position: static;
		transform: none;
		top: auto;
		left: auto;
		width: 100%;
		max-width: 100%;
		min-height: auto;
		margin: 0;
	}

	.sign-in__aside-bottom {
		position: static;
		left: auto;
		right: auto;
		bottom: auto;
		gap: 24px;
		margin-top: 24px;
		padding-top: 24px;
	}
}

/* Mobile (<=767px): tighten the auth-side gutters from 68px to 30px
   (logo, form card and copyright). */
@media (max-width: 767px) {
	.sign-in__logo,
	.sign-in__copyright--auth {
		left: 30px;
		right: 30px;
	}

	/* Higher specificity (.sign-in prefix) so this beats the base
	   .sign-in__login-block rule in blocks/sign-in/style.css, which loads
	   after this file. Keeps the 400px width; on a phone the cap yields
	   30px gutters. */
	.sign-in .sign-in__login-block {
		max-width: calc(100% - 60px);
	}

	/* The form is vertically centered (margin:auto), so growing the bottom
	   padding just adds space above it. Instead, flow the copyright into normal
	   layout right under the form with a fixed gap, and stop the form from
	   stretching to centre. */
	.sign-in .sign-in__side--auth {
		padding-bottom: 40px;
	}

	.sign-in .sign-in__login-block {
		margin-top: 0;
		margin-bottom: 0;
	}

	.sign-in__copyright--auth {
		position: static;
		left: auto;
		right: auto;
		bottom: auto;
		align-self: stretch;
		margin-top: 40px;
		padding-left: 30px;
		padding-right: 30px;
		text-align: center;
	}
}
