/* LearnHive native WordPress authentication
   Keep these rules inside the account card so community pages retain their
   own BuddyPress navigation, forms, and feedback styling. */
.lh-account-card {
	--lh-auth-ink: #1f2937;
	--lh-auth-muted: #626779;
	--lh-auth-line: #e7e5f0;
	--lh-auth-indigo: #4338ca;
	--lh-auth-soft: #f6f5ff;
	width: min(100%, 460px);
	max-width: 460px;
	margin-inline: auto;
	padding: 32px;
	border: 1px solid var(--lh-auth-line);
	border-radius: 18px;
	background: #fffefa;
	box-shadow: 0 18px 44px rgba(30, 27, 58, .09);
	color: var(--lh-auth-ink);
	font-family: var(--lh-font-body, system-ui, sans-serif);
	font-size: 15px;
	line-height: 1.55;
}

.lh-auth-section {
	padding-block: clamp(38px, 6vw, 68px);
	background: var(--lh-cream, #fbf7f0);
}

.lh-auth-section > .lh-wrap {
	width: min(100% - 48px, 1120px);
	margin-inline: auto;
}

.lh-account-card *,
.lh-account-card *::before,
.lh-account-card *::after {
	box-sizing: border-box;
}

.lh-account-card h1,
.lh-account-card h2,
.lh-account-card h3 {
	color: var(--lh-navy, #1e1b3a);
	font-family: var(--lh-font-display, system-ui, sans-serif);
	letter-spacing: -.02em;
	line-height: 1.2;
}

.lh-account-card > h1,
.lh-account-card > h2,
.lh-account-card > .lh-auth-heading {
	margin: 0 0 8px;
	font-size: clamp(1.65rem, 4vw, 2rem);
	text-align: center;
}

.lh-account-card .lh-auth-intro {
	margin: 0 auto 24px;
	max-width: 36ch;
	color: var(--lh-auth-muted);
	text-align: center;
}

.lh-account-card p {
	margin: 0 0 14px;
}

.lh-account-card a {
	color: var(--lh-auth-indigo);
	font-weight: 650;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.lh-account-card a:hover {
	color: #3026a6;
}

/* Login form and BuddyPress Nouveau signup form share the same field rhythm. */
.lh-account-card #loginform,
.lh-account-card #signup-form,
.lh-account-card .standard-form {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.lh-account-card #loginform > p,
.lh-account-card #signup-form .register-section,
.lh-account-card #signup-form .editfield,
.lh-account-card #signup-form .bp-signup-form,
.lh-account-card #signup-form .field-visibility-settings-toggle,
.lh-account-card #signup-form .field-visibility-settings-notoggle {
	margin: 0 0 16px;
}

.lh-account-card #loginform label,
.lh-account-card #signup-form label,
.lh-account-card #signup-form legend,
.lh-account-card #signup-form .description,
.lh-account-card #signup-form .field-visibility-settings-header {
	display: block;
	margin: 0 0 6px;
	color: var(--lh-navy, #1e1b3a);
	font-size: .9rem;
	font-weight: 700;
}

.lh-account-card #loginform .login-remember label,
.lh-account-card #signup-form label:has(input[type="checkbox"]),
.lh-account-card #signup-form label:has(input[type="radio"]),
.lh-account-card #signup-form .field-visibility-settings label {
	display: inline-flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0;
	font-weight: 500;
	line-height: 1.45;
}

.lh-account-card #loginform input[type="text"],
.lh-account-card #loginform input[type="email"],
.lh-account-card #loginform input[type="password"],
.lh-account-card #loginform input[type="tel"],
.lh-account-card #signup-form input[type="text"],
.lh-account-card #signup-form input[type="email"],
.lh-account-card #signup-form input[type="password"],
.lh-account-card #signup-form input[type="url"],
.lh-account-card #signup-form input[type="number"],
.lh-account-card #signup-form input[type="tel"],
.lh-account-card #signup-form textarea,
.lh-account-card #signup-form select {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 11px 13px;
	border: 1.5px solid #d9d6e8;
	border-radius: 10px;
	background: #fff;
	color: var(--lh-auth-ink);
	font: inherit;
	line-height: 1.35;
	box-shadow: inset 0 1px 2px rgba(30, 27, 58, .025);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.lh-account-card #signup-form textarea {
	min-height: 100px;
	resize: vertical;
}

.lh-account-card #loginform input:focus,
.lh-account-card #signup-form input:focus,
.lh-account-card #signup-form textarea:focus,
.lh-account-card #signup-form select:focus {
	border-color: #6366f1;
	outline: 0;
	box-shadow: 0 0 0 3px #e4e5ff;
}

.lh-account-card input[type="checkbox"],
.lh-account-card input[type="radio"] {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	margin: 2px 0 0;
	accent-color: var(--lh-auth-indigo);
}

.lh-account-card #loginform .login-remember {
	margin: 1px 0 16px;
}

.lh-account-card #loginform .login-submit,
.lh-account-card #signup-form .submit,
.lh-account-card #signup-form > input[type="submit"],
.lh-account-card #signup-form .signup-submit {
	margin: 18px 0 0;
}

.lh-account-card #loginform input[type="submit"],
.lh-account-card #signup-form input[type="submit"],
.lh-account-card #signup-form button[type="submit"] {
	display: flex;
	width: 100%;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	padding: 11px 18px;
border: 2px solid var(--lh-indigo, #4338ca);
	border-radius: 12px;
background: #fff;
color: var(--lh-indigo, #4338ca);
	font-family: var(--lh-font-display, system-ui, sans-serif);
	font-size: .96rem;
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
box-shadow: 0 4px 0 #cfccf3;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.lh-account-card #loginform input[type="submit"]:hover,
.lh-account-card #signup-form input[type="submit"]:hover,
.lh-account-card #signup-form button[type="submit"]:hover {
	background: #f49b40;
}

.lh-account-card #loginform input[type="submit"]:active,
.lh-account-card #signup-form input[type="submit"]:active,
.lh-account-card #signup-form button[type="submit"]:active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 var(--lh-orange-deep, #d9701a);
}

.lh-account-card :focus-visible {
	outline: 3px solid #6366f1;
	outline-offset: 3px;
}

/* Preserve Nouveau hooks and field guidance; style required markers and errors
   without suppressing optional/required profile data or validation messages. */
.lh-account-card #signup-form .bp-required-field-label,
.lh-account-card #signup-form .bp-required-field,
.lh-account-card #signup-form .required,
.lh-account-card #signup-form .description,
.lh-account-card #signup-form .field-visibility-settings-toggle,
.lh-account-card #signup-form .field-visibility-settings-notoggle,
.lh-account-card #signup-form .field-visibility-settings {
	color: var(--lh-auth-muted);
	font-size: .82rem;
	font-weight: 500;
}

.lh-account-card #signup-form .bp-required-field-label,
.lh-account-card #signup-form .required {
	color: #a13b27;
	font-weight: 700;
}

.lh-account-card #signup-form .description,
.lh-account-card #signup-form .field-visibility-settings-toggle {
	margin-top: 6px;
	margin-bottom: 0;
}

.lh-account-card #signup-form .error,
.lh-account-card #signup-form .bp-feedback,
.lh-account-card #signup-form .bp-template-notice,
.lh-account-card #signup-form .message,
.lh-account-card #signup-form .warning,
.lh-account-card #loginform .login-error,
.lh-account-card .lh-auth-error {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #f0b4a8;
	border-radius: 11px;
	background: #fff1ed;
	color: #8b2617;
}

.lh-account-card #signup-form .bp-feedback p,
.lh-account-card #signup-form .bp-template-notice p,
.lh-account-card #signup-form .message p {
	margin: 0;
}

.lh-account-card #signup-form .register-section {
	display: block;
	width: 100%;
	max-width: none;
	min-width: 0;
	flex: 0 0 100%;
	padding: 0;
	border: 0;
	background: transparent;
}

.lh-account-card #buddypress #signup-form {
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.lh-account-card #buddypress #signup-form .layout-wrap {
	display: block;
	width: 100%;
	max-width: none;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.lh-account-card #buddypress #signup-form .layout-wrap > .register-section {
	display: block;
	width: 100%;
	max-width: none;
	min-width: 0;
	flex: none;
}

.lh-account-card #signup-form .register-section + .register-section {
	margin-top: 24px;
	padding-top: 22px;
	border-top: 1px solid var(--lh-auth-line);
}

.lh-account-card #signup-form .register-section h2,
.lh-account-card #signup-form .register-section h3 {
	margin: 0 0 14px;
	font-size: 1.08rem;
}

.lh-account-card #signup-form #basic-details-section > h2:only-child,
.lh-account-card #signup-form #basic-details-section > h2.bp-heading {
	/* The outer card supplies the page heading; keep this native section
	   heading available to assistive technology without repeating it visually. */
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.lh-account-card #signup-form .field-visibility-settings,
.lh-account-card #signup-form .field-visibility-settings-toggle,
.lh-account-card #signup-form .field-visibility-settings-notoggle {
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--lh-auth-soft);
}

.lh-account-card #signup-form .field-visibility-settings-toggle a,
.lh-account-card #signup-form .field-visibility-settings a {
	font-size: .82rem;
}

.lh-account-card #signup-form .field-visibility-settings legend,
.lh-account-card #signup-form .field-visibility-settings-header {
	margin-bottom: 8px;
}

.lh-account-card #signup-form .field-visibility-settings ul,
.lh-account-card #signup-form .field-visibility-settings .radio {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lh-account-card #signup-form .field-visibility-settings li + li {
	margin-top: 6px;
}

/* WP password reveal control stays visible and usable beside the password. */
.lh-account-card .wp-pwd {
	position: relative;
	display: block;
}

.lh-account-card .wp-pwd input[type="password"],
.lh-account-card .wp-pwd input[type="text"] {
	padding-right: 54px;
}

.lh-account-card .wp-pwd .bp-hide-pw,
.lh-account-card .wp-pwd button.wp-hide-pw {
	position: absolute;
	top: 50%;
	right: 5px;
	display: grid;
	width: 40px;
	height: 40px;
	place-items: center;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #55536b;
	cursor: pointer;
}

.lh-account-card .wp-pwd .bp-hide-pw:hover,
.lh-account-card .wp-pwd button.wp-hide-pw:hover {
	background: #f2f1fc;
	color: var(--lh-auth-indigo);
}

.lh-account-card .wp-pwd .wp-capslock-on {
	display: none;
	margin: 7px 0 0;
	color: #8b4e13;
	font-size: .82rem;
}

.lh-account-card .password-input-wrapper {
	position: relative;
}

.lh-account-card .password-input-wrapper .caps-warning {
	display: none;
	position: relative;
	top: auto;
	margin: 7px 0 0;
	padding: 7px 10px;
	border: 1px solid #ead398;
	border-radius: 8px;
	background: #fff7df;
	color: #765000;
	font-size: .8rem;
	line-height: 1.4;
	visibility: hidden;
}

.lh-account-card .password-input-wrapper .caps-warning.visible {
	display: block;
	visibility: visible;
}

.lh-account-card .password-input-wrapper .caps-icon {
	display: inline-flex;
	width: 20px;
	height: 20px;
	align-items: center;
	justify-content: center;
	margin-right: 5px;
	vertical-align: middle;
}

.lh-account-card .password-input-wrapper .caps-icon svg {
	display: block;
	width: 16px;
	height: 16px;
	max-width: 16px;
}

.lh-account-card .password-input-wrapper .caps-warning-text {
	vertical-align: middle;
}

.lh-account-card .password-strength,
.lh-account-card #pass-strength-result {
	min-height: 28px;
	margin: 8px 0 0;
	padding: 5px 9px;
	border: 1px solid var(--lh-auth-line);
	border-radius: 8px;
	background: #f7f6fc;
	color: var(--lh-auth-muted);
	font-size: .78rem;
	line-height: 1.35;
}

.lh-account-card #pass-strength-result.short,
.lh-account-card #pass-strength-result.bad,
.lh-account-card #pass-strength-result.error {
	border-color: #efc0b7;
	background: #fff1ed;
	color: #8b2617;
}

.lh-account-card #pass-strength-result.good {
	border-color: #ead398;
	background: #fff7df;
	color: #765000;
}

.lh-account-card #pass-strength-result.strong {
	border-color: #acd8b8;
	background: #eaf7ee;
	color: #176a37;
}

.lh-account-card #pass-strength-result.empty {
	color: var(--lh-auth-muted);
}

.lh-account-card #signup-form .privacy-policy-accept,
.lh-account-card #signup-form .privacy-policy,
.lh-account-card #signup-form .bp-privacy-policy-acceptance,
.lh-account-card .lh-auth-switch,
.lh-account-card .lh-auth-footer {
	margin: 18px 0 0;
	color: var(--lh-auth-muted);
	font-size: .84rem;
	line-height: 1.55;
	text-align: center;
}

.lh-account-card #signup-form .privacy-policy-accept label,
.lh-account-card #signup-form .bp-privacy-policy-acceptance label {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0;
	font-size: .84rem;
	font-weight: 500;
}

.lh-account-card #signup-form .privacy-policy-accept p,
.lh-account-card #signup-form .privacy-policy p {
	margin: 8px 0 0;
	color: var(--lh-auth-muted);
	font-size: .82rem;
}

.lh-account-card .lh-auth-otp {
	margin: 18px 0 0;
	padding: 13px 15px;
	border: 1px solid #d9d6f2;
	border-radius: 12px;
	background: #f6f5ff;
	color: #393568;
	font-size: .86rem;
	line-height: 1.5;
}

.lh-account-card .lh-auth-otp > :last-child {
	margin-bottom: 0;
}

.lh-account-card .lh-community-cta {
	display: none !important;
}

.lh-account-card [hidden] {
	display: none !important;
}

.lh-account-card .screen-reader-text,
.lh-account-card .screen-reader-text:focus,
.lh-account-card .bp-screen-reader-text {
	/* Retain WordPress/BuddyPress visually-hidden accessible labels. */
}

@media (min-width: 768px) {
	.lh-account-card:has(#signup-form) {
		width: min(100%, 520px);
		max-width: 520px;
	}
}

@media (max-width: 767px) {
	.lh-auth-section > .lh-wrap {
		width: min(100% - 36px, 620px);
	}

	.lh-account-card {
		padding: 25px 22px;
		border-radius: 16px;
	}

	.lh-account-card:has(#signup-form) {
		width: min(100%, 520px);
		max-width: 520px;
	}
}

@media (max-width: 380px) {
	.lh-auth-section > .lh-wrap {
		width: calc(100% - 28px);
	}

	.lh-account-card {
		padding: 22px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lh-account-card *,
	.lh-account-card *::before,
	.lh-account-card *::after {
		transition-duration: .01ms !important;
	}
}
