/* ============================================================
   Kenklin — Auth (Sign In + Sign Up)
   Loaded ONLY on the /sign-in/ and /sign-up/ page templates.
   These pages render as bare HTML (no site header / footer) so
   the styles here drive the entire visible layout.
   ============================================================ */

/* ---------- Bare-page baseline ---------- */

body.kk-auth-page {
	margin: 0;
	background-color: var(--kk-background);
	color: var(--kk-on-background);
	font-family: var(--kk-font-body);
}

/* If anything sneaks past the template (e.g. an admin bar fragment or
   a plugin appending into the body), make sure the global site chrome
   from Blocksy stays hidden on the auth surface. */
body.kk-auth-page #masthead,
body.kk-auth-page .site-header,
body.kk-auth-page #colophon,
body.kk-auth-page .site-footer,
body.kk-auth-page .kk-header,
body.kk-auth-page .kk-footer,
body.kk-auth-page .kk-mobile-nav { display: none !important; }

/* ---------- Layout ---------- */

.kk-auth {
	display: grid;
	grid-template-columns: 1fr;
	min-height: 100vh;
}

@media (min-width: 1024px) {
	.kk-auth { grid-template-columns: 1fr 1fr; }
}

body.admin-bar .kk-auth { min-height: calc(100vh - 32px); }

@media (max-width: 782px) {
	body.admin-bar .kk-auth { min-height: calc(100vh - 46px); }
}

/* ---------- Left column ---------- */

.kk-auth__form-col {
	display: flex;
	flex-direction: column;
	padding: 32px 24px 56px;
}

@media (min-width: 768px) {
	.kk-auth__form-col { padding: 40px 40px 64px; }
}

@media (min-width: 1024px) {
	.kk-auth__form-col { padding: 40px 64px 80px; }
}

/* KENKLIN wordmark — replaces the site header on auth pages. */
.kk-auth__wordmark {
	align-self: flex-start;
	margin-bottom: 40px;
	font-family: var(--kk-font-display);
	font-size: 20px;
	line-height: 1;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--kk-on-background);
	text-decoration: none;
}

@media (min-width: 1024px) {
	.kk-auth__wordmark { margin-bottom: 64px; }
}

.kk-auth__wordmark:hover { opacity: 0.65; }

.kk-auth__form-inner {
	width: 100%;
	max-width: 480px;
	margin-inline: auto;
}

@media (min-width: 1024px) {
	.kk-auth__form-inner { margin-inline: 0; }
}

/* ---------- Head ---------- */

.kk-auth__head { margin-bottom: 32px; }

.kk-auth__title {
	margin: 0 0 12px;
	font-family: var(--kk-font-display);
	font-size: 36px;
	line-height: 1.05;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--kk-on-background);
}

@media (min-width: 768px) {
	.kk-auth__title { font-size: 40px; }
}

.kk-auth__subtitle {
	margin: 0;
	font-family: var(--kk-font-body);
	font-size: 15px;
	line-height: 1.6;
	color: var(--kk-on-surface-variant);
}

/* ---------- One-shot notice (e.g. ?logged_out=1) ---------- */

.kk-auth__notice {
	margin: 0 0 16px;
	padding: 12px 16px;
	background-color: var(--kk-surface-container-low);
	border-left: 2px solid var(--kk-on-background);
	color: var(--kk-on-background);
	font-size: 13px;
}

/* ---------- Google sign-in / placeholder ---------- */

.kk-auth__social {
	margin: 0 0 24px;
}

.kk-auth__social:empty { display: none; }

/* Nextend renders into .kk-auth__social when active — coerce its
   stock markup so it matches the theme's button design system. */
.kk-auth__social .nsl-container,
.kk-auth__social .nsl-container-buttons,
.kk-auth__social .nsl-container-block { margin: 0 !important; padding: 0 !important; }

.kk-auth__social .nsl-button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100% !important;
	height: 56px !important;
	min-height: 56px !important;
	margin: 0 !important;
	padding: 0 24px !important;
	background-color: #ffffff !important;
	color: var(--kk-on-background) !important;
	border: 1px solid var(--kk-on-background) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-family: var(--kk-font-body) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	letter-spacing: 0.05em !important;
	text-transform: none !important;
}

.kk-auth__social .nsl-button:hover {
	background-color: var(--kk-surface-container-low) !important;
}

/* ---------- "or" divider ---------- */

.kk-auth__divider {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 24px;
	font-family: var(--kk-font-body);
	font-size: 12px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--kk-on-surface-variant);
}

.kk-auth__divider::before,
.kk-auth__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background-color: var(--kk-hairline);
}

/* ---------- Form fields ---------- */

.kk-auth__form-element {
	display: block;
	margin: 0;
	padding: 0;
}

.kk-auth__field {
	margin: 0 0 20px;
}

.kk-auth__field label {
	display: block;
	margin-bottom: 8px;
	font-family: var(--kk-font-body);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--kk-on-surface-variant);
}

.kk-auth__field input[type="text"],
.kk-auth__field input[type="email"],
.kk-auth__field input[type="password"] {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	background-color: var(--kk-surface);
	border: 1px solid var(--kk-outline);
	border-radius: 0;
	box-shadow: none;
	font-family: var(--kk-font-body);
	font-size: 16px; /* 16px keeps iOS from auto-zooming on focus */
	line-height: 1.2;
	color: var(--kk-on-surface);
	outline: none;
}

.kk-auth__field input:focus {
	border-color: var(--kk-on-surface);
	outline: none;
}

/* Reserve room for the eye toggle inside the password rectangle. */
.kk-auth__password-wrap input[type="password"],
.kk-auth__password-wrap input[type="text"] {
	padding-right: 52px;
}

/* Field row for the sign-up first/last name layout. */
.kk-auth__field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 480px) {
	.kk-auth__field-row { grid-template-columns: 1fr; }
}

/* Helper text under a field (e.g. password requirements). */
.kk-auth__hint {
	margin: 6px 0 0;
	font-family: var(--kk-font-body);
	font-size: 12px;
	line-height: 1.4;
	color: var(--kk-on-surface-variant);
}

/* Password show/hide eye button. */
.kk-auth__password-wrap { position: relative; }

.kk-auth__password-toggle {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	padding: 0;
	background: transparent;
	border: 0;
	color: var(--kk-on-surface-variant);
	cursor: pointer;
}

.kk-auth__password-toggle:hover { color: var(--kk-on-background); }

/* Forgot-password link sits under the password row, right-aligned. */
.kk-auth__lost {
	margin: 8px 0 16px;
	text-align: right;
}

.kk-auth__lost a {
	font-family: var(--kk-font-body);
	font-size: 13px;
	color: var(--kk-on-surface-variant);
	text-decoration: none;
}

.kk-auth__lost a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Checkbox row (remember me / marketing) ---------- */

.kk-auth__check {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 24px;
	font-family: var(--kk-font-body);
	font-size: var(--kk-body-md-size);
	line-height: var(--kk-body-md-line-height);
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--kk-on-surface-variant);
	cursor: pointer;
}

.kk-auth__check span {
	text-transform: none;
	letter-spacing: 0;
}

.kk-auth__check input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--kk-on-background);
}

/* ---------- Submit ---------- */

.kk-auth__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 56px;
	margin: 0;
	padding: 0 24px;
	background-color: var(--kk-primary);
	color: var(--kk-on-primary);
	border: 1px solid var(--kk-primary);
	border-radius: 0;
	font-family: var(--kk-font-body);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease;
}

.kk-auth__submit:hover {
	background-color: var(--kk-on-primary);
	color: var(--kk-primary);
}

/* ---------- Terms / Privacy line (sign-up, below Continue) ---------- */

.kk-auth__terms {
	margin: 16px 0 0;
	font-family: var(--kk-font-body);
	font-size: var(--kk-body-md-size);
	line-height: var(--kk-body-md-line-height);
	color: var(--kk-on-surface-variant);
}

.kk-auth__terms a {
	color: var(--kk-on-surface-variant);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.kk-auth__terms a:hover { color: var(--kk-on-background); }

/* ---------- Switch (between sign-in / sign-up) ---------- */

.kk-auth__switch {
	margin: 16px 0 0;
	font-family: var(--kk-font-body);
	font-size: var(--kk-body-md-size);
	color: var(--kk-on-surface-variant);
}

.kk-auth__switch a {
	color: var(--kk-on-background);
	text-decoration: underline;
	text-underline-offset: 3px;
	font-weight: 500;
}

.kk-auth__switch a:hover { opacity: 0.65; }

/* ---------- WooCommerce notice override (login errors etc.) ---------- */

.kk-auth__form .woocommerce-error,
.kk-auth__form .woocommerce-message,
.kk-auth__form .woocommerce-info {
	list-style: none;
	margin: 0 0 16px;
	padding: 12px 16px;
	background-color: var(--kk-surface-container-low);
	border: 0;
	border-left: 2px solid var(--kk-error);
	border-radius: 0;
	font-size: 13px;
	color: var(--kk-on-background);
}

.kk-auth__form .woocommerce-message { border-left-color: var(--kk-on-background); }

/* ---------- Right column (editorial image) ----------
 * The image lives at /assets/images/signin.png. Rendered via an
 * <img> tag inside .kk-auth__media so the browser handles decoding,
 * lazy/eager hints, and accessibility correctly. */

.kk-auth__media {
	display: none;
	position: relative;
	overflow: hidden;
	background-color: #efe8de; /* warm fallback while the image loads */
}

@media (min-width: 1024px) {
	.kk-auth__media { display: block; }
}

.kk-auth__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
