/**
 * Member Portal styles
 *
 * Split-screen: dark panel left, light form panel right.
 * Tweak the variables below to restyle everything.
 */

:root {
	--mp-dark: #000000;
	--mp-dark-2: #0d0f12;
	--mp-light: #f7f8fa;
	--mp-card: #ffffff;
	--mp-border: #e3e4e8;
	--mp-text: #16181d;
	--mp-muted: #6b6d75;
	--mp-faint: #9a9ca3;
	--mp-btn: #1e2939;
	--mp-btn-text: #ffffff;
	--mp-accent: #22d3ee;
	--mp-error: #c0392b;
	--mp-error-bg: #fdecea;
	--mp-success: #1f7a3d;
	--mp-success-bg: #e6f6ec;
	--mp-radius: 8px;
	--mp-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Layout ---------- */

.mp-shell {
	font-family: var(--mp-font);
	display: grid;
	grid-template-columns: 2fr 3fr;
	min-height: 100vh;
	color: var(--mp-text);
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

.mp-shell *,
.mp-shell *::before,
.mp-shell *::after {
	box-sizing: border-box;
}

/**
 * Full-bleed variant.
 *
 * The old approach used `position:relative; left:50%; margin-left:-50vw`,
 * which assumes the container is perfectly centred in the viewport. Astra
 * (and any theme with a sidebar or asymmetric container) breaks that
 * assumption and the whole layout slides off to one side.
 *
 * Negative margins alone are safer: they pull the element out to the
 * viewport edges relative to wherever it actually sits, with no
 * repositioning. If the container still isn't centred it degrades to
 * "slightly wider" rather than "shoved off screen".
 */
.mp-shell--fullbleed {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
}

/* Belt and braces: never allow the portal to cause sideways scrolling. */
.mp-page-wrap {
	overflow-x: clip;
	max-width: 100%;
}

/* Strip theme padding on the entry container for portal pages. */
body.mp-portal-page .entry-content > .mp-page-wrap,
body.mp-portal-page .ast-container > .mp-page-wrap {
	margin: 0;
	padding: 0;
}

.mp-aside {
	background: var(--mp-dark);
	background-image: radial-gradient(circle at 30% 20%, #14181d 0%, #000000 60%);
	color: #fff;
	padding: 56px 48px;
	display: flex;
	align-items: center;
}

.mp-aside-inner {
	width: 100%;
	max-width: 460px;
}

.mp-panel {
	background: var(--mp-light);
	padding: 56px 48px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.mp-panel > * {
	width: 100%;
	max-width: 440px;
}

/* ---------- Left panel ---------- */

.mp-logo {
	width: 150px;
	height: 64px;
	border: 2px dashed rgba(255, 255, 255, 0.28);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 48px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.18em;
	color: rgba(255, 255, 255, 0.45);
}

.mp-headline {
	font-size: 42px;
	line-height: 1.12;
	font-weight: 700;
	margin: 0 0 18px;
	color: #fff;
	letter-spacing: -0.01em;
}

.mp-subtext {
	font-size: 15px;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.62);
	margin: 0 0 36px;
}

.mp-eyebrow {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.4);
	margin: 0 0 14px;
}

.mp-chips {
	list-style: none;
	margin: 0 0 36px;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.mp-chip {
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 6px;
	padding: 13px 16px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.85);
	background: rgba(255, 255, 255, 0.02);
}

.mp-thumbs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.mp-thumbs {
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
}

.mp-thumb {
	aspect-ratio: 1 / 1;
	border: 2px dashed rgba(255, 255, 255, 0.18);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.04);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.35);
	overflow: hidden;
}

.mp-thumb--filled {
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.06);
}

.mp-thumb--filled img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Teaser blur. Amount comes from the Appearance screen. */
.mp-thumb--blur img {
	filter: blur(var(--mp-blur, 6px));
	transform: scale(1.06); /* hides the soft edge blur creates */
}

.mp-logo-img {
	max-width: 180px;
	height: auto;
	display: block;
	margin-bottom: 48px;
}

/* Wizard variant of the left panel */
.mp-step-num {
	font-size: 92px;
	font-weight: 700;
	line-height: 1;
	color: rgba(255, 255, 255, 0.07);
	margin-bottom: 12px;
}

.mp-progress {
	margin-top: 32px;
}

.mp-progress-bar {
	height: 3px;
	background: rgba(255, 255, 255, 0.14);
	border-radius: 2px;
	overflow: hidden;
	margin-bottom: 10px;
	max-width: 220px;
}

.mp-progress-bar span {
	display: block;
	height: 100%;
	background: var(--mp-accent);
	transition: width 0.25s ease;
}

.mp-progress-label {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.45);
}

/* ---------- Right panel ---------- */

.mp-tabs {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}

.mp-tab {
	flex: 1;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--mp-faint);
	padding-top: 12px;
	border-top: 3px solid var(--mp-border);
	transition: color 0.2s ease, border-color 0.2s ease;
}

.mp-tab.is-active {
	color: var(--mp-text);
	font-weight: 600;
	border-top-color: var(--mp-text);
}

.mp-tab.is-done {
	color: var(--mp-text);
	border-top-color: var(--mp-text);
	cursor: pointer;
}

.mp-tab.is-done::before {
	content: '\2713\00a0';
}

.mp-card {
	background: var(--mp-card);
	border: 1px solid var(--mp-border);
	border-radius: var(--mp-radius);
	padding: 34px 32px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.mp-card-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 18px;
	color: var(--mp-text);
}

.mp-card-copy {
	font-size: 14px;
	line-height: 1.7;
	color: var(--mp-muted);
	margin: 0 0 22px;
}

/* ---------- Form ---------- */

.mp-field {
	margin-bottom: 18px;
}

.mp-field label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: #3a3c42;
	margin-bottom: 7px;
}

.mp-field input,
.mp-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 13px;
	font-family: inherit;
	font-size: 14px;
	color: var(--mp-text);
	background: #fff;
	border: 1px solid #d5d6db;
	border-radius: 6px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mp-field input:focus,
.mp-field select:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.mp-field input.is-invalid,
.mp-field select.is-invalid {
	border-color: var(--mp-error);
}

.mp-row {
	display: grid;
	gap: 12px;
}

.mp-row--3 {
	grid-template-columns: 1.4fr 0.7fr 0.9fr;
}

.mp-hint {
	font-size: 12px;
	color: var(--mp-faint);
	margin: 7px 0 0;
}

.mp-hint--error {
	color: var(--mp-error);
}

.mp-note {
	font-size: 13px;
	line-height: 1.6;
	color: #1e40af;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 6px;
	padding: 13px 15px;
	margin: 0 0 22px;
}

.mp-checkbox {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13.5px;
	color: var(--mp-muted);
	margin-bottom: 22px;
}

.mp-checkbox--block {
	align-items: flex-start;
	font-size: 12.5px;
	line-height: 1.6;
	background: #f9fafb;
	border: 1px solid var(--mp-border);
	border-radius: 6px;
	padding: 15px 16px;
	margin-top: 6px;
}

.mp-checkbox--block input {
	margin-top: 3px;
	flex-shrink: 0;
}

.mp-checkbox a {
	color: #2563eb;
	text-decoration: underline;
}

/* ---------- Buttons ---------- */

.mp-btn {
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border: none;
	border-radius: 6px;
	padding: 14px 24px;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.05s ease;
	text-align: center;
	text-decoration: none;
	display: inline-block;
}

.mp-btn--primary {
	background: var(--mp-btn);
	color: var(--mp-btn-text);
}

.mp-btn--primary:hover {
	opacity: 0.9;
	color: var(--mp-btn-text);
}

.mp-btn--primary:active {
	transform: translateY(1px);
}

.mp-btn--primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.mp-btn--ghost {
	background: transparent;
	color: var(--mp-muted);
	text-transform: none;
	letter-spacing: 0;
	padding: 14px 4px;
}

.mp-btn--block {
	display: block;
	width: 100%;
}

.mp-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid var(--mp-border);
}

.mp-nav .mp-btn--primary {
	margin-left: auto;
}

/* ---------- Misc ---------- */

.mp-switch {
	text-align: center;
	font-size: 13.5px;
	color: var(--mp-muted);
	margin: 18px 0 0;
}

.mp-switch a {
	color: var(--mp-text);
	font-weight: 600;
	text-decoration: none;
}

.mp-switch a:hover {
	text-decoration: underline;
}

.mp-alert {
	border-radius: 6px;
	padding: 12px 15px;
	font-size: 13.5px;
	line-height: 1.55;
	margin-bottom: 20px;
}

.mp-alert--error {
	background: var(--mp-error-bg);
	border: 1px solid #f3b8b1;
	color: var(--mp-error);
}

.mp-alert--success {
	background: var(--mp-success-bg);
	border: 1px solid #a9e5c4;
	color: var(--mp-success);
}

.mp-hidden {
	display: none !important;
}

.mp-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Gate messaging on product pages */
.mp-gate {
	display: block;
	font-family: var(--mp-font);
	font-size: 14px;
	line-height: 1.6;
	color: var(--mp-muted);
	background: #f9fafb;
	border: 1px solid var(--mp-border);
	border-radius: 6px;
	padding: 13px 15px;
}

.mp-gate a {
	color: var(--mp-text);
	font-weight: 600;
	text-decoration: underline;
}

/* ---------- Responsive ---------- */

/* Astra-specific: neutralise the theme's content padding on portal pages
   so the split panels reach the edges cleanly. */
body.mp-portal-page.ast-page-builder-template .site-content .ast-container,
body.mp-portal-page .site-content > .ast-container {
	padding-left: 0;
	padding-right: 0;
	max-width: 100%;
}

/* ------------------------------------------------------------------ */
/* Mobile                                                              */
/*                                                                     */
/* Mobile is NOT just the desktop layout stacked. The panel goes light  */
/* instead of dark, chips become inline pills, and product images run   */
/* four across — matching the mobile reference design.                  */
/* ------------------------------------------------------------------ */

@media (max-width: 900px) {
	.mp-shell {
		grid-template-columns: 1fr;
		min-height: 0;
		background: var(--mp-light);
	}

	.mp-shell--fullbleed {
		margin-left: 0;
		margin-right: 0;
	}

	/* Light panel, dark text */
	.mp-aside {
		background: var(--mp-light);
		background-image: none;
		border-right: none;
		color: var(--mp-text);
		padding: 28px 22px 8px;
		display: block;
	}

	.mp-aside-inner {
		max-width: none;
	}

	.mp-headline {
		font-size: 30px;
		line-height: 1.16;
		color: var(--mp-text);
		margin-bottom: 14px;
	}

	.mp-subtext {
		font-size: 15px;
		color: var(--mp-muted);
		margin-bottom: 26px;
	}

	.mp-eyebrow {
		color: var(--mp-faint);
		margin-bottom: 12px;
	}

	/* Logo sits on light now */
	.mp-logo {
		border-color: rgba(0, 0, 0, 0.18);
		color: rgba(0, 0, 0, 0.4);
		width: 120px;
		height: 50px;
		margin-bottom: 26px;
	}

	.mp-logo-img {
		max-width: 130px;
		margin-bottom: 26px;
	}

	/* Chips: inline pills that wrap, not a 2-column grid */
	.mp-chips {
		display: flex;
		flex-wrap: wrap;
		gap: 9px;
		margin-bottom: 30px;
	}

	.mp-chip {
		border: 1px solid #d8d9de;
		border-radius: 999px;
		background: #fff;
		color: var(--mp-text);
		padding: 10px 18px;
		font-size: 14px;
		white-space: nowrap;
	}

	/* Four across, like the reference */
	.mp-thumbs {
		grid-template-columns: repeat(4, 1fr);
		gap: 9px;
		margin-bottom: 8px;
	}

	.mp-thumb {
		border-color: rgba(0, 0, 0, 0.14);
		background: #ededf0;
		color: rgba(0, 0, 0, 0.32);
		border-radius: 8px;
	}

	.mp-thumb--filled {
		border: 1px solid #e3e4e8;
		background: #ededf0;
	}

	/* Wizard number + progress on light */
	.mp-step-num {
		font-size: 56px;
		color: rgba(0, 0, 0, 0.08);
	}

	.mp-progress-bar {
		background: rgba(0, 0, 0, 0.1);
		max-width: none;
	}

	.mp-progress-label {
		color: var(--mp-faint);
	}

	.mp-panel {
		padding: 20px 22px 44px;
	}

	.mp-panel > * {
		max-width: none;
	}

	.mp-card {
		padding: 24px 20px;
		border-radius: 12px;
	}

	.mp-row--3 {
		grid-template-columns: 1fr;
	}

	.mp-tabs {
		gap: 5px;
	}

	.mp-tab {
		font-size: 11px;
	}

	/* Comfortable tap targets, and 16px stops iOS zooming on focus */
	.mp-field input,
	.mp-field select {
		font-size: 16px;
		padding: 14px 13px;
	}

	.mp-btn {
		padding: 16px 24px;
	}
}

@media (max-width: 380px) {
	.mp-headline {
		font-size: 26px;
	}

	.mp-thumbs {
		grid-template-columns: repeat(3, 1fr);
	}
}
