/*
 * MemberPress signup forms, wherever they appear: the membership pages
 * (/register/...) and any page that embeds the form (e.g. /vendor-sign-up/).
 * Enqueued site-wide by Wedly_Core_Membership_Signup_Style. Form rules are
 * scoped to .mp_wrapper .mepr-signup-form; the page-chrome rules (no
 * sidebar, byline or comments) only apply to single membership pages.
 */

body .mp_wrapper {
	--wedly-gold: #d0922a;
	--wedly-gold-dark: #b57d1f;
	--wedly-ink: #343434;
	--wedly-muted: #6b6b6b;
	--wedly-line: #e4ddd0;
	--wedly-cream: #faf6ef;
}

/* ---- Page chrome: no sidebar, byline or comments ------------------- */

body.single-memberpressproduct .fl-sidebar,
body.single-memberpressproduct .fl-post-meta,
body.single-memberpressproduct #comments,
body.single-memberpressproduct .comments-area,
body.single-memberpressproduct .fl-comments,
body.single-memberpressproduct .fl-post-nav {
	display: none !important;
}

body.single-memberpressproduct .fl-content {
	float: none;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding-top: 48px;
	padding-bottom: 72px;
	border: 0 !important;
}

body.single-memberpressproduct .fl-post-header {
	text-align: center;
	margin-bottom: 8px;
}

body.single-memberpressproduct .fl-post-header::before {
	content: "Vendor signup";
	display: block;
	margin-bottom: 10px;
	color: #d0922a;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

body.single-memberpressproduct .fl-post-title {
	margin: 0;
	font-size: 42px;
	line-height: 1.15;
}

/* ---- The card ------------------------------------------------------ */

body .mp_wrapper:has(> .mepr-signup-form) {
	padding: 0;
}

body .mp_wrapper .mepr-signup-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px 20px;
	padding: 36px 40px 40px;
	background: #fff;
	border: 1px solid var(--wedly-line);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
	box-sizing: border-box;
	max-width: 760px;
	margin: 0 auto;
}

body .mp_wrapper .mepr-signup-form > * {
	grid-column: 1 / -1;
	min-width: 0;
}

/* Short fields pair up two to a row. */
body .mp_wrapper .mepr-signup-form > .mepr_first_name,
body .mp_wrapper .mepr-signup-form > .mepr_last_name,
body .mp_wrapper .mepr-signup-form > .mepr_mepr-address-city,
body .mp_wrapper .mepr-signup-form > .mepr_mepr-address-country,
body .mp_wrapper .mepr-signup-form > .mepr_mepr-address-state,
body .mp_wrapper .mepr-signup-form > .mepr_mepr-address-zip,
body .mp_wrapper .mepr-signup-form > .mepr_mepr_business_name,
body .mp_wrapper .mepr-signup-form > .mepr_mepr_business_email,
body .mp_wrapper .mepr-signup-form > .mepr_mepr_business_address,
body .mp_wrapper .mepr-signup-form > .mepr_mepr_business_city,
body .mp_wrapper .mepr-signup-form > .mepr_password,
body .mp_wrapper .mepr-signup-form > .mepr_password_confirm {
	grid-column: auto;
}

body .mp_wrapper .mepr-signup-form .mp-form-row {
	margin: 0;
}

/* Terms line becomes a highlighted callout at the top of the card. */
body .mp_wrapper .mepr-signup-form > .mepr_price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 10px;
	margin-bottom: 6px;
	padding: 16px 20px;
	background: var(--wedly-cream);
	border-left: 4px solid var(--wedly-gold);
	border-radius: 6px;
	font-size: 18px;
}

body .mp_wrapper .mepr_price .mepr_price_cell_label {
	color: var(--wedly-muted);
	font-weight: 600;
}

body .mp_wrapper .mepr_price .mepr_price_cell {
	color: var(--wedly-ink);
	font-weight: 700;
}

/* ---- Labels and inputs --------------------------------------------- */

body .mp_wrapper .mepr-signup-form .mp-form-label,
body .mp_wrapper .mepr-signup-form label {
	color: var(--wedly-ink);
	font-size: 15px;
	font-weight: 600;
}

body .mp_wrapper .mepr-signup-form .mp-form-label {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin-bottom: 6px;
}

body .mp_wrapper .mepr-signup-form input[type="text"],
body .mp_wrapper .mepr-signup-form input[type="email"],
body .mp_wrapper .mepr-signup-form input[type="url"],
body .mp_wrapper .mepr-signup-form input[type="tel"],
body .mp_wrapper .mepr-signup-form input[type="password"],
body .mp_wrapper .mepr-signup-form select,
body .mp_wrapper .mepr-signup-form textarea {
	width: 100%;
	height: auto;
	padding: 12px 14px;
	color: var(--wedly-ink);
	font-size: 16px;
	background: #fff !important; /* page builder field styles */
	border: 1px solid #cfc8bb !important;
	border-radius: 6px;
	box-shadow: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

body .mp_wrapper .mepr-signup-form input:focus,
body .mp_wrapper .mepr-signup-form select:focus,
body .mp_wrapper .mepr-signup-form textarea:focus {
	border-color: var(--wedly-gold) !important;
	box-shadow: 0 0 0 3px rgba(208, 146, 42, 0.2);
	outline: none;
}

/* Radio/checkbox groups (Vendor Personality, Category). */
body .mp_wrapper .mepr-signup-form .mepr-radios-field,
body .mp_wrapper .mepr-signup-form .mepr-checkboxes-field {
	display: grid !important; /* MemberPress sets inline-block */
	box-sizing: border-box;
	width: 100% !important;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 8px 16px;
	padding: 14px 16px;
	border: 1px solid var(--wedly-line);
	border-radius: 6px;
}

body .mp_wrapper .mepr-signup-form .mepr-radios-field-row,
body .mp_wrapper .mepr-signup-form .mepr-checkboxes-field-row {
	display: flex !important;
	font-size: 16px;
	align-items: center;
	gap: 8px;
	margin: 0;
}

body .mp_wrapper .mepr-signup-form .mepr-radios-field-row label,
body .mp_wrapper .mepr-signup-form .mepr-checkboxes-field-row label {
	font-weight: 400;
}

body .mp_wrapper .mepr-signup-form input[type="radio"],
body .mp_wrapper .mepr-signup-form input[type="checkbox"] {
	accent-color: var(--wedly-gold);
	width: 18px;
	height: 18px;
	margin: 0;
}

/* Payment section. */
body .mp_wrapper .mepr-payment-methods-wrapper {
	padding-top: 22px;
	border-top: 1px solid var(--wedly-line);
}

body .mp_wrapper .mepr_spacer {
	display: none;
}

/* ---- Submit -------------------------------------------------------- */

body .mp_wrapper .mepr-signup-form .mepr-submit {
	width: 100%;
	padding: 16px 24px;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	background: var(--wedly-gold);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s;
}

body .mp_wrapper .mepr-signup-form .mepr-submit:hover,
body .mp_wrapper .mepr-signup-form .mepr-submit:focus {
	background: var(--wedly-gold-dark);
}

body .mp_wrapper .mepr-signup-form .mepr-form-has-errors,
body .mp_wrapper .mepr-signup-form .cc-error,
body .mp_wrapper .mepr-signup-form .mepr-validation-error {
	color: #c62828;
	font-size: 14px;
}

/* ---- Phones -------------------------------------------------------- */

@media (max-width: 640px) {
	body.single-memberpressproduct .fl-content {
		padding-top: 28px;
		padding-bottom: 48px;
	}

	body.single-memberpressproduct .fl-post-title {
		font-size: 32px;
	}

	body .mp_wrapper .mepr-signup-form {
		grid-template-columns: 1fr;
		padding: 24px 18px 28px;
	}

	body .mp_wrapper .mepr-signup-form > * {
		grid-column: 1 / -1 !important;
	}
}
