/*
 * Shared HB styling for MemberPress form markup (.mp_wrapper), scoped under
 * the .hb-mp-form wrapper class that each HB page template puts on its outer
 * div. Extracted from login-page.css so the login and account templates style
 * MemberPress forms identically. Page-specific geometry (widths, margins,
 * one-off overrides) stays in each template's own stylesheet, loaded after
 * this one.
 *
 * Design tokens match the Next.js app's Tailwind config. Square corners
 * throughout (customer-site convention).
 */

:root {
	--hb-purple: #4D0FFF;
	--hb-purple-hover: #3D0CD9;
	--hb-cyan: #1C64FF;
	--hb-cyan-pale: #E2FBFF;
	--hb-gray-light: #DEDEDE;
	--hb-gray-mid: #BABABA;
	--hb-gray-pale: #F2F2F3;
	--hb-gray-text: #666669;
	--hb-error: #DC2626;
	--hb-success: #059669;
}

.hb-mp-form,
.hb-mp-form * {
	box-sizing: border-box;
}

.hb-mp-form .mp_wrapper .mp-form-row {
	margin-bottom: 16px;
}

.hb-mp-form .mp_wrapper .mp-spacer,
.hb-mp-form .mp_wrapper .mepr_spacer {
	display: none;
}

/* Remember-me and other bare labels */
.hb-mp-form .mp_wrapper label {
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	line-height: 20px;
	color: var(--hb-gray-text);
}

/* Field labels — some forms nest them in .mp-form-label, others put them
   straight in .mp-form-row */
.hb-mp-form .mp_wrapper .mp-form-row label {
	display: block;
	margin-bottom: 4px;
	font-family: 'Poppins', sans-serif;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	color: #000;
}

.hb-mp-form .mp_wrapper input[type='text'],
.hb-mp-form .mp_wrapper input[type='email'],
.hb-mp-form .mp_wrapper input[type='password'],
.hb-mp-form .mp_wrapper input[type='tel'],
.hb-mp-form .mp_wrapper input[type='url'],
.hb-mp-form .mp_wrapper input[type='number'],
.hb-mp-form .mp_wrapper select,
.hb-mp-form .mp_wrapper textarea {
	display: block;
	width: 100%;
	height: 40px;
	padding: 8px 12px;
	background: var(--hb-gray-pale);
	border: 0;
	border-radius: 0;
	font-family: 'Montserrat', sans-serif;
	font-size: 16px;
	line-height: 24px;
	color: #000;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.hb-mp-form .mp_wrapper textarea {
	height: auto;
	min-height: 96px;
}

.hb-mp-form .mp_wrapper input[type='text']:focus,
.hb-mp-form .mp_wrapper input[type='email']:focus,
.hb-mp-form .mp_wrapper input[type='password']:focus,
.hb-mp-form .mp_wrapper input[type='tel']:focus,
.hb-mp-form .mp_wrapper input[type='url']:focus,
.hb-mp-form .mp_wrapper input[type='number']:focus,
.hb-mp-form .mp_wrapper select:focus,
.hb-mp-form .mp_wrapper textarea:focus {
	background: #fff;
	box-shadow: 0 0 0 1px var(--hb-purple);
	outline: none;
}

/* Password visibility toggle (MemberPress wraps the input in .mp-hide-pw) */
.hb-mp-form .mp_wrapper .mp-hide-pw {
	position: relative;
	display: block;
}

.hb-mp-form .mp_wrapper .mp-hide-pw input[type='password'],
.hb-mp-form .mp_wrapper .mp-hide-pw input[type='text'] {
	padding-right: 44px;
}

.hb-mp-form .mp_wrapper button.mp-hide-pw {
	position: absolute;
	top: 50%;
	right: 4px;
	transform: translateY(-50%);
	padding: 4px 8px;
	background: transparent;
	border: 0;
	color: var(--hb-gray-text);
	cursor: pointer;
}

.hb-mp-form .mp_wrapper input[type='checkbox'] {
	accent-color: var(--hb-purple);
	margin-right: 6px;
}

.hb-mp-form .mp_wrapper input[type='submit'],
.hb-mp-form .mp_wrapper button.mepr-submit {
	height: 44px;
	background: var(--hb-purple);
	border: 0;
	border-radius: 0;
	font-family: 'Poppins', sans-serif;
	font-size: 15px;
	line-height: 24px;
	font-weight: 500;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease;
	/* The Elementor kit puts a 5px hard shadow on submit buttons; the React
	   design has none. */
	box-shadow: none;
}

.hb-mp-form .mp_wrapper input[type='submit']:hover,
.hb-mp-form .mp_wrapper input[type='submit']:focus,
.hb-mp-form .mp_wrapper button.mepr-submit:hover,
.hb-mp-form .mp_wrapper button.mepr-submit:focus {
	background: var(--hb-purple-hover);
}

.hb-mp-form .mp_wrapper input[type='submit']:disabled,
.hb-mp-form .mp_wrapper button.mepr-submit:disabled {
	opacity: 0.5;
	cursor: default;
}

/* Errors and notices */
.hb-mp-form .mepr_error,
.hb-mp-form .mepr_updated {
	margin-bottom: 16px;
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	line-height: 20px;
}

.hb-mp-form .mepr_error {
	color: var(--hb-error);
}

.hb-mp-form .mepr_updated {
	color: var(--hb-success);
}

.hb-mp-form .mepr_error ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
