/* ============================================================
   SKG.EDUCATION - auth.css
   Component styles for the account pages: /register/ and /login/.
   Loaded only on those two pages (see inc/enqueue.php). Depends on
   main.css for the Momentum tokens and the .skg-eyebrow component.

   Both pages run off the slug-based page-register.html /
   page-login.html templates. Each lays out a two-column split:
   a navy brand panel (.skg-auth-aside) beside the form column
   (.skg-auth-formcol), which renders the page's TutorLMS form
   through wp:post-content. The rules below also reskin that
   TutorLMS markup - inputs, labels, checkboxes - into the brand.

   Design source: demos/17-momentum-final.html
   ============================================================ */

/* ============ TWO-COLUMN SHELL ============ */
.skg-auth {
	display: grid;
	grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
	align-items: stretch;
}

/* ============ BRAND PANEL (left) ============ */
.skg-auth-aside {
	position: relative;
	overflow: hidden;
	margin: 0;
	background: var(--skg-navy);
	border-right: 3px solid var(--skg-navy);
	display: flex;
	align-items: center;
	/* Hug the centre divider: on wide monitors the columns grow but
	   the brand text stays near the form instead of drifting to the
	   far edge. The form column is left-aligned to match. */
	justify-content: flex-end;
	padding: clamp(48px, 6vw, 88px) clamp(28px, 4.4vw, 72px);
}
/* Soft blurred orbs, echoing the homepage hero. */
.skg-auth-aside::before,
.skg-auth-aside::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	filter: blur(90px);
	opacity: .4;
	z-index: 0;
}
.skg-auth-aside::before {
	width: 440px; height: 440px;
	background: var(--skg-blue);
	top: -160px; left: -140px;
}
.skg-auth-aside::after {
	width: 380px; height: 380px;
	background: var(--skg-orange);
	bottom: -160px; right: -120px;
}
.skg-auth-aside-inner {
	position: relative;
	z-index: 1;
	max-width: 460px;
}
.skg-auth-aside .skg-eyebrow { margin-bottom: 22px; }
.skg-auth-headline {
	color: #fff;
	font-size: clamp(2.1rem, 3.4vw, 3.1rem);
	font-weight: 900;
	letter-spacing: -.03em;
	line-height: 1.08;
	margin: 0 0 18px;
}
.skg-auth-lead {
	color: #aab4c6;
	font-size: 1.05rem;
	font-weight: 500;
	line-height: 1.65;
	margin: 0 0 32px;
}

/* Benefit list with an orange check badge. */
.skg-auth-points {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.skg-auth-points li {
	position: relative;
	padding-left: 40px;
	color: #e7eaf0;
	font-size: .98rem;
	font-weight: 600;
	line-height: 1.5;
}
.skg-auth-points li::before {
	content: "";
	position: absolute;
	left: 0; top: 0;
	width: 26px; height: 26px;
	border-radius: 8px;
	background: var(--skg-orange);
}
.skg-auth-points li::after {
	content: "";
	position: absolute;
	left: 9px; top: 5px;
	width: 7px; height: 12px;
	border: solid var(--skg-navy);
	border-width: 0 3px 3px 0;
	transform: rotate(45deg);
}

/* ============ FORM COLUMN (right) ============ */
.skg-auth-formcol {
	margin: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background: #fff;
	padding: clamp(48px, 5vw, 80px) clamp(24px, 4vw, 56px);
}
.skg-auth-formcol > * {
	width: 100%;
	max-width: 520px;
	/* Left-aligned so the form hugs the centre divider next to the
	   brand panel (centred again on stacked mobile - see RESPONSIVE). */
	margin-inline: 0;
}

.skg-auth-formhead { margin-bottom: 28px; }
.skg-auth-formhead h2 {
	font-size: clamp(1.7rem, 2.6vw, 2.2rem);
	font-weight: 900;
	letter-spacing: -.025em;
	color: var(--skg-navy);
	margin: 0 0 8px;
}
.skg-auth-formhead p {
	color: var(--skg-muted);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.6;
	margin: 0;
}

/* "Already have an account?" / sign-in alt line below the form. */
.skg-auth-alt {
	margin: 22px 0 0;
	padding-top: 22px;
	border-top: 2px solid var(--skg-line);
	text-align: center;
	font-size: .95rem;
	font-weight: 600;
	color: var(--skg-muted);
}
.skg-auth-alt a {
	color: var(--skg-blue-deep);
	font-weight: 800;
	text-decoration: none;
}
.skg-auth-alt a:hover { color: var(--skg-orange); }

/* Strip the wp:post-content wrapper styling - the form column is
   already the panel, so the form sits flush inside it. */
.skg-auth-formcol .entry-content {
	margin-block: 0;
	padding: 0;
}
.skg-auth-formcol .entry-content > * { max-width: none; margin-inline: 0; }
.skg-auth-formcol .tutor-wrap,
.skg-auth-formcol .tutor-page-wrap {
	max-width: none;
	margin: 0;
	padding: 0;
}

/* TutorLMS boxes the form in shadowed / padded inner wrappers
   (#tutor-registration-wrap, .tutor-login-wrap, .tutor-login-form-
   wrapper). Drop them - the white form column is the surface, so
   the form sits flush with no double-boxing and no stray gap. */
.skg-auth #tutor-registration-wrap,
.skg-auth .tutor-login-wrap,
.skg-auth .tutor-login-form-wrapper {
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}
.skg-auth #tutor-registration-form { padding: 0; }

/* Username is not a separate credential here - accounts use the
   email as the username (skg-core mirrors email -> user_login, and
   page-register.html drops the field's `required` flag). Hide the
   User Name field and let E-Mail take the full row width. */
.skg-auth .tutor-form-col-6:has(input[name="user_login"]) { display: none; }
.skg-auth .tutor-form-col-6:has(input[name="email"]) { flex-basis: 100%; }

/* ============ TUTORLMS FORM RESKIN (shared) ============ */
/* Field rows: a flexible two-up grid. */
.skg-auth .tutor-form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0 18px;
	margin: 0;
}
.skg-auth .tutor-form-col-6 {
	flex: 1 1 calc(50% - 9px);
	min-width: 190px;
	max-width: 100%;
}
.skg-auth .tutor-form-col-12 { flex: 1 1 100%; }
.skg-auth .tutor-form-group { margin-bottom: 16px; }

/* Field labels. */
.skg-auth .tutor-form-group > label,
.skg-auth .tutor-password-field > label {
	display: block;
	font-size: .82rem;
	font-weight: 800;
	color: var(--skg-navy);
	margin-bottom: 7px;
	letter-spacing: -.005em;
}

/* Text / email / password inputs. */
.skg-auth #tutor-registration-form input[type="text"],
.skg-auth #tutor-registration-form input[type="email"],
.skg-auth #tutor-registration-form input[type="password"],
.skg-auth #tutor-login-form input[type="text"],
.skg-auth #tutor-login-form input[type="password"],
.skg-auth #tutor-login-form .tutor-form-control,
.skg-auth .tutor-ResetPassword input[type="text"],
.skg-auth .tutor-ResetPassword input[type="password"] {
	width: 100%;
	font: inherit;
	font-size: .97rem;
	padding: 13px 16px;
	margin: 0;
	border: 2.5px solid var(--skg-line);
	border-radius: var(--skg-r-sm);
	background: #fff;
	color: var(--skg-ink);
	transition: border-color .14s ease, box-shadow .14s ease;
}
.skg-auth #tutor-registration-form input::placeholder,
.skg-auth #tutor-login-form input::placeholder { color: #9aa3b2; }
.skg-auth #tutor-registration-form input[type="text"]:focus,
.skg-auth #tutor-registration-form input[type="email"]:focus,
.skg-auth #tutor-registration-form input[type="password"]:focus,
.skg-auth #tutor-login-form input[type="text"]:focus,
.skg-auth #tutor-login-form input[type="password"]:focus,
.skg-auth #tutor-login-form .tutor-form-control:focus,
.skg-auth .tutor-ResetPassword input[type="text"]:focus,
.skg-auth .tutor-ResetPassword input[type="password"]:focus {
	outline: none;
	border-color: var(--skg-blue);
	box-shadow: 0 0 0 3px rgba(27, 152, 219, .16);
}

/* Password field: leave room for TutorLMS's show/hide eye toggle. */
.skg-auth #tutor-registration-form input[type="password"] { padding-right: 44px; }
.skg-auth .tutor-password-strength-checker { margin-bottom: 0; }
.skg-auth .tutor-password-strength-hint { margin-top: 8px; }

/* Checkbox rows (newsletter + terms on register, remember-me on
   login). TutorLMS lays these out with .tutor-d-flex utilities;
   align the box to the first line of a wrapping label. */
.skg-auth .tutor-d-flex.tutor-gap-1 {
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 14px;
}
.skg-auth .tutor-form-check { margin-bottom: 14px; }
.skg-auth .tutor-d-flex.tutor-gap-1 label,
.skg-auth .tutor-form-check label {
	font-size: .9rem;
	font-weight: 500;
	color: var(--skg-muted);
	line-height: 1.5;
	margin: 0;
}
.skg-auth .tutor-d-flex.tutor-gap-1 input[type="checkbox"],
.skg-auth .tutor-form-check input[type="checkbox"] {
	width: 19px;
	height: 19px;
	flex: none;
	margin: 1px 0 0;
	accent-color: var(--skg-blue-deep);
	cursor: pointer;
}
.skg-auth .tutor-d-flex.tutor-gap-1 a,
.skg-auth .tutor-form-check a {
	color: var(--skg-blue-deep);
	font-weight: 700;
}
.skg-auth .tutor-d-flex.tutor-gap-1 a:hover { color: var(--skg-orange); }

/* Primary submit: tutor.css already paints .tutor-btn-primary the
   brand orange pill; just give it room and a confident size. */
.skg-auth #tutor-registration-form .tutor-btn-primary,
.skg-auth #tutor-login-form .tutor-btn-primary {
	margin-top: 10px;
	padding: 15px 30px;
	font-size: 1.02rem;
}

/* reCAPTCHA badge sits a touch tighter to the fields. */
.skg-auth .g-recaptcha { margin-bottom: 4px; }

/* ============ LOGIN-SPECIFIC ============ */
/* The TutorLMS login template prints its own English "Hi, Welcome
   back!" greeting - redundant beside the brand panel and off-brand.
   The Greek .skg-auth-formhead heading replaces it. */
.skg-auth .tutor-login-wrap .tutor-fs-5.tutor-color-black.tutor-mb-32 {
	display: none;
}
.skg-auth .tutor-login-form-wrapper { max-width: none; }

/* TutorLMS forces .tutor-form-control's border with !important, so
   the login inputs need !important to take the Momentum treatment
   (the register inputs carry no such class and style cleanly). */
.skg-auth #tutor-login-form .tutor-form-control {
	border: 2.5px solid var(--skg-line) !important;
	border-radius: var(--skg-r-sm) !important;
	background: #fff !important;
}
.skg-auth #tutor-login-form .tutor-form-control:focus {
	border-color: var(--skg-blue) !important;
}

/* "Keep me signed in" + "Forgot Password?" row. */
.skg-auth #tutor-login-form .tutor-justify-between {
	margin-bottom: 22px;
	gap: 14px;
}
.skg-auth #tutor-login-form .tutor-btn-ghost {
	padding: 0;
	font-weight: 800;
	font-size: .9rem;
	color: var(--skg-blue-deep);
}
.skg-auth #tutor-login-form .tutor-btn-ghost:hover { color: var(--skg-orange); }

/* "Don't have an account? Register Now" line. */
.skg-auth #tutor-login-form .tutor-text-center {
	margin-top: 20px;
	font-size: .95rem;
	font-weight: 600;
	color: var(--skg-muted);
}
.skg-auth #tutor-login-form .tutor-btn-link {
	color: var(--skg-blue-deep);
	font-weight: 800;
	padding: 0;
}
.skg-auth #tutor-login-form .tutor-btn-link:hover { color: var(--skg-orange); }

.skg-auth .tutor-login-error:not(:empty) { margin-bottom: 16px; }

/* ============ FORGOT-PASSWORD SPECIFIC ============ */
/* TutorLMS's retrieve / reset templates print their own instruction
   <p> (and the lost-password one mentions "username"). The Greek
   .skg-auth-formhead copy covers it, so hide it. */
.skg-auth .tutor-ResetPassword > p { display: none; }

/* The reset buttons carry no .tutor-btn-block - make them full
   width so they match the login / register submit. */
.skg-auth .tutor-ResetPassword .tutor-btn-primary {
	width: 100%;
	justify-content: center;
	margin-top: 10px;
	padding: 15px 30px;
	font-size: 1.02rem;
}
.skg-auth .tutor-ResetPassword .tutor-form-group { margin-bottom: 16px; }

/* TutorLMS alert (e.g. "check your email") - give it a little room. */
.skg-auth .tutor-ResetPassword .tutor-alert,
.skg-auth .tutor-ResetPassword .tutor-alert-warning,
.skg-auth .tutor-ResetPassword .tutor-alert-success { margin-bottom: 18px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
	/* minmax(0,1fr) (not bare 1fr) + min-width:0 lets the stacked columns
	   shrink to the viewport. Bare 1fr keeps an implicit min-content floor,
	   which was blowing the column out to ~448px on phones (horizontal scroll). */
	.skg-auth { grid-template-columns: minmax(0, 1fr); }
	.skg-auth-aside, .skg-auth-formcol { min-width: 0; }
	.skg-auth-aside {
		border-right: 0;
		border-bottom: 3px solid var(--skg-navy);
		padding: clamp(40px, 9vw, 60px) 28px;
	}
	.skg-auth-aside-inner { max-width: 540px; margin-inline: auto; }
	/* Stacked layout: re-centre the form column content. */
	.skg-auth-formcol > * { margin-inline: auto; }
	/* Trim the benefit list on small screens - the form is the focus. */
	.skg-auth-points { gap: 12px; }
}
@media (max-width: 460px) {
	.skg-auth .tutor-form-col-6 { flex: 1 1 100%; }
	.skg-auth #tutor-login-form .tutor-justify-between {
		flex-direction: column;
		align-items: flex-start;
	}
}
