/**
 * Pro Peptide — Login / Register full-screen takeover (v7).
 *
 * Loaded on the logged-out my-account page by
 * mu-plugins/pp-login-restyle.php. Paired with template-pp-auth.php which
 * strips header/footer/page-header.
 *
 * v7 fix (2026-05-31): the auth was rendering as a narrow centered column
 * because the WooCommerce shortcode + theme wrappers slap max-width /
 * centered margin on .woocommerce / .woocommerce-account / body grids.
 * Fix: pin .pp-login-auth with `position: fixed; inset: 0` so no parent
 * width can constrain it, and reset every WC/theme wrapper inside the
 * takeover body to remove their max-width + padding.
 */

/* =========================================================================
 * 1. Page reset — body owns the viewport, kill every parent constraint
 * ========================================================================= */

html, body.pp-auth-takeover {
	height: 100%;
	width: 100%;
	margin: 0;
	padding: 0;
	background: #343434;
	overflow: hidden;
}
body.pp-auth-takeover {
	font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
	color: #343434;
}

/* Any wrapper the shortcode or theme drops around the auth UI: kill its
 * width/padding/margin so it can't shrink or center the takeover. */
body.pp-auth-takeover .pp-auth-takeover__main,
body.pp-auth-takeover .woocommerce,
body.pp-auth-takeover .woocommerce-account,
body.pp-auth-takeover .woocommerce > div,
body.pp-auth-takeover .u-columns,
body.pp-auth-takeover .col2-set {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	float: none;
	background: transparent;
	box-sizing: border-box;
}

/* WC notice wrapper: top-pinned strip so error/success notices surface
 * without pushing the layout. */
body.pp-auth-takeover .woocommerce-notices-wrapper {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 30;
	margin: 0;
	padding: 12px 16px;
	background: rgba(52, 52, 52, 0.95);
	color: #ffffff;
	font-size: 13px;
	text-align: center;
}
body.pp-auth-takeover .woocommerce-notices-wrapper:empty { display: none; }
body.pp-auth-takeover .woocommerce-notices-wrapper a { color: #1f9edb; }
body.pp-auth-takeover .woocommerce-notices-wrapper ul,
body.pp-auth-takeover .woocommerce-notices-wrapper li { margin: 0; padding: 0; list-style: none; }

/* =========================================================================
 * 2. Auth shell — fixed-fill viewport, true 50/50 grid
 * ========================================================================= */

body.pp-auth-takeover .pp-login-auth {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100svh;
	margin: 0;
	background: #ffffff;
	border-radius: 0;
	box-shadow: none;
	display: grid;
	grid-template-columns: 1fr 1fr;
	overflow: hidden;
	color: #343434;
	z-index: 10;
}

/* Back-to-shop pill — top-left, sits on the dark panel */
body.pp-auth-takeover .pp-login-auth__back {
	position: absolute;
	top: 20px;
	left: 24px;
	z-index: 15;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px 6px 10px;
	font-size: 12px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
body.pp-auth-takeover .pp-login-auth__back:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.32);
}

/* =========================================================================
 * 3. LEFT — dark brand panel
 * ========================================================================= */

body.pp-auth-takeover .pp-login-auth__panel {
	position: relative;
	background: #343434;
	color: #fafafa;
	padding: 80px 64px 64px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;     /* logo top, copy auto-centers below */
	overflow: hidden;
	min-width: 0;                    /* lets grid track shrink without overflow */
}
body.pp-auth-takeover .pp-login-auth__logo {
	margin-bottom: 60px;
}
body.pp-auth-takeover .pp-login-auth__copy {
	margin-top: auto;                /* center copy in the remaining space */
	margin-bottom: auto;
}
body.pp-auth-takeover .pp-login-auth__panel::after {
	content: "";
	position: absolute;
	inset: -40% -40% auto auto;
	width: 520px;
	height: 520px;
	background: radial-gradient(circle, rgba(31, 158, 219, 0.22) 0%, rgba(31, 158, 219, 0) 70%);
	pointer-events: none;
	z-index: 0;
}
body.pp-auth-takeover .pp-login-auth__panel > * { position: relative; z-index: 1; }

body.pp-auth-takeover .pp-login-auth__logo {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #ffffff;
	text-transform: uppercase;
}
body.pp-auth-takeover .pp-login-auth__logo span {
	color: #1f9edb;
	font-weight: 600;
	text-transform: lowercase;
	letter-spacing: 0;
}

body.pp-auth-takeover .pp-login-auth__copy { display: none; max-width: 460px; }
body.pp-auth-takeover .pp-login-auth[data-mode="login"]  .pp-login-auth__copy[data-pp-mode-show="login"],
body.pp-auth-takeover .pp-login-auth[data-mode="signup"] .pp-login-auth__copy[data-pp-mode-show="signup"] { display: block; }

body.pp-auth-takeover .pp-login-auth__h1 {
	font-size: 48px;
	line-height: 1.05;
	font-weight: 700;
	margin: 0 0 18px;
	color: #ffffff;
}
body.pp-auth-takeover .pp-login-auth__h1 span {
	display: block;
	color: #1f9edb;
}

body.pp-auth-takeover .pp-login-auth__sub {
	margin: 0 0 28px;
	font-size: 16px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.72);
}

body.pp-auth-takeover .pp-login-auth__benefits {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
body.pp-auth-takeover .pp-login-auth__benefits li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
}
body.pp-auth-takeover .pp-login-auth__benefits li b {
	color: #ffffff;
	font-weight: 600;
}
body.pp-auth-takeover .pp-login-auth__benefits .chk {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(31, 158, 219, 0.18);
	color: #1f9edb;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	margin-top: 1px;
}

/* =========================================================================
 * 4. RIGHT — light form panel, fills its half, form centered + capped
 * ========================================================================= */

body.pp-auth-takeover .pp-login-auth__form-area {
	background: #ffffff;
	padding: 64px 64px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	overflow-y: auto;
	min-width: 0;
}
body.pp-auth-takeover .pp-login-auth__form-area > * {
	width: 100%;
	max-width: 420px;
	margin-left: auto;
	margin-right: auto;
}

/* Toggle pill */
body.pp-auth-takeover .pp-login-auth__toggle {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	background: #F3F4F6;
	border-radius: 999px;
	padding: 4px;
	margin: 0 auto 28px;
}
body.pp-auth-takeover .pp-login-auth__toggle-slider {
	position: absolute;
	top: 4px;
	bottom: 4px;
	left: 4px;
	width: calc(50% - 4px);
	background: #ffffff;
	border-radius: 999px;
	box-shadow: 0 2px 6px rgba(52, 52, 52, 0.08);
	transition: transform 0.22s ease;
	pointer-events: none;
}
body.pp-auth-takeover .pp-login-auth[data-mode="signup"] .pp-login-auth__toggle-slider {
	transform: translateX(100%);
}
body.pp-auth-takeover .pp-login-auth__mode-btn {
	position: relative;
	z-index: 1;
	appearance: none;
	border: 0;
	background: transparent;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	color: #6B7280;
	cursor: pointer;
	border-radius: 999px;
	transition: color 0.2s ease;
	font-family: inherit;
}
body.pp-auth-takeover .pp-login-auth__mode-btn:hover { color: #343434; }
body.pp-auth-takeover .pp-login-auth[data-mode="login"]  .pp-login-auth__mode-btn[data-pp-mode-set="login"],
body.pp-auth-takeover .pp-login-auth[data-mode="signup"] .pp-login-auth__mode-btn[data-pp-mode-set="signup"] {
	color: #343434;
}

/* Form visibility — mode-driven */
body.pp-auth-takeover .pp-login-auth__form { display: none; }
body.pp-auth-takeover .pp-login-auth[data-mode="login"]  .pp-login-auth__form[data-pp-mode-show="login"],
body.pp-auth-takeover .pp-login-auth[data-mode="signup"] .pp-login-auth__form[data-pp-mode-show="signup"] { display: block; }

/* Fields */
body.pp-auth-takeover .pp-login-auth__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}
body.pp-auth-takeover .pp-login-auth__field label {
	font-size: 13px;
	font-weight: 600;
	color: #343434;
	letter-spacing: 0.01em;
}
body.pp-auth-takeover .pp-login-auth__field input {
	width: 100%;
	padding: 12px 14px;
	background: #ffffff;
	border: 1.5px solid #E5E7EB;
	border-radius: 10px;
	font-size: 15px;
	color: #343434;
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
}
body.pp-auth-takeover .pp-login-auth__field input::placeholder { color: #9CA3AF; }
body.pp-auth-takeover .pp-login-auth__field input:focus {
	outline: none;
	border-color: #1f9edb;
	box-shadow: 0 0 0 3px rgba(31, 158, 219, 0.18);
}

body.pp-auth-takeover .pp-login-auth__forgot {
	text-align: right;
	margin: -6px 0 18px;
}
body.pp-auth-takeover .pp-login-auth__forgot a {
	font-size: 13px;
	color: #1f9edb;
	text-decoration: none;
	font-weight: 500;
}
body.pp-auth-takeover .pp-login-auth__forgot a:hover { color: #0e6a99; text-decoration: underline; }

body.pp-auth-takeover .pp-login-auth__hint {
	margin: 0 0 18px;
	font-size: 13px;
	line-height: 1.5;
	color: #6B7280;
	background: #F9FAFB;
	border-radius: 8px;
	padding: 10px 12px;
}

/* !important here because the parent NineTheme + WC stylesheets target
 * .woocommerce button[type="submit"] with a red brand override; without it
 * the auth's brand-blue CTA renders red and clashes with the blue accents. */
body.pp-auth-takeover .pp-login-auth__submit {
	width: 100% !important;
	appearance: none;
	border: 0 !important;
	padding: 13px 18px !important;
	background: #1f9edb !important;
	background-color: #1f9edb !important;
	color: #ffffff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	border-radius: 10px !important;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.05s ease;
	font-family: inherit;
	text-transform: none !important;
	letter-spacing: 0 !important;
}
body.pp-auth-takeover .pp-login-auth__submit:hover {
	background: #0e6a99 !important;
	background-color: #0e6a99 !important;
}
body.pp-auth-takeover .pp-login-auth__submit:active { transform: translateY(1px); }
body.pp-auth-takeover .pp-login-auth__submit:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(31, 158, 219, 0.35);
}

body.pp-auth-takeover .pp-login-auth__legal {
	margin: 14px auto 0;
	font-size: 12px;
	line-height: 1.5;
	color: #6B7280;
	text-align: center;
}
body.pp-auth-takeover .pp-login-auth__legal a { color: #1f9edb; text-decoration: none; }
body.pp-auth-takeover .pp-login-auth__legal a:hover { color: #0e6a99; text-decoration: underline; }

body.pp-auth-takeover .pp-login-auth__guest {
	margin: 22px auto 0;
	text-align: center;
	font-size: 14px;
	color: #6B7280;
}
body.pp-auth-takeover .pp-login-auth__guest a {
	color: #1f9edb;
	text-decoration: none;
	font-weight: 500;
	margin-left: 4px;
}
body.pp-auth-takeover .pp-login-auth__guest a:hover { color: #0e6a99; text-decoration: underline; }

/* =========================================================================
 * 5. Mobile — stack vertically, panels fill viewport
 * ========================================================================= */

@media (max-width: 760px) {
	html, body.pp-auth-takeover { overflow-y: auto; }

	body.pp-auth-takeover .pp-login-auth {
		position: fixed;             /* stay pinned even on small viewports */
		inset: 0;
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
		overflow-y: auto;
	}
	body.pp-auth-takeover .pp-login-auth__panel {
		padding: 72px 24px 28px;
		min-height: 38vh;
	}
	body.pp-auth-takeover .pp-login-auth__panel::after {
		width: 280px;
		height: 280px;
		inset: -30% -30% auto auto;
	}
	body.pp-auth-takeover .pp-login-auth__h1 { font-size: 32px; }
	body.pp-auth-takeover .pp-login-auth__sub { font-size: 14px; margin-bottom: 18px; }
	body.pp-auth-takeover .pp-login-auth__benefits li:nth-child(n+4) { display: none; }

	body.pp-auth-takeover .pp-login-auth__form-area {
		padding: 32px 24px 40px;
		overflow-y: visible;
	}
}

@media (max-width: 420px) {
	body.pp-auth-takeover .pp-login-auth__h1 { font-size: 26px; }
	body.pp-auth-takeover .pp-login-auth__benefits li:nth-child(n+3) { display: none; }
}
