/* Nexaph Registration — My Account (logged out) */

.nexaph-auth {
	--nx-purple: #5b1a8f;
	--nx-purple-dark: #3f0f66;
	--nx-purple-tint: #f1edf6;
	--nx-ink: #1e1b24;
	--nx-muted: #5f5a6b;
	--nx-line: #e8e3ef;
	--nx-line-strong: #d9d3e3;
	--nx-bg: #f7f5fa;
	--nx-card: #ffffff;
	--nx-error: #b3261e;

	font-family: inherit;
	color: var(--nx-ink);
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
	align-items: flex-start;
	margin: 8px 0 48px;
}

/* Astra's "modern" My Account page (body.ast-modern-woo-account-page) prints an
   inline rule:  .woocommerce-account .entry-content .woocommerce
                 { max-width:540px; margin:2em auto; padding:40px; border:1px solid … }
   That 540px box is what the stock login form sits in. Our layout is two
   columns, so remove the box entirely (same specificity + a body class to win). */
body.woocommerce-account:not(.logged-in) .entry-content .woocommerce {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	box-sizing: border-box;
}
/* Allow the outer Astra container to go wide enough for both columns. */
body.woocommerce-account:not(.logged-in) .ast-container {
	max-width: 1360px;
}
.woocommerce-account:not(.logged-in) .entry-header,
.woocommerce-account:not(.logged-in) .entry-title,
.woocommerce-account:not(.logged-in) .ast-archive-title {
	display: none;
}
.woocommerce-account:not(.logged-in) .site-content {
	background: var(--nx-bg);
}

/* ---------- Left card ---------- */
.nexaph-auth__card {
	text-align: left;
	flex: 1 1 480px;
	max-width: 640px;
	min-width: 0;
	background: var(--nx-card);
	border: 1px solid var(--nx-line);
	border-radius: 16px;
	padding: 40px;
	box-sizing: border-box;
	box-shadow: 0 12px 40px rgba(60, 20, 100, 0.06);
}

.nexaph-auth__toggle {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	background: var(--nx-purple-tint);
	padding: 6px;
	border-radius: 10px;
	margin: 0 0 28px;
}
.nexaph-auth__tab {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 16px;
	color: var(--nx-purple-dark);
	text-decoration: none;
	transition: background .15s, color .15s;
}
.nexaph-auth__tab:hover { color: var(--nx-purple); }
.nexaph-auth__tab.is-active {
	background: var(--nx-purple);
	color: #fff;
}

.nexaph-auth__panel { display: none; }
.nexaph-auth__panel.is-active { display: block; }
/* No-JS fallback: show both panels. */
.nexaph-auth:not(.js-ready) .nexaph-auth__panel { display: block; }

.woocommerce-account .nexaph-auth .nexaph-auth__card h1.nexaph-auth__title {
	text-align: left !important;
	font-family: "DM Serif Display", Georgia, serif;
	font-weight: 600;
	font-size: clamp(28px, 4vw, 38px);
	line-height: 1.15;
	margin: 0 0 6px;
	color: var(--nx-ink);
}
.nexaph-auth h1.nexaph-auth__title span { color: var(--nx-purple); }
.nexaph-auth__sub {
	margin: 0 0 26px;
	font-size: 16px;
	color: var(--nx-muted);
}

/* ---------- Form ---------- */
.nexaph-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 0;
	padding: 0;
	border: 0;
}
.nexaph-form .woocommerce-form-row,
.nexaph-form .form-row { margin: 0; padding: 0; }

.nexaph-field label {
	display: block;
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 8px;
	color: var(--nx-ink);
}
.nexaph-field .required { color: var(--nx-error); text-decoration: none; }

.nexaph-auth .nexaph-form .nexaph-input,
.nexaph-auth .nexaph-form input.input-text,
.nexaph-auth .nexaph-form input[type="text"],
.nexaph-auth .nexaph-form input[type="email"],
.nexaph-auth .nexaph-form input[type="password"],
.nexaph-auth .nexaph-form input[type="tel"],
.nexaph-auth .nexaph-form input[type="date"],
.nexaph-auth .nexaph-form select {
	width: 100%;
	box-sizing: border-box;
	min-height: 52px;
	padding: 0 16px;
	border: 1px solid var(--nx-line-strong);
	border-radius: 8px;
	background: #fff;
	font: inherit;
	font-size: 16px; /* prevents iOS zoom on focus */
	color: var(--nx-ink);
	outline: none;
	box-shadow: none;
}
.nexaph-auth .nexaph-form .nexaph-input::placeholder { color: #9a95a6; }
.nexaph-auth .nexaph-form .nexaph-input:focus,
.nexaph-auth .nexaph-form input:focus,
.nexaph-auth .nexaph-form select:focus {
	border-color: var(--nx-purple);
	box-shadow: 0 0 0 3px rgba(91, 26, 143, 0.15);
}
.nexaph-auth .nexaph-form select.nexaph-select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6577' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-color: #fff;
	padding-right: 40px;
}
.nexaph-auth .nexaph-form select.nexaph-select option { color: var(--nx-ink); }

.nexaph-grid2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.nexaph-pw { position: relative; }
.nexaph-pw .nexaph-input { padding-right: 48px; }
.nexaph-pw__toggle {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border: 0;
	padding: 0;
	background: transparent;
	color: #6b6577;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.nexaph-pw__toggle:hover { color: var(--nx-purple); background: var(--nx-purple-tint); }
/* Hide WooCommerce's own show-password toggle if its script runs. */
.nexaph-pw .show-password-input { display: none; }

.nexaph-row-between {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
.nexaph-link {
	color: var(--nx-purple);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
}
.nexaph-link:hover { color: var(--nx-purple-dark); text-decoration: underline; }

/* Terms box */
.nexaph-terms {
	border: 1px solid var(--nx-line);
	border-radius: 10px;
	background: #faf8fc;
	overflow: hidden;
}
.nexaph-terms__head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 13px 18px;
	border-bottom: 1px solid var(--nx-line);
	font-weight: 600;
	font-size: 15px;
	color: var(--nx-ink);
}
.nexaph-terms__head svg { color: var(--nx-purple); flex: none; }
.nexaph-terms__body {
	max-height: 150px;
	overflow-y: auto;
	padding: 14px 18px;
	font-size: 14px;
	line-height: 1.55;
	color: #4a4556;
}
.nexaph-terms__body h1, .nexaph-terms__body h2, .nexaph-terms__body h3,
.nexaph-terms__body h4 { font-size: 14px; font-weight: 600; margin: 10px 0 4px; color: var(--nx-ink); }
.nexaph-terms__body p { margin: 0 0 10px; }
.nexaph-terms__body > :last-child { margin-bottom: 0; }

/* Checkboxes */
.nexaph-checks { display: flex; flex-direction: column; gap: 14px; }
.nexaph-check {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	font-size: 15px;
	line-height: 1.5;
	cursor: pointer;
	margin: 0;
}
.nexaph-check--strong { font-weight: 600; }
.woocommerce .nexaph-auth .nexaph-check input[type="checkbox"] {
	width: 22px;
	height: 22px;
	min-width: 22px;
	margin: 2px 0 0;
	flex: none;
	position: static;
	opacity: 1;
	visibility: visible;
	border: 1px solid var(--nx-purple);
	border-radius: 4px;
	background: #fff;
	accent-color: var(--nx-purple);
	cursor: pointer;
}
.woocommerce .nexaph-auth .nexaph-check input[type="checkbox"]:checked {
	background: var(--nx-purple);
	border-color: var(--nx-purple);
}
.woocommerce .nexaph-auth .nexaph-check input[type="checkbox"]:checked::before {
	content: "\2713";
	display: block;
	color: #fff;
	text-align: center;
	line-height: 20px;
	font-size: 14px;
	font-weight: 700;
}
.woocommerce .nexaph-auth .nexaph-check input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--nx-purple);
	outline-offset: 2px;
}
.nexaph-check a { color: var(--nx-purple); font-weight: 600; }

/* Button */
.woocommerce .nexaph-auth .nexaph-form button.nexaph-btn,
.woocommerce .nexaph-auth .nexaph-form .nexaph-btn.button {
	width: 100%;
	min-height: 56px;
	border: 0;
	border-radius: 10px;
	background: var(--nx-purple);
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: .3px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	cursor: pointer;
	text-transform: none;
	transition: background .15s;
}
.woocommerce .nexaph-auth .nexaph-form button.nexaph-btn:hover { background: var(--nx-purple-dark); color: #fff; }

/* Astra prints "Not a member? Register" / "Already a member? Login" via *_form_end. */
.nexaph-auth .nexaph-form p.ast-woo-form-actions,
.nexaph-auth .nexaph-form .nexaph-auth__switch {
	margin: 0;
	padding: 0;
	text-align: center;
	font-size: 15px;
	color: var(--nx-muted);
}
.nexaph-auth .nexaph-form p.ast-woo-form-actions a,
.nexaph-auth .nexaph-form .nexaph-auth__switch a { color: var(--nx-purple); font-weight: 600; text-decoration: none; }
.nexaph-auth .nexaph-form p.ast-woo-form-actions a:hover { text-decoration: underline; }

/* WooCommerce's privacy-policy sentence: move it under the checkboxes, mute it. */
.nexaph-auth .nexaph-form .woocommerce-privacy-policy-text {
	order: 90;
	font-size: 13px;
	line-height: 1.5;
	color: var(--nx-muted);
}
.nexaph-auth .nexaph-form .woocommerce-privacy-policy-text p { margin: 0; }
.nexaph-auth .nexaph-form .woocommerce-privacy-policy-text a { color: var(--nx-purple); }
.nexaph-auth .nexaph-form .nexaph-btn { order: 95; }
.nexaph-auth .nexaph-form p.ast-woo-form-actions { order: 99; }

/* ---------- Right brand panel ---------- */
.nexaph-auth__brand {
	text-align: left;
	flex: 1 1 420px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding-top: 12px;
}
.nexaph-auth__eyebrow {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--nx-purple);
}
.woocommerce-account .nexaph-auth .nexaph-auth__brand h2.nexaph-auth__hero {
	text-align: left !important;
	font-family: "DM Serif Display", Georgia, serif;
	font-weight: 600;
	font-size: clamp(34px, 4.5vw, 54px);
	line-height: 1.08;
	margin: 0 0 18px;
	color: var(--nx-ink);
}
.nexaph-auth__lead {
	margin: 0;
	font-size: 18px;
	line-height: 1.55;
	color: #4a4556;
	max-width: 560px;
}

.nexaph-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}
.nexaph-card {
	background: var(--nx-card);
	border: 1px solid var(--nx-line);
	border-radius: 14px;
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.nexaph-card__icon {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	background: var(--nx-purple-tint);
	color: var(--nx-purple);
	display: flex;
	align-items: center;
	justify-content: center;
}
.woocommerce-account .nexaph-auth .nexaph-card h3 { margin: 0; text-align: left !important; font-size: 18px; font-weight: 700; color: var(--nx-ink); font-family: inherit; }
.nexaph-card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--nx-muted); }

.nexaph-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.nexaph-badges span {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border-radius: 999px;
	border: 1px solid var(--nx-line-strong);
	background: #fff;
	font-size: 13px;
	font-weight: 600;
	color: var(--nx-purple-dark);
}

/* WooCommerce notices above the form — tint them purple */
.woocommerce-account:not(.logged-in) .woocommerce-error,
.woocommerce-account:not(.logged-in) .woocommerce-message,
.woocommerce-account:not(.logged-in) .woocommerce-info {
	border-radius: 10px;
	font-family: inherit;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.nexaph-auth { gap: 32px; }
	.nexaph-auth__brand { order: 2; }
	.nexaph-auth__card { max-width: none; }
}
@media (max-width: 600px) {
	.nexaph-auth { margin-top: 0; }
	.nexaph-auth__card {
		padding: 24px 18px;
		border-radius: 12px;
	}
	.nexaph-grid2 { grid-template-columns: minmax(0, 1fr); }
	.nexaph-cards { grid-template-columns: minmax(0, 1fr); }
	.nexaph-auth__lead { font-size: 16px; }
	.nexaph-terms__body { max-height: 130px; }
	.nexaph-terms__head { font-size: 14px; padding: 12px 14px; }
	.nexaph-terms__body { padding: 12px 14px; }
}

/* Combined validation message list */
.woocommerce-account .woocommerce-error .nexaph-error-list { margin: 8px 0 0 18px; padding: 0; list-style: disc; }
.woocommerce-account .woocommerce-error .nexaph-error-list li { margin: 2px 0; }
