/* rd-auth: the one login and signup card, the Sign-in methods panel, the checkout card. Mobile first. */

.rd-auth {
	--rd-auth-primary: var(--wd-primary-color, #085e83);
	--rd-auth-text: var(--wd-text-color, #333);
	--rd-auth-muted: #6b7a85;
	--rd-auth-border: #e3e8ec;
	--rd-auth-bg: #fff;
	--rd-auth-radius: 14px;
	max-width: 440px;
	margin: 0 auto;
	padding: 8px 0 32px;
}

.rd-auth-card {
	position: relative;
	background: var(--rd-auth-bg);
	border: 1px solid var(--rd-auth-border);
	border-radius: var(--rd-auth-radius);
	padding: 28px 22px;
	box-shadow: 0 8px 30px rgba(8, 94, 131, 0.08);
	overflow: hidden;
}

@media (min-width: 768px) {
	.rd-auth { padding: 24px 0 48px; }
	.rd-auth-card { padding: 36px 32px; }
}

.rd-auth-notices .woocommerce-error,
.rd-auth-notices .woocommerce-message,
.rd-auth-notices .woocommerce-info { margin-bottom: 18px; }

.rd-auth-panels { position: relative; }

.rd-auth-panel[hidden] { display: none; }

.rd-auth-title {
	margin: 0 0 6px;
	font-size: 24px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--rd-auth-text);
}

.rd-auth-sub {
	margin: 0 0 14px;
	color: var(--rd-auth-muted);
	font-size: 14px;
	line-height: 1.55;
}

.rd-auth-steps {
	margin: 0 0 18px;
	font-size: 11px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--rd-auth-primary);
	font-weight: 600;
}

.rd-auth-form { margin: 0; }

.rd-auth-field { margin: 0 0 14px; }

.rd-auth-field label {
	display: block;
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--rd-auth-text);
}

.rd-auth-field .input-text {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--rd-auth-border);
	border-radius: 10px;
	font-size: 16px;
	background: #fff;
	box-sizing: border-box;
}

.rd-auth-field .input-text:focus {
	outline: none;
	border-color: var(--rd-auth-primary);
	box-shadow: 0 0 0 3px rgba(8, 94, 131, 0.14);
}

.rd-auth-field .rd-auth-code {
	font-size: 28px;
	letter-spacing: 8px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.rd-auth-hint {
	margin: 6px 0 0;
	font-size: 12px;
	color: var(--rd-auth-muted);
}

.rd-auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 2px 0 18px;
	font-size: 13px;
}

.rd-auth-check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--rd-auth-text);
	cursor: pointer;
}

.rd-auth-check input { margin: 3px 0 0; flex: none; }

.rd-auth-terms { margin: 2px 0 18px; }

.rd-auth-link {
	background: none;
	border: 0;
	padding: 0;
	color: var(--rd-auth-primary);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.rd-auth-link:disabled { color: var(--rd-auth-muted); text-decoration: none; cursor: default; }

/* Centred with flex rather than line-height, so an <a> styled as a button sits the same as a <button>:
   a button centres its own text, an anchor with a min-height does not and the label rides up. */
.button.rd-auth-primary,
.rd-auth-checkout-card .button.rd-auth-checkout-login {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
	min-height: 50px;
	border-radius: 10px;
	font-weight: 700;
	letter-spacing: 0.6px;
	background-color: var(--wd-primary-color, #085e83);
	border-color: var(--wd-primary-color, #085e83);
	color: #fff;
	transition: filter 160ms ease, transform 120ms ease;
}

.button.rd-auth-primary:hover,
.button.rd-auth-primary:focus,
.rd-auth-checkout-card .button.rd-auth-checkout-login:hover {
	background-color: var(--wd-primary-color, #085e83);
	color: #fff;
	filter: brightness(0.92);
}

.button.rd-auth-primary:active { transform: translateY(1px); }

.button.rd-auth-primary:disabled { opacity: 0.6; filter: none; }

.rd-auth-checkout-card .button.rd-auth-checkout-login { display: inline-flex; width: auto; min-height: 46px; padding-left: 26px; padding-right: 26px; }

.button.rd-auth-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 44px;
	border-radius: 10px;
	background: transparent;
	border: 2px solid var(--wd-primary-color, #085e83);
	color: var(--wd-primary-color, #085e83);
	font-weight: 600;
}

.button.rd-auth-secondary:hover {
	background-color: var(--wd-primary-color, #085e83);
	color: #fff;
}

.rd-auth-inline { display: inline; margin: 0 14px 0 0; }

/* Code step: Resend and Start again are full-width buttons, the same size as Verify. */
.rd-auth-code-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 14px 0 4px;
}

.rd-auth-code-actions .rd-auth-inline { display: block; margin: 0; }

.rd-auth-code-actions .button.rd-auth-secondary {
	display: flex;
	width: 100%;
	min-height: 50px;
	border-radius: 10px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-align: center;
	cursor: pointer;
}

.rd-auth-code-actions .button.rd-auth-resend:disabled {
	border-color: var(--rd-auth-border);
	color: var(--rd-auth-muted);
	background: transparent;
	cursor: default;
	opacity: 1;
}

.rd-auth-code-actions .button.rd-auth-restart {
	border-color: var(--rd-auth-border);
	color: var(--rd-auth-muted);
}

.rd-auth-code-actions .button.rd-auth-restart:hover {
	border-color: var(--rd-auth-muted);
	color: var(--rd-auth-text);
	background: transparent;
}

.rd-auth-field .rd-auth-code { margin-bottom: 4px; }

.rd-auth-switch {
	margin: 20px 0 0;
	text-align: center;
	font-size: 14px;
	color: var(--rd-auth-muted);
}

.rd-auth-switch a { color: var(--rd-auth-primary); font-weight: 600; }

.rd-auth-divider {
	position: relative;
	text-align: center;
	margin: 18px 0;
	color: var(--rd-auth-muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1.2px;
}

.rd-auth-divider::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 1px;
	background: var(--rd-auth-border);
}

.rd-auth-divider span {
	position: relative;
	background: var(--rd-auth-bg);
	padding: 0 10px;
}

/* Three-choice view */
.rd-auth-choices { margin: 0 0 4px; }

.rd-auth-choices[hidden] { display: none; }

.rd-auth-email-form[hidden] { display: none; }

.button.rd-auth-email-choice {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 14px;
	background: transparent;
	border: 2px solid var(--rd-auth-border);
	color: var(--rd-auth-text);
	cursor: pointer;
	transition: border-color 160ms ease, background 160ms ease;
}

.button.rd-auth-email-choice:hover {
	border-color: var(--wd-primary-color, #085e83);
	background: transparent;
	color: var(--rd-auth-text);
}

.rd-auth-back-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 14px;
	padding: 0;
	background: none;
	border: none;
	color: var(--rd-auth-primary);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.rd-auth-back-btn:hover { text-decoration: underline; }

/* Google */
.rd-auth-google { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 44px; }

.rd-auth-google-btn { width: 100%; max-width: 320px; display: flex; justify-content: center; }

.rd-auth-google-error {
	margin: 0;
	font-size: 13px;
	color: #b32d2e;
}

/* Facebook */
.rd-auth-facebook { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 10px 0 0; }

.rd-auth-facebook-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 320px;
	min-height: 44px;
	padding: 0 16px;
	border: none;
	border-radius: 22px;
	background: #1877F2;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: filter 160ms ease;
}

.rd-auth-facebook-btn:hover { filter: brightness(0.92); }

.rd-auth-facebook-btn:disabled { opacity: 0.6; filter: none; cursor: default; }

.rd-auth-facebook-btn svg { flex: none; }

.rd-auth-facebook-error {
	margin: 0;
	font-size: 13px;
	color: #b32d2e;
}

.rd-auth-hp {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Panel transition (JavaScript toggles .is-leaving / .is-entering). */
.rd-auth.is-animating .rd-auth-panels { overflow: hidden; }

.rd-auth-panel.is-entering {
	animation: rd-auth-in 260ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.rd-auth-panel.is-leaving {
	animation: rd-auth-out 200ms ease both;
}

@keyframes rd-auth-in {
	from { opacity: 0; transform: translateX(var(--rd-auth-dir, 28px)); }
	to { opacity: 1; transform: translateX(0); }
}

@keyframes rd-auth-out {
	from { opacity: 1; transform: translateX(0); }
	to { opacity: 0; transform: translateX(calc(var(--rd-auth-dir, 28px) * -1)); }
}

@media (prefers-reduced-motion: reduce) {
	.rd-auth-panel.is-entering,
	.rd-auth-panel.is-leaving { animation: none; }
}

/* Sign-in methods */
.rd-auth-methods { max-width: 560px; }

.rd-auth-method {
	border: 1px solid #e3e8ec;
	border-radius: 12px;
	padding: 18px 20px;
	margin: 0 0 16px;
}

.rd-auth-method-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 4px;
}

.rd-auth-method-name { font-weight: 700; font-size: 16px; }

.rd-auth-method-state {
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 999px;
	background: #f1f4f6;
	color: #6b7a85;
}

.rd-auth-method-state.is-on { background: #e6f4ea; color: #1e7b34; }

.rd-auth-method-sub { margin: 0 0 12px; color: #6b7a85; font-size: 14px; }

.rd-auth-methods .rd-auth-field .input-text {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid #e3e8ec;
	border-radius: 10px;
	box-sizing: border-box;
}

.rd-auth-methods .rd-auth-google { align-items: flex-start; }

.rd-auth-methods .rd-auth-facebook { align-items: flex-start; margin: 10px 0 0; }

/* Dashboard nudge */
.rd-auth-nudge { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }

.rd-auth-nudge-set { font-weight: 700; }

/* Checkout card under the billing email */
.rd-auth-checkout-card {
	margin: 10px 0 18px;
	padding: 20px;
	border: 1px solid #e3e8ec;
	border-radius: 12px;
	background: #f8fafb;
}

.rd-auth-card-title { margin: 0 0 4px; font-weight: 700; font-size: 16px; }

.rd-auth-card-sub { margin: 0 0 14px; font-size: 13px; color: #6b7a85; }

.rd-auth-checkout-card .rd-auth-field .input-text {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid #e3e8ec;
	border-radius: 10px;
	box-sizing: border-box;
}

.rd-auth-card-error { margin: 0 0 10px; color: #b32d2e; font-size: 13px; }

.rd-auth-actions { display: flex; align-items: center; gap: 16px; }

.rd-auth-card-foot { margin: 12px 0 0; font-size: 13px; }

.rd-auth-card-foot a { color: #6b7a85; }

.rd-auth-checkout-card .rd-auth-divider span { background: #f8fafb; }
