/* Account entry and recovery continuation of the approved account concept.
 * Load after private-surfaces.css and ui-primitives.css. No behaviour changes.
 */
body.torrelles-auth-ui {
	--tvc-color-surface: var(--ui-paper);
	--torrelles-private-surface: var(--ui-paper);
	--tvc-color-line: var(--ui-line);
}
body.torrelles-auth-ui #main {
	padding: clamp(48px, 6.8vw, 108px) var(--ui-space) 64px !important;
}
body.torrelles-auth-ui #main #content { padding-bottom: 0; }
body.torrelles-auth-ui #main > .fusion-row,
body.torrelles-auth-ui #main .post-content > .woocommerce {
	width: 100%; max-width: 1260px !important; margin-inline: auto;
}
body.torrelles-auth-ui #main .post-content > .woocommerce {
	padding: 0; border: 0; background: transparent;
}
body.torrelles-auth-ui #main .post-content { background: transparent; }
body.torrelles-auth-ui #main :is(.tvc-account-access__eyebrow, .tvc-lost-password-intro__eyebrow),
body.torrelles-auth-ui #main-content .tvc-access-request > .eyebrow { display: none; }
body.torrelles-auth-ui #main :is(.tvc-account-access h1, .tvc-lost-password-intro h1),
body.torrelles-auth-ui #main-content .tvc-access-request h1 {
	max-width: none; margin: 0 0 26px; padding: .05em 0 25px; border-bottom: 1px solid var(--ui-ink);
	color: var(--ui-ink); font: 400 clamp(52px, 5.9vw, 90px)/1.1 'Torrelles UI Display', sans-serif !important;
	letter-spacing: -.025em; text-transform: uppercase;
}
body.torrelles-auth-ui #main :is(.tvc-account-access, .woocommerce-form-login, .woocommerce-ResetPassword, #customer_login),
body.torrelles-auth-ui #main-content .tvc-access-request {
	box-sizing: border-box; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
body.torrelles-auth-ui #main :is(.tvc-account-access > p, .woocommerce-ResetPassword > p:first-child),
body.torrelles-auth-ui #main-content .tvc-access-request > p:not(.eyebrow) {
	max-width: none; margin: 0 0 30px; color: var(--ui-ink); font: 400 16px/1.7 var(--ui-font);
}
body.torrelles-auth-ui #main :is(.tvc-account-access__recovery, .woocommerce-LostPassword a),
body.torrelles-auth-ui #main-content .tvc-access-request .text-link {
	display: inline-flex; align-items: center; min-height: 44px; padding: 6px 0;
	color: var(--ui-ink); font: 450 15px/1.5 var(--ui-font); text-decoration: underline; text-underline-offset: 5px;
}
body.torrelles-auth-ui #main :is(.tvc-account-access__recovery, .woocommerce-LostPassword a):hover,
body.torrelles-auth-ui #main-content .tvc-access-request .text-link:hover { color: var(--brand-accent-strong); }

/* Both forms stay native, including the parent wrapper and every hook. */
body.torrelles-auth-login #main .post-content > .woocommerce {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(70px, 9.3vw, 140px); align-items: start;
}
body.torrelles-auth-login #main .tvc-account-access { grid-column: 1; grid-row: 2; max-width: 460px; }
body.torrelles-auth-login #main .tvc-account-access__divider { display: none; }
body.torrelles-auth-login #main .woocommerce-notices-wrapper { grid-column: 1 / -1; grid-row: 1; }
body.torrelles-auth-login #main .woocommerce-notices-wrapper:empty { display: none; }
body.torrelles-auth-login #main #customer_login {
	position: relative; grid-column: 2; grid-row: 2; width: 100%; min-width: 0; min-height: 100%; margin: 0; overflow: visible;
}
body.torrelles-auth-login #main #customer_login::before {
	display: block; position: absolute; top: 0; bottom: 0; left: calc(-.5 * clamp(70px, 9.3vw, 140px)); width: 1px; background: var(--ui-line); content: '';
}
body.torrelles-auth-login #main #customer_login > h2 {
	margin: 9px 0 32px; padding: 0 0 21px; border-bottom: 1px solid var(--ui-line);
	font: 650 30px/1.3 var(--ui-font) !important; letter-spacing: -.035em;
}
body.torrelles-auth-login #main .tvc-account-access__form { display: block; margin: 26px 0 16px; padding: 0; border: 0; }
body.torrelles-auth-login #main .tvc-account-access__form > label { display: block; margin: 0 0 10px; font: 650 15px/1.4 var(--ui-font); }
body.torrelles-auth-login #main .tvc-account-access__controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
body.torrelles-auth-login #main .woocommerce .tvc-account-access__controls input {
	box-sizing: border-box; width: 100%; min-height: 52px; padding: 12px 14px;
	border: 1px solid var(--ui-ink); border-radius: 0; background: var(--ui-paper); color: var(--ui-ink); font: 400 16px/1.5 var(--ui-font);
}
body.torrelles-auth-login #main .tvc-account-access__controls .button { width: 100%; min-width: 0; }
body.torrelles-auth-login #main .woocommerce-form-login { width: 100%; max-width: none; padding: 0; }
body.torrelles-auth-login #main #customer_login .woocommerce-form-login .form-row { display: block; float: none; width: 100%; margin: 0 0 28px; }
body.torrelles-auth-login #main .woocommerce-form-login .form-row > .woocommerce-form-login__rememberme {
	display: flex; align-items: center; gap: 10px; margin: 0 0 24px; padding: 0; font-size: 14px; font-weight: 450;
}
body.torrelles-auth-login #main .woocommerce-form-login__rememberme input { margin: 0; }
body.torrelles-auth-login #main .woocommerce .woocommerce-form-login__submit {
	width: 100%; margin: 0; border-color: var(--ui-ink); background: transparent; color: var(--ui-ink);
}
body.torrelles-auth-login #main .woocommerce .woocommerce-form-login__submit:hover { border-color: var(--ui-ink); background: var(--ui-ink); color: var(--ui-paper); }
body.torrelles-auth-login #main #customer_login .woocommerce-LostPassword { display: block; float: none; margin: -12px 0 0; }
/* Provider return is a validated presentation context, never an access grant. */
body.torrelles-auth-provider #main .tvc-account-access :is(.tvc-account-access__form, .tvc-account-access__recovery, .tvc-account-access__notice) { display: none; }
body.torrelles-auth-provider #main .woocommerce .woocommerce-form-login__submit { border-color: var(--brand-accent); background: var(--brand-accent); color: var(--brand-on-accent); }
body.torrelles-auth-provider #main .woocommerce .woocommerce-form-login__submit:hover { border-color: var(--brand-accent-hover); background: var(--brand-accent-hover); color: var(--brand-on-accent); }
body.torrelles-auth-ui #main .woocommerce .password-input input { padding-right: 56px; }
body.torrelles-auth-ui #main .woocommerce .show-password-input {
	width: 44px; min-width: 44px; height: 44px; min-height: 44px; top: 4px; right: 4px;
	margin: 0; padding: 0; border: 0; background: transparent; transform: none;
}

/* Native recovery is outside Woo's form wrapper: apply the same tokens here. */
body.torrelles-auth-recovery #main-content.tvc-workbench--access {
	width: min(100%, 760px); max-width: 760px; min-height: 0; margin: 0 auto; padding: 0; background: var(--ui-paper); font-family: var(--ui-font);
}
body.torrelles-auth-recovery #main-content .tvc-access-request { width: 100%; }
body.torrelles-auth-recovery #main-content .tvc-access-request[hidden] { display: none !important; }
body.torrelles-auth-recovery #main-content .tvc-access-request h1 { font-size: clamp(48px, 5.5vw, 80px) !important; }
body.torrelles-auth-recovery #main-content .tvc-access-request__form { display: grid; gap: 24px; margin: 30px 0 16px; }
body.torrelles-auth-recovery #main-content .tvc-access-request__form label { display: grid; gap: 8px; color: var(--ui-ink); font: 650 15px/1.4 var(--ui-font); }
body.torrelles-auth-recovery #main-content .tvc-access-request__form input:not([type=hidden]) {
	box-sizing: border-box; width: 100%; max-width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--ui-ink);
	border-radius: 0; background: var(--ui-paper); color: var(--ui-ink); font: 400 16px/1.5 var(--ui-font);
}
body.torrelles-auth-recovery #main-content .tvc-access-request__form .button {
	display: inline-flex; justify-content: center; align-items: center; min-height: 52px; width: fit-content; max-width: 100%; margin: 0; padding: 15px 24px;
	border: 1px solid var(--brand-accent); border-radius: 0; background: var(--brand-accent); color: var(--brand-on-accent);
	font: 750 14px/1.4 var(--ui-font); letter-spacing: .025em; text-transform: uppercase; box-shadow: none; cursor: pointer;
}
body.torrelles-auth-recovery #main-content .tvc-access-request__form .button:hover:not(:disabled) { background: var(--brand-accent-hover); border-color: var(--brand-accent-hover); }
body.torrelles-auth-recovery #main-content .tvc-access-request__form .button:disabled { opacity: .6; cursor: wait; }
body.torrelles-auth-recovery #main-content :is(a, button, input):focus-visible { outline: 3px solid var(--brand-focus) !important; outline-offset: 3px; }
body.torrelles-auth-ui #main .tvc-account-access__notice,
body.torrelles-auth-ui #main-content .tvc-access-request__notice {
	margin: 24px 0; padding: 18px 22px; border: 0; border-inline-start: 4px solid var(--ui-teal);
	background: color-mix(in srgb, var(--ui-teal) 9%, var(--ui-paper)); color: var(--ui-ink); font: 400 16px/1.5 var(--ui-font);
}
body.torrelles-auth-ui #main .tvc-account-access__notice--error,
body.torrelles-auth-ui #main-content .tvc-access-request__notice--error { border-inline-start-color: var(--brand-danger); background: var(--brand-danger-soft); }
body.torrelles-auth-password #main .post-content > .woocommerce { display: block; max-width: 760px !important; }
body.torrelles-auth-password #main .tvc-lost-password-intro { width: 100%; margin: 0; padding: 0; border: 0; }
body.torrelles-auth-password #main .tvc-lost-password-intro h1 { font-size: clamp(48px, 5.5vw, 80px) !important; }
body.torrelles-auth-password #main .woocommerce-ResetPassword { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; }
body.torrelles-auth-password #main .woocommerce-ResetPassword .form-row { float: none; width: 100%; margin-bottom: 24px; }
body.torrelles-auth-password #main .woocommerce-ResetPassword .button { margin-top: 4px; }

@media (max-width: 900px) {
	body.torrelles-auth-login #main .post-content > .woocommerce { display: block; width: min(100%, 600px); }
	body.torrelles-auth-login #main .tvc-account-access { max-width: none; }
	body.torrelles-auth-login #main #customer_login { min-height: 0; margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--ui-line); }
	body.torrelles-auth-login #main #customer_login::before { display: none; }
	body.torrelles-auth-login #main #customer_login > h2 { margin-top: 0; padding-bottom: 0; border-bottom: 0; }
}
@media (max-width: 640px) {
	body.torrelles-auth-ui #main { padding-top: 40px !important; }
	body.torrelles-auth-ui #main :is(.tvc-account-access h1, .tvc-lost-password-intro h1),
	body.torrelles-auth-ui #main-content .tvc-access-request h1 { margin-bottom: 24px; padding-bottom: 24px; font-size: clamp(44px, 11vw, 60px) !important; }
	body.torrelles-auth-login #main .tvc-account-access h1 { max-width: 350px; }
	body.torrelles-auth-login #main #customer_login > h2 { font-size: 26px !important; }
	body.torrelles-auth-login #main .woocommerce-form-login .form-row { margin-bottom: 24px; }
	body.torrelles-auth-password #main .woocommerce-ResetPassword .button,
	body.torrelles-auth-recovery #main-content .tvc-access-request__form .button { width: 100%; }
}
