/**
 * Multipack login / registration page.
 * Banner + href tab switcher (left column) and FAQ accordion (right column).
 */

/* Smooth-scroll to #faq (scoped: this stylesheet only loads on the account page). */
html {
	scroll-behavior: smooth;
}

.mp-account-login {
	--mp-accent: var(--wd-primary-color, #8bc34a);
	--mp-info: #2f6fed;
	--mp-border: #e1e4e8;
	--mp-muted: #6b7280;
	max-width: 1180px;
	margin: 0 auto;
}

/* ---- Top banner ---- */
.mp-account-banner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 20px;
	margin-bottom: 30px;
	border: 1.5px solid #005A9A;
	border-radius: 5px;
}

.mp-account-banner__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mp-account-banner p {
	margin: 0;
	font-size: 14px;
	line-height: 24px;
	color: #333;
}

/* Extra "Frequently asked questions" link inside the banner — mobile only,
   jumps down to the FAQ section (#faq). */
.mp-account-banner__faq {
	display: none;
	font-weight: 700;
	text-decoration: underline;
	text-transform: uppercase;
	margin-top: 0;
	font-size: 14px;
}

.mp-account-banner__brand {
	font-weight: 700;
	color: #005A9A;
}

.mp-account-banner__icon {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	display: block;
}

/* ---- Two column grid ---- */
.mp-account-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

/* ---- Tab switcher ---- */
.mp-account-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 20px 0;
	background: #F5F5F7;
	padding: 25px 40px 20px 40px;
	overflow: hidden;
	margin-bottom: 0;
}

.mp-account-tab {
	flex: 1 1 50%;
	padding: 4px 0;
	text-align: center;
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: #5D5D5DB3;
	border-bottom: 3px solid #D9D9D9;
	transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.mp-account-tab:hover {
	color: #005A9A;
}

.mp-account-login.mp-active-login .mp-account-tab--login,
.mp-account-login.mp-active-register .mp-account-tab--register {
	color: #005A9A;
	border-bottom: 3px solid #005A9A;
}

/* ---- Form panels: only the active one is shown ---- */
.mp-account-login.mp-active-login .mp-account-panel--register,
.mp-account-login.mp-active-register .mp-account-panel--login {
	display: none;
}

.mp-account-panels {
	border: unset !important;
}

.mp-account-panel .wd-login-title {
	background: #F5F5F7;
	padding: 0 40px 26px 40px;
	margin: 0;
	font-size: 24px;
	line-height: 34px;
}

/* ---- Form split: input fields (main) vs actions (button, social, privacy) ---- */
.mp-account-panel .woocommerce-form {
	display: flex;
	flex-direction: column;
}

.mp-form-main {
	background: #F5F5F7;
	padding: 0 40px 20px 40px;
}

.mp-form-main .b2bking_registration_roles_dropdown_section {
	display: none;
}

.mp-form-actions {
	margin-top: 16px;
}

.mp-form-actions .woocommerce-privacy-policy-text {
	line-height: 16px;
}

.mp-form-actions .woocommerce-privacy-policy-text p {
	margin-bottom: 16px;
}

/* Registration: hide every field below the country field until a country is
   chosen. Toggled by woo-b2b-company-validator's frontend.js. */
.mp-country-empty .mp-below-country {
	display: none !important;
}

/* Registration, countries with a company search field (LV/LT/EE): hide
   company name/VAT/address/city/postcode until a company is found/selected
   via the search field, leaving only that search field visible below
   country. Toggled by woo-b2b-company-validator's frontend.js. */
.mp-company-empty .mp-below-company {
	display: none !important;
}

form.woocommerce-form-login .form-row-btn,
form.woocommerce-form-register .form-row-btn {
	margin-bottom: 16px;
}

form.woocommerce-form-login .woocommerce-button,
form.woocommerce-form-register .woocommerce-button {
	text-transform: uppercase;
	font-size: 14px;
}

form.woocommerce-form-login .woocommerce-form-login__rememberme input {
	height: 20px;
	width: 20px;
	margin-top: -2px;
}

form.woocommerce-form-register div.woocommerce-privacy-policy-text {
	line-height: 16px;
}

form.woocommerce-form-register .select2-selection__rendered {
	background: #fff;
}

/* ---- FAQ column ---- */
/* Sticks to the viewport while scrolling so it stays visible next to the
   (often taller, e.g. registration) left column instead of scrolling out of
   view first. align-self: start keeps it from stretching to the grid row's
   full height, which sticky positioning needs to have room to move within. */
.mp-account-faq {
	/* --mp-faq-sticky-top is set by js/faq-sticky-offset.js to clear whatever
	   fixed/sticky header is currently overlapping the viewport top. */
	scroll-margin-top: var(--mp-faq-sticky-top, 24px);
	position: sticky;
	top: var(--mp-faq-sticky-top, 24px);
	align-self: start;
}

.mp-account-faq__title {
	margin: 0 0 18px;
	font-size: 24px;
	line-height: 34px;
}

.mp-account-faq__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mp-faq-item {
	display: flex;
	flex-direction: column;
	gap: 5px;
	border-radius: 5px;
	background: #F5F5F7;
	padding: 12px 20px;
}

.mp-faq-item__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	cursor: pointer;
	font-size: 16px;
	line-height: 26px;
	font-weight: 700;
	list-style: none;
}

/* remove default disclosure marker */
.mp-faq-item__q::-webkit-details-marker {
	display: none;
}
.mp-faq-item__q::marker {
	content: "";
}

.mp-faq-item[open] .mp-faq-item__q {
	color: var(--mp-accent);
}

.mp-faq-item__chevron {
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	color: var(--mp-muted);
}

.mp-faq-item[open] .mp-faq-item__chevron {
	transform: rotate(-135deg);
	color: var(--mp-accent);
}

.mp-faq-item__a {
	color: var(--mp-muted);
	line-height: 1.6;
}

.mp-faq-item__a a {
	text-decoration: underline;
}

.mp-faq-item__a p:last-child {
	margin-bottom: 0;
}


/* ---- Responsive ---- */
@media (max-width: 768px) {
	.mp-account-login {
		margin-top: -20px;
	}

	.mp-account-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.mp-account-banner {
		flex-direction: column;
		text-align: center;
		gap: 8px;
		padding: 8px 8px;
	}

	.mp-account-banner img {
		display: none;
		/* width: 36px; */
		/* height: 36px; */
	}

	.mp-account-banner__faq {
		display: block;
	}

	.mp-account-tabs {
		padding-left: 24px;
		padding-right: 24px;
	}

	.mp-account-panel .wd-login-title {
		padding-left: 24px;
		padding-right: 24px;
	}

	.mp-form-main {
		padding-left: 24px;
		padding-right: 24px;
	}

	/* Single-column stacked layout here — sticky only makes sense side-by-side. */
	.mp-account-faq {
		position: static;
	}
}
