/**
 * Spartan BioLabs - My Account (RUO gate)
 * Port of design-brief/spartan-myaccount/login-account-page/styles.css
 *
 * Demo chrome (.sb-banner, .sb-header, .sb-footer*, .sb-logo, .sb-nav, .sb-utils)
 * is intentionally OMITTED - WoodMart owns the live header + footer.
 *
 * Tokens come from spartan-tokens.css (enqueued first).
 * All rules are scoped under .sb-account-wrap to avoid touching WoodMart globals.
 */

/* ---------- WoodMart page-title override on the gate (kill green H1) ---------- */
body.woocommerce-account.sb-myaccount--gate .page-title,
body.woocommerce-account.sb-myaccount--gate .page-title a,
body.woocommerce-account.sb-myaccount--gate .entry-title,
body.woocommerce-account.sb-myaccount--gate .wd-page-title,
body.woocommerce-account.sb-myaccount--gate .wd-page-title h1,
body.woocommerce-account.sb-myaccount--gate .wd-page-title .entry-title { color: #000 !important; }

/* ---------- Page shell ---------- */
.sb-account-wrap { position: relative; background: #fafafa; overflow: hidden; box-sizing: border-box; }
.sb-account-wrap *,
.sb-account-wrap *::before,
.sb-account-wrap *::after { box-sizing: border-box; }

.sb-account-wrap::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 30% 40%, rgba(206, 171, 89, 0.05) 0%, transparent 50%),
		radial-gradient(circle at 75% 70%, rgba(0, 0, 0, 0.03) 0%, transparent 50%);
	pointer-events: none;
}

.sb-account-wrap > * { position: relative; z-index: 1; }

.sb-account-wrap .sb-page {
	max-width: 1280px;
	margin: 0 auto;
	padding: clamp(40px, 5vw, 80px) clamp(24px, 4vw, 56px);
}

.sb-account-wrap .sb-hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 64px;
	align-items: start;
	position: relative;
}

/* ---------- Left panel ---------- */
.sb-account-wrap .sb-left h1 {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(34px, 3.4vw, 44px);
	line-height: 1.05;
	color: #000;
	margin: 0 0 18px;
	letter-spacing: 0.3px;
}

.sb-account-wrap .sb-left p.lede {
	font-size: 16px;
	line-height: 1.65;
	color: #1a1a1a;
	margin: 0 0 32px;
	max-width: 500px;
}

.sb-account-wrap .sb-bullets {
	list-style: none;
	padding: 0;
	margin: 0 0 36px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.sb-account-wrap .sb-bullets li {
	display: flex;
	align-items: center;
	gap: 14px;
	font-family: var(--font-sans);
	font-size: 15px;
	color: #000;
	line-height: 1.4;
}

.sb-account-wrap .sb-bullet-chk {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	background: var(--check-green);
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sb-account-wrap .sb-bullet-chk svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 2.8; }

.sb-account-wrap .sb-ctas {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 380px;
}

/* ---------- Auth card ---------- */
.sb-account-wrap .sb-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
	padding: clamp(24px, 2.4vw, 40px);
}

.sb-account-wrap .sb-card h2 {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 30px;
	color: #000;
	margin: 20px 0 20px;
	letter-spacing: 0.3px;
}

/* ---------- Tabs ---------- */
.sb-account-wrap .sb-tabs {
	background: #e5e7eb;
	border-radius: 12px;
	padding: 6px;
	display: flex;
	gap: 4px;
	width: 100%;
	position: relative;
}

.sb-account-wrap .sb-tab {
	flex: 1;
	height: 44px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--muted-text);
	cursor: pointer;
	transition: background 200ms, color 200ms, box-shadow 200ms;
	background: transparent;
	border: none;
	padding: 0;
}

.sb-account-wrap .sb-tab.is-active {
	background: #fff;
	color: #000;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sb-account-wrap .sb-tab:focus-visible {
	outline: 2px solid var(--spartan-gold);
	outline-offset: 2px;
}

/* ---------- Form layout ---------- */
.sb-account-wrap .sb-stack { display: flex; flex-direction: column; gap: 14px; }
.sb-account-wrap .sb-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Reset WC <p class="form-row"> margins so they sit flush in our stack. */
.sb-account-wrap .sb-stack .form-row,
.sb-account-wrap .sb-stack p.form-row {
	margin: 0;
	padding: 0;
}

/* ---------- Field shell + inputs (override WoodMart specificity) ---------- */
.sb-account-wrap .sb-field { position: relative; width: 100%; display: block; }

.sb-account-wrap .sb-field input,
.sb-account-wrap .sb-field select,
.sb-account-wrap form .sb-field input.input-text,
.sb-account-wrap form .sb-field input[type="text"],
.sb-account-wrap form .sb-field input[type="email"],
.sb-account-wrap form .sb-field input[type="password"],
.sb-account-wrap form .sb-field select {
	width: 100%;
	height: 46px;
	min-height: 46px;
	border-radius: 35px;
	border: 1px solid var(--hairline);
	padding: 0 20px;
	font-family: var(--font-sans);
	font-size: 14px;
	color: #000;
	background: #fff;
	outline: none;
	transition: border-color 200ms, box-shadow 200ms;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	box-shadow: none;
	margin: 0;
	line-height: 46px;
}

.sb-account-wrap .sb-field input::placeholder { color: var(--placeholder); opacity: 1; }

.sb-account-wrap .sb-field input:focus,
.sb-account-wrap .sb-field select:focus,
.sb-account-wrap form .sb-field input:focus,
.sb-account-wrap form .sb-field select:focus {
	border-color: var(--spartan-gold);
	box-shadow: 0 0 0 3px rgba(206, 171, 89, 0.15);
}

.sb-account-wrap .sb-field.is-error input,
.sb-account-wrap .sb-field.is-error select {
	border-color: var(--error-red);
	box-shadow: 0 0 0 3px rgba(214, 54, 55, 0.12);
}

.sb-account-wrap .sb-field.has-right input { padding-right: 50px; }

.sb-account-wrap .sb-field-select select { cursor: pointer; padding-right: 48px; }
.sb-account-wrap .sb-field-select.is-placeholder select { color: var(--placeholder); }

.sb-account-wrap .sb-chev {
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	color: var(--muted-text);
	pointer-events: none;
}

.sb-account-wrap .sb-eye {
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	color: var(--muted-text);
	cursor: pointer;
	transition: color 200ms;
	background: none;
	border: none;
	padding: 0;
	line-height: 0;
}

.sb-account-wrap .sb-eye svg { width: 20px; height: 20px; display: block; }
.sb-account-wrap .sb-eye:hover { color: #000; }

/* Two-glyph eye toggle: closed shown by default, open shown when .is-on. */
.sb-account-wrap .sb-eye .sb-eye-icon--open { display: none; }
.sb-account-wrap .sb-eye.is-on .sb-eye-icon--closed { display: none; }
.sb-account-wrap .sb-eye.is-on .sb-eye-icon--open { display: block; }
.sb-account-wrap .sb-field.has-right .sb-eye { z-index: 3; padding: 4px; }

/* Suppress WooCommerce's auto-injected show-password button + strength meter.
 * WC's password-strength-meter.min.js wraps input[name="password"] in
 * <span class="password-input"> and appends <span class="show-password-input">.
 * That collides with our .sb-eye toggle. Strength meter HTML is also hidden
 * since the gate uses our own server-side validation. */
.sb-account-wrap .show-password-input,
.sb-account-wrap .woocommerce-password-strength,
.sb-account-wrap .woocommerce-password-hint { display: none !important; }
.sb-account-wrap .password-input { display: block; position: static; }

.sb-account-wrap .sb-err {
	color: var(--error-red);
	font-size: 13px;
	padding-left: 20px;
	margin-top: -6px;
	line-height: 1.45;
}

/* ---------- Checkbox ---------- */
.sb-account-wrap .sb-check {
	display: inline-flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 13px;
	cursor: pointer;
	line-height: 1.55;
}

/* Hide the native checkbox; the .sb-check-box span is the visible control. */
.sb-account-wrap .sb-check input[type="checkbox"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sb-account-wrap .sb-check-box {
	width: 20px;
	height: 20px;
	border: 1.5px solid var(--placeholder);
	border-radius: 4px;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-top: 1px;
	transition: all 200ms;
}

.sb-account-wrap .sb-check-box svg {
	width: 12px;
	height: 12px;
	stroke: #fff;
	fill: none;
	stroke-width: 3;
	opacity: 0;
	transition: opacity 150ms;
}

.sb-account-wrap .sb-check input[type="checkbox"]:checked + .sb-check-box,
.sb-account-wrap .sb-check-box.is-on {
	background: var(--spartan-gold);
	border-color: var(--spartan-gold);
}

.sb-account-wrap .sb-check input[type="checkbox"]:checked + .sb-check-box svg,
.sb-account-wrap .sb-check-box.is-on svg {
	opacity: 1;
}

.sb-account-wrap .sb-check input[type="checkbox"]:focus-visible + .sb-check-box {
	outline: 2px solid var(--spartan-gold);
	outline-offset: 2px;
}

/* ---------- Consent block ---------- */
.sb-account-wrap .sb-consent-label {
	font-family: var(--font-sans);
	font-weight: 700;
	font-size: 14px;
	color: #000;
	margin-bottom: 10px;
}

.sb-account-wrap .sb-consent-label .req { color: var(--error-red); font-weight: 600; }

.sb-account-wrap .sb-consent {
	font-family: var(--font-sans);
	font-weight: 400;
	font-size: 13px;
	line-height: 1.6;
	color: #1a1a1a;
}

.sb-account-wrap .sb-consent .ph,
.sb-account-wrap .sb-consent b.is-ph {
	color: var(--placeholder);
	font-weight: 400;
}

.sb-account-wrap .sb-consent b { font-weight: 700; color: #000; }

.sb-account-wrap .sb-consent .tc {
	color: #000;
	font-weight: 700;
	cursor: pointer;
	border: none;
	background: none;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
	text-decoration: underline;
}

.sb-account-wrap .sb-consent .tc:hover { color: var(--spartan-gold); }

/* ---------- Accordion (Terms & Conditions) ---------- */
.sb-account-wrap .sb-acc {
	border-radius: 8px;
	overflow: hidden;
	background: #f0f0f0;
	margin-top: 4px;
}

.sb-account-wrap .sb-acc-head {
	height: 52px;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 14px;
	color: #1a1a1a;
	cursor: pointer;
	user-select: none;
}

.sb-account-wrap .sb-acc-caret {
	width: 12px;
	height: 12px;
	color: #1a1a1a;
	transition: transform 250ms var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.sb-account-wrap .sb-acc-caret.is-open { transform: rotate(90deg); }

.sb-account-wrap .sb-acc-body-wrap {
	overflow: hidden;
	max-height: 0;
	transition: max-height 250ms var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
	background: #fff;
}

.sb-account-wrap .sb-acc-body {
	padding: 18px 20px;
	font-size: 13px;
	line-height: 1.65;
	color: #1a1a1a;
}

.sb-account-wrap .sb-acc-body p { margin: 0 0 10px; }
.sb-account-wrap .sb-acc-body p:last-child { margin: 0; }

/* ---------- Buttons (override WoodMart .button specificity) ---------- */
.sb-account-wrap .sb-btn,
.sb-account-wrap button.sb-btn,
.sb-account-wrap a.sb-btn,
.sb-account-wrap form .sb-btn {
	height: 50px;
	min-height: 50px;
	padding: 0 28px;
	border-radius: 8px;
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	border: none;
	cursor: pointer;
	transition: background 200ms, color 200ms, border-color 200ms, opacity 200ms;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	line-height: 50px;
	box-shadow: none;
	text-decoration: none;
}

.sb-account-wrap .sb-btn-primary,
.sb-account-wrap button.sb-btn-primary,
.sb-account-wrap a.sb-btn-primary {
	background: var(--spartan-gold);
	color: #fff;
}

.sb-account-wrap .sb-btn-secondary,
.sb-account-wrap a.sb-btn-secondary {
	background: #fff;
	color: #000;
	border: 2px solid var(--spartan-gold);
}

/* Richer darker gold for hover; both primary + secondary share it so the family reads consistent. */
:root { --spartan-gold-hover: #a8893f; }

.sb-account-wrap .sb-btn-primary:hover,
.sb-account-wrap a.sb-btn-primary:hover,
.sb-account-wrap a.sb-btn.sb-btn-primary:hover,
.sb-account-wrap button.sb-btn-primary:hover,
body .sb-account-wrap .sb-btn-primary:hover {
	background: var(--spartan-gold-hover) !important;
	color: #fff !important;
	border-color: var(--spartan-gold-hover) !important;
}

.sb-account-wrap .sb-btn-secondary:hover,
.sb-account-wrap a.sb-btn-secondary:hover,
.sb-account-wrap a.sb-btn.sb-btn-secondary:hover,
body .sb-account-wrap .sb-btn-secondary:hover {
	background: var(--spartan-gold-hover) !important;
	color: #fff !important;
	border-color: var(--spartan-gold-hover) !important;
}

.sb-account-wrap .sb-btn-full { width: 100%; }

.sb-account-wrap .sb-btn:focus-visible {
	outline: 2px solid var(--spartan-gold);
	outline-offset: 2px;
}

.sb-account-wrap .sb-btn:disabled,
.sb-account-wrap .sb-btn[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

/* ---------- Tab-content transition ---------- */
.sb-account-wrap .sb-tabpanel { opacity: 1; transition: opacity 200ms var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)); }
.sb-account-wrap .sb-tabpanel.is-leaving { opacity: 0; }
.sb-account-wrap .sb-tabpanel[hidden] { display: none; }

/* ---------- Forgot / small link ---------- */
.sb-account-wrap .sb-smalllink {
	font-size: 13px;
	color: #1a1a1a;
	text-decoration: underline;
	text-align: center;
	cursor: pointer;
	display: block;
	padding: 4px;
}

.sb-account-wrap .sb-smalllink:hover { color: var(--spartan-gold); }

/* ---------- Success state (kept for parity; production redirects instead) ---------- */
.sb-account-wrap .sb-success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	padding: 40px 32px;
	border-radius: 12px;
	text-align: center;
}

.sb-account-wrap .sb-success-icon {
	width: 56px;
	height: 56px;
	background: var(--check-green);
	border-radius: 50%;
	margin: 0 auto 18px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sb-account-wrap .sb-success-icon svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 3; }

.sb-account-wrap .sb-success h3 {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 28px;
	margin: 0 0 8px;
	color: #14532d;
	letter-spacing: 0.3px;
}

.sb-account-wrap .sb-success p { margin: 0; color: #166534; font-size: 14px; }

/* ---------- Hidden helper ---------- */
.sb-account-wrap .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- WC notices inside the wrap ---------- */
.sb-account-wrap .woocommerce-notices-wrapper,
.sb-account-wrap .sb-notices-wrap {
	max-width: 1280px;
	margin: 24px auto 0;
	padding: 0 clamp(24px, 4vw, 56px);
}

.sb-account-wrap .sb-notices-wrap:empty { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
	.sb-account-wrap .sb-hero { grid-template-columns: 1fr; gap: 40px; }
	.sb-account-wrap .sb-ctas { max-width: 100%; }
	.sb-account-wrap .sb-left { max-width: 640px; }
}

@media (max-width: 767px) {
	.sb-account-wrap .sb-page { padding: 32px 20px 48px; }
	.sb-account-wrap .sb-left h1 { font-size: 30px; }
	.sb-account-wrap .sb-card { padding: 20px; }
}

@media (max-width: 520px) {
	.sb-account-wrap .sb-grid-2 { grid-template-columns: 1fr; }
}
