/**
 * Australia Peptide Sciences Core: focused members-only login page.
 *
 * Loaded only on the WooCommerce My Account page for logged-out visitors
 * while the Storefront Gate is on (body.aps-gate-page).
 */

body.aps-gate-page {
	--aps-gate-bg-1: #051a2d;
	--aps-gate-bg-2: #0a2f52;
	--aps-gate-bg-3: #0d4a7e;
	--aps-gate-blue: #0b73c6;
	--aps-gate-blue-dark: #07549a;
	--aps-gate-text: #0f1b2d;
	--aps-gate-muted: #5b6b7f;
	--aps-gate-line: #dbe4ee;
	--aps-gate-soft: #eef4fa;
	--aps-gate-radius: 22px;
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: var(--aps-gate-text);
	background-color: var(--aps-gate-bg-2);
	background-image:
		radial-gradient(900px 520px at 12% -8%, rgba(38, 146, 235, 0.32), transparent 60%),
		radial-gradient(760px 480px at 100% 110%, rgba(20, 110, 190, 0.28), transparent 60%),
		linear-gradient(165deg, var(--aps-gate-bg-1) 0%, var(--aps-gate-bg-2) 55%, var(--aps-gate-bg-3) 100%);
	font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

body.aps-gate-page *,
body.aps-gate-page *::before,
body.aps-gate-page *::after {
	box-sizing: border-box;
}

body.aps-gate-page .aps-gate {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	width: 100%;
	padding: 48px 16px 32px;
}

body.aps-gate-page .aps-gate__card {
	width: 100%;
	max-width: 460px;
	padding: 34px 32px 26px;
	border-radius: var(--aps-gate-radius);
	background: #ffffff;
	box-shadow: 0 34px 90px rgba(1, 10, 22, 0.55), 0 2px 0 rgba(255, 255, 255, 0.06) inset;
}

body.aps-gate-page .aps-gate__brand {
	display: flex;
	justify-content: center;
	margin: 0 0 22px;
	text-decoration: none;
}

body.aps-gate-page .aps-gate__brand img,
body.aps-gate-page .aps-gate__brand .custom-logo {
	display: block;
	width: auto;
	max-width: 220px;
	height: auto;
	max-height: 64px;
}

body.aps-gate-page .aps-gate__brand-name {
	color: var(--aps-gate-text);
	font-size: 20px;
	font-weight: 800;
}

body.aps-gate-page .aps-gate__title {
	margin: 0 0 8px;
	color: var(--aps-gate-text);
	font-size: clamp(24px, 5vw, 30px);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	text-align: center;
}

body.aps-gate-page .aps-gate__message {
	margin: 0 auto 16px;
	max-width: 380px;
	color: var(--aps-gate-muted);
	font-size: 15px;
	text-align: center;
}

body.aps-gate-page .aps-gate__points {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

body.aps-gate-page .aps-gate__points li {
	margin: 0;
	padding: 5px 12px 5px 28px;
	border-radius: 999px;
	color: var(--aps-gate-blue-dark);
	background: var(--aps-gate-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%230b73c6' d='M6.2 11.6 2.9 8.3l1.1-1.1 2.2 2.2 5.8-5.8 1.1 1.1z'/%3E%3C/svg%3E") no-repeat 10px 50% / 13px;
	font-size: 13px;
	font-weight: 700;
}

/* Segmented switch between the two forms. */
body.aps-gate-page .aps-gate__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	margin: 0 0 22px;
	padding: 4px;
	border-radius: 14px;
	background: var(--aps-gate-soft);
}

body.aps-gate-page .aps-gate__tab {
	display: block;
	padding: 10px 12px;
	border-radius: 11px;
	color: var(--aps-gate-muted);
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

body.aps-gate-page .aps-gate__tab:hover,
body.aps-gate-page .aps-gate__tab:focus-visible {
	color: var(--aps-gate-blue-dark);
}

body.aps-gate-page .aps-gate__tab[aria-current="page"] {
	color: var(--aps-gate-text);
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(15, 27, 45, 0.12), 0 6px 16px rgba(15, 27, 45, 0.08);
}

body.aps-gate-page .aps-gate__tab:focus-visible,
body.aps-gate-page .aps-gate__switch a:focus-visible,
body.aps-gate-page .aps-gate__links a:focus-visible {
	outline: 3px solid rgba(11, 115, 198, 0.35);
	outline-offset: 2px;
}

/* WooCommerce forms inside the card: one form at a time. */
body.aps-gate-page .aps-gate__forms .woocommerce,
body.aps-gate-page .aps-gate__forms .u-columns,
body.aps-gate-page .aps-gate__forms .col2-set {
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
}

body.aps-gate-page .aps-gate__forms .u-columns::before,
body.aps-gate-page .aps-gate__forms .u-columns::after {
	display: none;
	content: none;
}

body.aps-gate-page .aps-gate__forms .u-column1,
body.aps-gate-page .aps-gate__forms .u-column2,
body.aps-gate-page .aps-gate__forms .col-1,
body.aps-gate-page .aps-gate__forms .col-2 {
	float: none;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

body.aps-gate-page .aps-gate__card[data-mode="register"] .aps-gate__forms .u-column1,
body.aps-gate-page .aps-gate__card[data-mode="login"] .aps-gate__forms .u-column2 {
	display: none;
}

body.aps-gate-page .aps-gate__forms .u-column1 > h2,
body.aps-gate-page .aps-gate__forms .u-column2 > h2,
body.aps-gate-page .aps-gate__forms #customer_login h2 {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

body.aps-gate-page .aps-gate__forms form.login,
body.aps-gate-page .aps-gate__forms form.register,
body.aps-gate-page .aps-gate__forms form.lost_reset_password,
body.aps-gate-page .aps-gate__forms form.woocommerce-ResetPassword {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

body.aps-gate-page .aps-gate__forms .form-row {
	display: block;
	float: none;
	width: 100%;
	margin: 0 0 14px;
	padding: 0;
}

body.aps-gate-page .aps-gate__forms label {
	display: block;
	margin: 0 0 6px;
	color: var(--aps-gate-text);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

body.aps-gate-page .aps-gate__forms label .required {
	color: #c0392b;
	text-decoration: none;
}

body.aps-gate-page .aps-gate__forms input.input-text,
body.aps-gate-page .aps-gate__forms input[type="text"],
body.aps-gate-page .aps-gate__forms input[type="email"],
body.aps-gate-page .aps-gate__forms input[type="password"],
body.aps-gate-page .aps-gate__forms input[type="number"] {
	display: block;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 12px 14px;
	border: 1.5px solid var(--aps-gate-line);
	border-radius: 12px;
	color: var(--aps-gate-text);
	background: #ffffff;
	box-shadow: none;
	font: inherit;
	font-size: 16px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.aps-gate-page .aps-gate__forms input.input-text:focus,
body.aps-gate-page .aps-gate__forms input[type="text"]:focus,
body.aps-gate-page .aps-gate__forms input[type="email"]:focus,
body.aps-gate-page .aps-gate__forms input[type="password"]:focus,
body.aps-gate-page .aps-gate__forms input[type="number"]:focus {
	border-color: var(--aps-gate-blue);
	outline: none;
	box-shadow: 0 0 0 4px rgba(11, 115, 198, 0.16);
}

body.aps-gate-page .aps-gate__forms .password-input {
	display: block;
	position: relative;
	width: 100%;
}

body.aps-gate-page .aps-gate__forms .show-password-input {
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
}

body.aps-gate-page .aps-gate__forms p:not(.form-row),
body.aps-gate-page .aps-gate__forms .woocommerce-privacy-policy-text,
body.aps-gate-page .aps-gate__forms .woocommerce-privacy-policy-text p {
	margin: 0 0 14px;
	color: var(--aps-gate-muted);
	font-size: 13px;
	line-height: 1.5;
}

body.aps-gate-page .aps-gate__forms a {
	color: var(--aps-gate-blue-dark);
	font-weight: 600;
}

body.aps-gate-page .aps-gate__forms button.button,
body.aps-gate-page .aps-gate__forms .woocommerce-button,
body.aps-gate-page .aps-gate__forms .woocommerce-Button,
body.aps-gate-page .aps-gate__forms button[type="submit"] {
	display: block;
	width: 100%;
	min-height: 52px;
	margin: 6px 0 0;
	padding: 13px 18px;
	border: 0;
	border-radius: 12px;
	color: #ffffff;
	background: linear-gradient(135deg, var(--aps-gate-blue) 0%, var(--aps-gate-blue-dark) 100%);
	box-shadow: 0 10px 24px rgba(7, 84, 154, 0.28);
	font: inherit;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

body.aps-gate-page .aps-gate__forms button.button:hover,
body.aps-gate-page .aps-gate__forms button[type="submit"]:hover {
	filter: brightness(1.06);
	box-shadow: 0 14px 30px rgba(7, 84, 154, 0.34);
}

body.aps-gate-page .aps-gate__forms button.button:active,
body.aps-gate-page .aps-gate__forms button[type="submit"]:active {
	transform: translateY(1px);
}

body.aps-gate-page .aps-gate__forms button.button:focus-visible,
body.aps-gate-page .aps-gate__forms button[type="submit"]:focus-visible {
	outline: 3px solid rgba(11, 115, 198, 0.4);
	outline-offset: 3px;
}

body.aps-gate-page .aps-gate__forms .woocommerce-form-login__rememberme {
	display: none !important;
}

body.aps-gate-page .aps-gate__forms .lost_password {
	margin: 12px 0 0;
	text-align: center;
}

/* Math captcha a security plugin adds to the login form (WP Ghost: div.humanity). */
body.aps-gate-page .aps-gate__forms div.humanity {
	margin: 2px 0 16px;
	color: var(--aps-gate-text);
	font-size: 15px;
	line-height: 1.4;
}

body.aps-gate-page .aps-gate__forms div.humanity strong {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 700;
}

body.aps-gate-page .aps-gate__forms div.humanity input[name="brute_num"] {
	width: 72px;
	max-width: 72px;
	min-height: 44px;
	margin: 0 0 0 6px;
	padding: 8px 10px;
	border: 1.5px solid var(--aps-gate-line);
	border-radius: 12px;
	color: var(--aps-gate-text);
	background: #ffffff;
	font: inherit;
	font-size: 16px;
	text-align: center;
}

body.aps-gate-page .aps-gate__forms div.humanity input[name="brute_num"]:focus {
	border-color: var(--aps-gate-blue);
	outline: none;
	box-shadow: 0 0 0 4px rgba(11, 115, 198, 0.16);
}

/* The site's floating search button does not belong on the members-only page. */
body.aps-gate-page #floating-search-btn-wrapper,
body.aps-gate-page #floating-search-overlay,
body.aps-gate-page #floating-search-box {
	display: none !important;
}

/* WooCommerce notices. */
body.aps-gate-page .aps-gate__forms .woocommerce-error,
body.aps-gate-page .aps-gate__forms .woocommerce-message,
body.aps-gate-page .aps-gate__forms .woocommerce-info,
body.aps-gate-page .aps-gate__forms .woocommerce-notices-wrapper > * {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 0;
	border-radius: 12px;
	list-style: none;
	font-size: 14px;
}

/* WooCommerce focuses new notices for screen readers; no visible ring is needed there. */
body.aps-gate-page .aps-gate__forms [tabindex="-1"]:focus {
	outline: none;
}

body.aps-gate-page .aps-gate__forms .woocommerce-error {
	color: #8a1f14;
	background: #fdecea;
}

body.aps-gate-page .aps-gate__forms .woocommerce-message,
body.aps-gate-page .aps-gate__forms .woocommerce-info {
	color: #0a4a78;
	background: var(--aps-gate-soft);
}

body.aps-gate-page .aps-gate__forms .woocommerce-error::before,
body.aps-gate-page .aps-gate__forms .woocommerce-message::before,
body.aps-gate-page .aps-gate__forms .woocommerce-info::before {
	display: none;
}

body.aps-gate-page .aps-gate__forms .woocommerce-error li {
	margin: 0;
	padding: 0;
	list-style: none;
}

body.aps-gate-page .aps-gate__switch {
	margin: 16px 0 0;
	color: var(--aps-gate-muted);
	font-size: 14px;
	text-align: center;
}

body.aps-gate-page .aps-gate__switch a {
	color: var(--aps-gate-blue-dark);
	font-weight: 800;
	text-decoration: none;
}

body.aps-gate-page .aps-gate__card[data-mode="register"] .aps-gate__switch--login,
body.aps-gate-page .aps-gate__card[data-mode="login"] .aps-gate__switch--register {
	display: none;
}

body.aps-gate-page .aps-gate__statement {
	max-width: 460px;
	margin: 0;
	color: rgba(226, 238, 250, 0.82);
	font-size: 13px;
	line-height: 1.55;
	text-align: center;
}

body.aps-gate-page .aps-gate__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 18px;
}

body.aps-gate-page .aps-gate__links a {
	color: rgba(226, 238, 250, 0.82);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

body.aps-gate-page .aps-gate__links a:hover {
	color: #ffffff;
	text-decoration: underline;
}

@media (max-width: 480px) {
	body.aps-gate-page .aps-gate {
		justify-content: flex-start;
		padding: 20px 12px 28px;
	}

	body.aps-gate-page .aps-gate__card {
		padding: 26px 20px 22px;
		border-radius: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.aps-gate-page .aps-gate__tab,
	body.aps-gate-page .aps-gate__forms button,
	body.aps-gate-page .aps-gate__forms input {
		transition: none;
	}
}
