/* ==========================================================================
   STG Labs: My Account login + register (enqueued on the account page only).
   Two cards side by side from 782px, stacked below. Brand tokens from theme.json.
   ========================================================================== */

.woocommerce-account #customer_login {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
	max-width: 64rem;
	margin: 0 0 var(--wp--preset--spacing--50, 3rem);
}

/* WooCommerce's col2-set clearfix pseudo-elements would become grid items. */
.woocommerce-account #customer_login::before,
.woocommerce-account #customer_login::after {
	content: none;
	display: none;
}

.woocommerce-account #customer_login > .u-column1,
.woocommerce-account #customer_login > .u-column2,
.woocommerce-account .woocommerce > form.woocommerce-form-login,
.woocommerce-account form.lost_reset_password {
	float: none;
	width: auto;
	margin: 0;
	display: flex;
	flex-direction: column;
	padding: clamp(1.25rem, 0.9rem + 1.5vw, 2.25rem);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--wp--custom--radius--l, 20px);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0) 100%),
		var(--wp--preset--color--surface);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 1px 2px rgba(0, 0, 0, 0.5);
	color: var(--wp--preset--color--silver);
}

/* New customers: the register card carries the gold edge. */
.woocommerce-account #customer_login > .u-column2 {
	border-color: rgba(201, 162, 74, 0.32);
}

/* Login alone (registration off) and the lost-password form: one readable card. */
.woocommerce-account .woocommerce > form.woocommerce-form-login,
.woocommerce-account form.lost_reset_password {
	max-width: 32rem;
}

@media (min-width: 782px) {
	.woocommerce-account #customer_login {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.5rem;
		align-items: stretch;
	}
}

.woocommerce-account #customer_login h2 {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.6rem, 1.35rem + 0.8vw, 2rem);
	font-weight: 500;
	line-height: 1.1;
	color: var(--wp--preset--color--bone);
}

/* WooCommerce frames form.login / form.register; the card already does. */
.woocommerce-account #customer_login form.login,
.woocommerce-account #customer_login form.register {
	flex: 1;
	display: flex;
	flex-direction: column;
	margin: 1.25rem 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
}

.woocommerce-account .woocommerce-form-row,
.woocommerce-account #customer_login .form-row {
	float: none;
	width: auto;
	margin: 0 0 1rem;
	padding: 0;
}

.woocommerce-account #customer_login label {
	display: block;
	margin: 0 0 0.4rem;
	font-size: 0.875rem;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--silver);
}

.woocommerce-account #customer_login .required {
	color: var(--wp--preset--color--gold);
	text-decoration: none;
	border: 0;
}

.woocommerce-account #customer_login input.input-text {
	min-height: 2.75rem;
}

.woocommerce-account #customer_login input.input-text:focus-visible {
	outline: none;
	border-color: var(--wp--preset--color--gold);
	box-shadow: 0 0 0 1px var(--wp--preset--color--gold);
}

/* Checkbox rows: remember me, 21+ confirmation. */
.woocommerce-account #customer_login .woocommerce-form__label-for-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	margin: 0;
	line-height: 1.5;
	cursor: pointer;
}

.woocommerce-account #customer_login input[type="checkbox"] {
	flex: none;
	width: 1.1rem;
	height: 1.1rem;
	margin: 0.15rem 0 0;
	accent-color: var(--wp--preset--color--gold);
}

.woocommerce-account #customer_login input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
}

.woocommerce-account .stg-age-confirm {
	padding: 0.9rem 1rem !important;
	border: 1px solid rgba(201, 162, 74, 0.3);
	border-radius: var(--wp--custom--radius--m, 12px);
	background: rgba(201, 162, 74, 0.05);
}

.woocommerce-account .stg-age-confirm .woocommerce-form__label-for-checkbox {
	color: var(--wp--preset--color--bone);
}

/* Login row: remember me above a full-width button. */
.woocommerce-account #customer_login .woocommerce-form-login .form-row:has(.woocommerce-form-login__submit) {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 1rem;
}

.woocommerce-account #customer_login .woocommerce-form-login__submit,
.woocommerce-account #customer_login .woocommerce-form-register__submit {
	float: none !important;
	width: 100%;
	margin: 0.25rem 0 0 !important;
}

.woocommerce-account .lost_password {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
}

.woocommerce-account .lost_password a {
	color: var(--wp--preset--color--gold-light);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	text-decoration-color: rgba(201, 162, 74, 0.6);
}

/* "A link to set a new password will be sent ..." and the privacy text. */
.woocommerce-account #customer_login form.register > p:not(.form-row):not(.woocommerce-form-row),
.woocommerce-account .woocommerce-privacy-policy-text,
.woocommerce-account .woocommerce-privacy-policy-text p {
	margin: 0 0 1rem;
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
}

.woocommerce-account .woocommerce-privacy-policy-text a {
	color: var(--wp--preset--color--gold-light);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

@media (max-width: 600px) {
	.woocommerce-account #customer_login input.input-text {
		font-size: 16px;
	}
}
