/* LR Age-Gated Registration — builds on Beehive / BuddyPress Nouveau register styles. */

.lr-agr {
	--lr-agr-accent: #5a5fe0;
	--lr-agr-accent-2: #7b86f5;
	--lr-agr-text: #4a4a5a;
	--lr-agr-muted: #7a7a8c;
	--lr-agr-error: #d63638;
	--lr-agr-card-radius: 12px;
}

/* Cards: reuse Beehive's register-section look for our own steps. */
#buddypress .lr-agr .layout-wrap {
	display: block;
}

#buddypress .lr-agr .register-section.lr-agr-card,
#buddypress .lr-agr-card {
	max-width: 480px;
	margin: 0 auto 30px;
	float: none;
	width: 100%;
	box-sizing: border-box;
}

#buddypress .lr-agr .register-section.lr-agr-card label,
#buddypress .lr-agr-card label {
	display: block;
}

#buddypress .lr-agr .lr-agr-form input[type="text"],
#buddypress .lr-agr .lr-agr-form input[type="email"],
#buddypress .lr-agr .lr-agr-form input[type="password"] {
	width: 100%;
	box-sizing: border-box;
}

#buddypress .lr-agr .submit {
	text-align: center;
	clear: both;
}

/* Age gate (card design). */
.lr-agr-view-gate {
	--lr-agr-gate-ink: #0f172a;
	--lr-agr-gate-text: #475569;
	--lr-agr-gate-border: #d6dae3;
	--lr-agr-gate-placeholder: #8b93a7;
	--lr-agr-gate-brand: #5046e5;
	--lr-agr-gate-brand-hover: #4338ca;
	--lr-agr-gate-error: #dc2626;
	padding: 24px 0 40px;
}

#buddypress .lr-agr-view-gate .lr-agr-gate-page-title {
	margin: 0 0 28px;
	text-align: center;
	color: var(--lr-agr-gate-ink);
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

#buddypress .lr-agr-view-gate .lr-agr-gate-card {
	box-sizing: border-box;
	width: 100%;
	max-width: 490px;
	margin: 0 auto;
	padding: 40px 40px 44px;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
	text-align: left;
}

#buddypress .lr-agr-view-gate .lr-agr-gate-title {
	margin: 0 0 12px;
	padding: 0;
	color: var(--lr-agr-gate-ink);
	font-size: 1.75rem;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.02em;
	text-align: left;
}

#buddypress .lr-agr-view-gate .lr-agr-gate-intro {
	margin: 0 0 26px;
	color: var(--lr-agr-gate-text);
	font-size: 1rem;
	line-height: 1.6;
}

#buddypress .lr-agr-view-gate .lr-agr-gate-intro strong {
	color: var(--lr-agr-gate-brand);
	font-weight: 700;
}

#buddypress .lr-agr-view-gate .lr-agr-gate-help {
	margin: 8px 0 0;
	color: var(--lr-agr-gate-text);
	font-size: 0.875rem;
	line-height: 1.5;
}

#buddypress .lr-agr-view-gate .lr-agr-gate-label .bp-required-field-label {
	color: var(--lr-agr-gate-text);
	font-weight: 400;
}

#buddypress .lr-agr-view-gate .lr-agr-gate-label {
	display: block;
	margin: 0 0 8px;
	color: var(--lr-agr-gate-ink);
	font-size: 0.95rem;
	font-weight: 600;
}

#buddypress .lr-agr-view-gate .lr-agr-age-input {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	height: 45px;
	margin: 0;
	padding: 0 20px;
	border: 1.5px solid var(--lr-agr-gate-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: none;
	color: var(--lr-agr-gate-ink);
	font-size: 1.125rem;
	letter-spacing: normal;
	text-align: left;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#buddypress .lr-agr-view-gate .lr-agr-age-input::placeholder {
	color: var(--lr-agr-gate-placeholder);
	opacity: 1;
}

#buddypress .lr-agr-view-gate .lr-agr-age-input:focus {
	border-color: var(--lr-agr-gate-brand);
	outline: none;
	box-shadow: 0 0 0 4px rgba(80, 70, 229, 0.15);
}

#buddypress .lr-agr-view-gate .lr-agr-age-input.has-error {
	border-color: var(--lr-agr-gate-error);
}

#buddypress .lr-agr-view-gate .lr-agr-age-input.has-error:focus {
	box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

#buddypress .lr-agr-view-gate div.error {
	margin: 8px 0 0;
	padding: 0;
	background: none;
	color: var(--lr-agr-gate-error);
	font-size: 0.9rem;
}

#buddypress .lr-agr-view-gate .lr-agr-gate-button {
	display: block;
	width: 100%;
	/* height: 62px; */
	margin: 32px 0 0;
	padding: 0 24px;
	border: 0;
	border-radius: 12px;
	background: var(--lr-agr-gate-brand);
	box-shadow: none;
	color: #fff;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 48px;
	text-transform: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

#buddypress .lr-agr-view-gate .lr-agr-gate-button:hover,
#buddypress .lr-agr-view-gate .lr-agr-gate-button:focus-visible {
	background: var(--lr-agr-gate-brand-hover);
	color: #fff;
}

#buddypress .lr-agr-view-gate .lr-agr-gate-button:focus-visible {
	outline: 3px solid rgba(80, 70, 229, 0.35);
	outline-offset: 2px;
}

#buddypress .lr-agr-view-gate .lr-agr-login {
	margin: 28px auto 0;
	color: var(--lr-agr-gate-text);
	font-size: 1rem;
	text-align: center;
}

#buddypress .lr-agr-view-gate .lr-agr-login a {
	color: var(--lr-agr-gate-brand-hover);
	font-weight: 700;
	text-decoration: none;
}

#buddypress .lr-agr-view-gate .lr-agr-login a:hover {
	text-decoration: underline;
}

#buddypress .lr-agr-view-gate .lr-agr-notice {
	max-width: 490px;
	margin-bottom: 20px !important;
}

/* WordPress core's caps-lock warning (user-profile.js) ships its CSS only in wp-admin. */
.register-page .wp-pwd .caps-warning {
	display: none;
	position: relative;
	margin: 4px 0 8px;
	padding: 4px 10px;
	border: 1px solid #f0c33c;
	border-radius: 6px;
	background: #fcf9e8;
	color: #1d2327;
	font-size: 0.85rem;
}

.register-page .wp-pwd .caps-icon {
	display: inline-flex;
	width: 16px;
	height: 16px;
	margin-right: 6px;
	vertical-align: middle;
}

.register-page .wp-pwd .caps-icon svg {
	width: 16px;
	height: 16px;
}

/* Errors (BP uses div.error). */
#buddypress .lr-agr div.error,
#buddypress .lr-agr-card div.error,
#buddypress #lr-agr-legal-section div.error {
	color: var(--lr-agr-error);
	font-size: 0.9rem;
	margin: 4px 0 12px;
	background: none;
	padding: 0;
}

#buddypress .lr-agr [aria-invalid="true"] {
	border-color: var(--lr-agr-error);
}

/* Checkboxes. */
.lr-agr-checks {
	border: 0;
	margin: 18px 0 8px;
	padding: 0;
}

#buddypress .lr-agr-check {
	display: flex !important;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 12px;
	font-weight: 400;
	line-height: 1.45;
	cursor: pointer;
}

#buddypress .lr-agr-check input[type="checkbox"] {
	flex: 0 0 auto;
	margin-top: 3px;
	width: 18px;
	height: 18px;
}

.lr-agr-check a {
	color: var(--lr-agr-accent);
	text-decoration: underline;
}

.lr-agr-declare span {
	font-size: 0.95rem;
}

/* reCAPTCHA. */
.lr-agr-captcha {
	margin: 14px 0 6px;
	display: flex;
	justify-content: center;
	overflow: hidden;
}

/* Honeypot. */
.lr-agr-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Notices inside our steps. */
.lr-agr-notice {
	max-width: 600px;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Parent step: the consent explanation is the key message, so it is shown larger. */
#buddypress .lr-agr-parent-notice p {
	color: #3c3c4e;
	font-size: 1.2rem;
	font-weight: 500;
	line-height: 1.6;
}

@media (max-width: 575px) {
	#buddypress .lr-agr-parent-notice p {
		font-size: 1.05rem;
	}
}

.lr-agr-small {
	font-size: 0.85rem;
	color: var(--lr-agr-muted);
}

/* Links styled as buttons. */
.lr-agr-link-button {
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	color: var(--lr-agr-accent) !important;
	padding: 0 !important;
	text-decoration: underline;
	cursor: pointer;
	font-size: 0.95rem;
	min-height: 0 !important;
}

.lr-agr-restart,
.lr-agr-login,
.lr-agr-intro {
	text-align: center;
	margin: 10px auto 18px;
}

.lr-agr-intro .lr-agr-notice {
	margin-bottom: 8px !important;
}

.lr-agr-login a {
	color: var(--lr-agr-accent);
	font-weight: 600;
}

/* Consent sent. */
.lr-agr-center {
	text-align: center;
}

.lr-agr-mail-icon {
	font-size: 3rem;
	line-height: 1;
	color: var(--lr-agr-accent);
	margin-bottom: 12px;
}

.lr-agr-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-top: 18px;
}

#buddypress .lr-agr-actions .button.lr-agr-secondary {
	border-radius: 30px;
	padding: 10px 24px;
}

/* Verify summary. */
.lr-agr-summary {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 16px;
	margin: 0 0 16px;
}

.lr-agr-summary dt {
	font-weight: 600;
}

.lr-agr-summary dd {
	margin: 0;
	word-break: break-word;
}

/* Avatar field. */
#buddypress .lr-agr-avatar-section {
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
	float: none;
}

.lr-agr-avatar-row {
	display: flex;
	gap: 18px;
	align-items: flex-start;
}

.lr-agr-avatar-preview {
	flex: 0 0 84px;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	overflow: hidden;
	background: #eef0fb;
	position: relative;
}

.lr-agr-avatar-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lr-agr-avatar-placeholder {
	position: absolute;
	inset: 22% 30% auto;
	height: 30%;
	border-radius: 50%;
	background: #c9cdf3;
	box-shadow: 0 34px 0 10px #c9cdf3;
}

.lr-agr-avatar-preview img:not([hidden]) + .lr-agr-avatar-placeholder,
.lr-agr-avatar-preview.has-image .lr-agr-avatar-placeholder {
	display: none;
}

.lr-agr-avatar-input {
	flex: 1 1 auto;
	min-width: 0;
}

#buddypress .lr-agr-avatar-input input[type="file"] {
	width: 100%;
	max-width: 100%;
	font-size: 0.9rem;
	margin: 6px 0;
}

/* Password strength on the child form (mirrors WP/Beehive classes). */
#buddypress .lr-agr-strength {
	margin: 6px 0 12px;
	padding: 4px 10px;
	font-size: 0.8rem;
	border-radius: 6px;
	background: #eee;
	text-align: center;
}

#buddypress .lr-agr-strength.short { background: #f1adad; }
#buddypress .lr-agr-strength.bad { background: #fbc5a9; }
#buddypress .lr-agr-strength.good { background: #ffe399; }
#buddypress .lr-agr-strength.strong { background: #c1e1b9; }

#buddypress .lr-agr-confirm-wrap {
	margin-top: 12px;
}

#buddypress .lr-agr-confirm-wrap input {
	width: 100%;
	box-sizing: border-box;
}

.lr-agr-match {
	color: var(--lr-agr-error, #d63638);
	font-size: 0.85rem;
	min-height: 1em;
}

.lr-agr-username-hint strong {
	color: var(--lr-agr-text);
}

/* 13+ BuddyPress form tweaks. */
#buddypress #lr-agr-legal-section {
	max-width: 480px;
	margin: 0 auto 24px;
	float: none;
}

#buddypress .register-page input[readonly] {
	opacity: 0.75;
	cursor: not-allowed;
}

/* Mobile. */
@media (max-width: 575px) {
	#buddypress .lr-agr-view-gate .lr-agr-gate-page-title {
		margin-bottom: 20px;
		font-size: 1.75rem;
	}

	#buddypress .lr-agr-view-gate .lr-agr-gate-card {
		padding: 28px 22px 30px;
		border-radius: 16px;
	}

	#buddypress .lr-agr-view-gate .lr-agr-gate-title {
		font-size: 1.5rem;
	}

	#buddypress .lr-agr .register-section.lr-agr-card,
	#buddypress .lr-agr-card,
	#buddypress .lr-agr-avatar-section,
	#buddypress #lr-agr-legal-section {
		padding-left: 18px;
		padding-right: 18px;
	}

	.lr-agr-avatar-row {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.lr-agr-summary {
		grid-template-columns: 1fr;
	}

	.lr-agr-captcha {
		transform-origin: center top;
	}
}

@media (max-width: 340px) {
	.lr-agr-captcha iframe {
		transform: scale(0.85);
		transform-origin: 0 0;
	}
}
