/**
 * WSR Investment Rewards — login, registration and password reset.
 *
 * A centred card that works on any theme. Everything is scoped under .wsr-auth
 * and uses custom properties, so a theme's own styles do not bleed in and a
 * site owner can restyle it without touching this file.
 */

.wsr-auth {
	--wsr-a-ink: #1d2327;
	--wsr-a-muted: #646970;
	--wsr-a-accent: #2b4a6f;
	--wsr-a-accent-hover: #22395a;
	--wsr-a-error: #8a2c2c;
	--wsr-a-error-bg: #fbf0f0;
	--wsr-a-success: #16663f;
	--wsr-a-success-bg: #edf7f1;
	--wsr-a-line: #dcdcde;
	--wsr-a-surface: #fff;
	--wsr-a-radius: 14px;

	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
	padding: 40px 16px;
	box-sizing: border-box;
}

.wsr-auth *,
.wsr-auth *::before,
.wsr-auth *::after {
	box-sizing: border-box;
}

.wsr-auth__card {
	width: 100%;
	max-width: 420px;
	padding: 36px 32px;
	background: var(--wsr-a-surface);
	border: 1px solid var(--wsr-a-line);
	border-radius: var(--wsr-a-radius);
	box-shadow: 0 6px 28px rgba( 0, 0, 0, .07 );
}

.wsr-auth__card--wide {
	max-width: 560px;
}

/* Header ------------------------------------------------------------------ */

.wsr-auth__header {
	text-align: center;
	margin-bottom: 24px;
}

.wsr-auth__logo {
	display: block;
	max-width: 190px;
	max-height: 80px;
	width: auto;
	height: auto;
	margin: 0 auto 18px;
}

.wsr-auth__wordmark {
	display: block;
	margin-bottom: 14px;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: .01em;
	color: var(--wsr-a-accent);
}

.wsr-auth__title {
	margin: 0 0 6px;
	font-size: 24px;
	line-height: 1.25;
	color: var(--wsr-a-ink);
}

.wsr-auth__subtitle {
	margin: 0;
	font-size: 14px;
	color: var(--wsr-a-muted);
}

/* Messages ---------------------------------------------------------------- */

.wsr-auth__message {
	margin: 0 0 18px;
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
}

.wsr-auth__message.is-error {
	background: var(--wsr-a-error-bg);
	color: var(--wsr-a-error);
}

.wsr-auth__message.is-success {
	background: var(--wsr-a-success-bg);
	color: var(--wsr-a-success);
}

.wsr-auth__referral {
	margin: 0 0 18px;
	padding: 11px 14px;
	background: var(--wsr-a-success-bg);
	border-radius: 8px;
	font-size: 13px;
	color: var(--wsr-a-success);
	text-align: center;
}

/* Fields ------------------------------------------------------------------ */

.wsr-auth__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.wsr-auth__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.wsr-auth__field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.wsr-auth__field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--wsr-a-ink);
	display: flex;
	align-items: baseline;
	gap: 6px;
}

.wsr-auth__optional {
	font-weight: 400;
	font-size: 12px;
	color: var(--wsr-a-muted);
}

.wsr-auth__field input[type="text"],
.wsr-auth__field input[type="email"],
.wsr-auth__field input[type="tel"],
.wsr-auth__field input[type="password"] {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--wsr-a-line);
	border-radius: 9px;
	background: #fff;
	font-size: 15px;
	color: var(--wsr-a-ink);
	transition: border-color .12s ease, box-shadow .12s ease;
}

.wsr-auth__field input:focus {
	outline: none;
	border-color: var(--wsr-a-accent);
	box-shadow: 0 0 0 3px rgba( 43, 74, 111, .16 );
}

.wsr-auth__password {
	position: relative;
	display: flex;
}

.wsr-auth__password input {
	padding-right: 68px !important;
}

.wsr-auth__reveal {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY( -50% );
	padding: 5px 9px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--wsr-a-muted);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.wsr-auth__reveal:hover {
	background: #f0f0f1;
	color: var(--wsr-a-ink);
}

.wsr-auth__strength {
	font-size: 12px;
	min-height: 15px;
	color: var(--wsr-a-muted);
}

.wsr-auth__strength.is-weak { color: var(--wsr-a-error); }
.wsr-auth__strength.is-fair { color: #8a6116; }
.wsr-auth__strength.is-strong { color: var(--wsr-a-success); }

/* The honeypot must be unreachable for people but present for bots, so it is
   hidden without display:none, which some bots check for. */
.wsr-auth__honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Row and checkboxes ------------------------------------------------------ */

.wsr-auth__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 13px;
}

.wsr-auth__check {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	font-weight: 400;
	color: var(--wsr-a-muted);
	cursor: pointer;
}

.wsr-auth__check input {
	margin: 0;
	flex: 0 0 auto;
}

.wsr-auth__link,
.wsr-auth__alt a {
	color: var(--wsr-a-accent);
	text-decoration: none;
	font-weight: 600;
}

.wsr-auth__link:hover,
.wsr-auth__alt a:hover {
	text-decoration: underline;
}

/* Button ------------------------------------------------------------------ */

.wsr-auth__button {
	display: block;
	width: 100%;
	padding: 14px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--wsr-a-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease;
}

.wsr-auth__button:hover {
	background: var(--wsr-a-accent-hover);
	color: #fff;
}

.wsr-auth__button:focus-visible {
	outline: 3px solid rgba( 43, 74, 111, .4 );
	outline-offset: 2px;
}

.wsr-auth__button[disabled] {
	background: #c9ccd0;
	cursor: not-allowed;
}

.wsr-auth__alt {
	margin: 20px 0 0;
	text-align: center;
	font-size: 14px;
	color: var(--wsr-a-muted);
}

@media (max-width: 520px) {
	.wsr-auth {
		padding: 20px 12px;
		min-height: auto;
	}

	.wsr-auth__card {
		padding: 26px 20px;
	}

	.wsr-auth__grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wsr-auth__button,
	.wsr-auth__field input {
		transition: none;
	}
}
