/* Multi-step registration wizard (includes/register.php + idu-register.js).
 * The markup is BuddyBoss's own signup form; the wizard only groups it into
 * panels, so everything still posts in one go. */

/* Clear the fixed header, so the heading and step one are not behind it.
   It is ~155px tall on desktop; on mobile it is far shorter and the content
   grid already carries its own offset, so 80px is enough there. */
.bs-bp-container-reg {
	margin-top: 80px;
}
@media (min-width: 800px) {
	.bs-bp-container-reg {
		margin-top: 120px;
	}
}
/* The theme repeats the site name above the form; the page has a heading. */
.bs-bp-container-reg .register-section-logo {
	display: none;
}
/* Heading and Sign In on one line, centred against each other. */
.bs-bp-container-reg .entry-header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}
.bs-bp-container-reg .entry-header .entry-title {
	margin-bottom: 0;
}
/* Sign In: the theme's wave animation on hover, and a plain outline - no
   filled background and no arrow. */
.entry-header .idu-reg-signin {
	display: inline-flex;
	align-items: center;
}
/* The theme lowercases this header link, and the wave animation splits the
   label into per-character spans that the lowercasing applies to directly -
   so the wrapper and every descendant have to be covered, not just the link. */
.entry-header .idu-reg-signin,
.entry-header .idu-reg-signin__link,
.entry-header .idu-reg-signin__link * {
	text-transform: none !important;
}
.entry-header .idu-reg-signin__link {
	display: inline-flex;
	align-items: center;
	padding: 9px 20px !important;
	border: 1px solid var(--bb-content-border-color, #e7e9ec) !important;
	border-radius: 999px !important;
	background: none !important;
	box-shadow: none !important;
	color: var(--idu-listings-primary-ink, #032b1b) !important;
	font-weight: 600;
	text-transform: none !important;
	text-decoration: none;
	transition: border-color .15s;
}
.entry-header .idu-reg-signin__link:hover,
.entry-header .idu-reg-signin__link:focus-visible {
	border-color: var(--idu-listings-gold, #eca002) !important;
	background: none !important;
}
.entry-header .idu-reg-signin__link::after,
.entry-header .idu-reg-signin__link::before {
	content: none !important;
}

/* Progress ------------------------------------------------------------- */
.idu-reg-progress {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 28px;
}
.idu-reg-progress__step {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 1 auto;
	min-width: 0;
	font-size: 14px;
	color: var(--bb-alternate-text-color, #787f86);
}
/* Its own element, so two steps space out the same as three. */
.idu-reg-progress__line {
	flex: 1 1 auto;
	height: 1px;
	min-width: 16px;
	background: var(--bb-content-border-color, #e7e9ec);
}
.idu-reg-progress__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid var(--bb-content-border-color, #e7e9ec);
	background: var(--bb-content-background-color, #fff);
	font-size: 13px;
	font-weight: 600;
}
.idu-reg-progress__label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.idu-reg-progress__step.is-active .idu-reg-progress__num,
.idu-reg-progress__step.is-done .idu-reg-progress__num {
	border-color: var(--idu-listings-gold, #eca002);
	background: var(--idu-listings-gold, #eca002);
	color: var(--idu-listings-primary-ink, #032b1b);
}
.idu-reg-progress__step.is-active {
	color: var(--bb-headings-color, #122b46);
	font-weight: 600;
}

/* Panels --------------------------------------------------------------- */
.idu-reg-panel[hidden] {
	display: none !important;
}
.idu-reg-panel.is-in {
	animation: idu-reg-panel-in .32s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes idu-reg-panel-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	.idu-reg-panel.is-in {
		animation: none;
	}
}
.idu-reg-panel__title {
	margin: 0 0 6px;
	font-size: 20px;
	color: var(--bb-headings-color, #122b46);
}
.idu-reg-panel__intro {
	margin: 0 0 20px;
	color: var(--bb-alternate-text-color, #787f86);
	font-size: 14px;
}

/* Step 1: account type ------------------------------------------------- */
.idu-reg-types {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	margin: 0 0 8px;
}
.idu-reg-type {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}
.idu-reg-type input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.idu-reg-type__box {
	display: flex;
	flex-direction: column;
	gap: 10px;
	height: 100%;
	padding: 22px 20px;
	border: 1px solid var(--bb-content-border-color, #e7e9ec);
	border-radius: 14px;
	background: var(--bb-content-background-color, #fff);
	transition: border-color .15s, box-shadow .15s;
}
.idu-reg-type:hover .idu-reg-type__box {
	border-color: var(--idu-listings-gold, #eca002);
}
.idu-reg-type input:focus-visible + .idu-reg-type__box {
	outline: 2px solid var(--idu-listings-gold, #eca002);
	outline-offset: 2px;
}
.idu-reg-type input:checked + .idu-reg-type__box {
	border-color: var(--idu-listings-gold, #eca002);
	box-shadow: 0 0 0 1px var(--idu-listings-gold, #eca002) inset;
}
.idu-reg-type__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--idu-listings-gold-soft, #fdf3e0);
	color: var(--idu-listings-primary-ink, #032b1b);
}
.idu-reg-type__icon svg {
	width: 22px;
	height: 22px;
}
.idu-reg-type__name {
	font-size: 17px;
	font-weight: 600;
	color: var(--bb-headings-color, #122b46);
}
.idu-reg-type__desc {
	font-size: 14px;
	line-height: 1.5;
	color: var(--bb-alternate-text-color, #787f86);
}

/* After Create account -------------------------------------------------- */
.idu-reg-done {
	max-width: 560px;
	margin: 0 auto;
	padding: 36px 28px;
	border: 1px solid var(--bb-content-border-color, #e7e9ec);
	border-radius: 14px;
	background: var(--bb-content-background-color, #fff);
	text-align: center;
}
.idu-reg-done__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 18px;
	border-radius: 50%;
	background: var(--idu-listings-gold-soft, #fdf3e0);
	color: var(--idu-listings-primary-ink, #032b1b);
}
.idu-reg-done__title {
	margin: 0 0 10px;
	font-size: 22px;
	color: var(--bb-headings-color, #122b46);
}
.idu-reg-done__text {
	margin: 0 0 12px;
	color: var(--bb-body-text-color, #4b5563);
	line-height: 1.6;
}
.idu-reg-done__text strong {
	color: var(--bb-headings-color, #122b46);
	word-break: break-word;
}
.idu-reg-done__hint {
	margin: 0;
	font-size: 14px;
	color: var(--bb-alternate-text-color, #787f86);
	line-height: 1.6;
}
/* The card replaces BuddyBoss's own notice and the now-empty form. */
.idu-reg-done + .register-page > .bp-feedback,
.idu-reg-done + .register-page > #signup-form {
	display: none !important;
}

/* Navigation ----------------------------------------------------------- */
.idu-reg-nav {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 28px;
}
.idu-reg-nav__next,
.idu-reg-nav__back {
	cursor: pointer;
}
.idu-reg-nav__next {
	margin-left: auto;
}
/* .idu-btn sets display, which would otherwise defeat the hidden attribute
   and leave Continue sitting beside Create account on the final step. */
.idu-reg-nav__next[hidden] {
	display: none !important;
}
/* Secondary: the theme styles every form button as a primary one. */
.idu-reg .idu-reg-nav__back {
	min-height: 0 !important;
	padding: 10px 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: var(--idu-listings-primary-ink, #032b1b) !important;
	font-weight: 500;
	text-decoration: none !important;
}
/* Underline sweeps in from the left on hover. */
.idu-reg .idu-reg-nav__back > span {
	background-image: linear-gradient( currentColor, currentColor );
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 1px;
	transition: background-size .28s ease, opacity .2s ease;
	padding-bottom: 2px;
}
.idu-reg .idu-reg-nav__back:hover > span,
.idu-reg .idu-reg-nav__back:focus-visible > span {
	background-size: 100% 1px;
}
.idu-reg .idu-reg-nav__back:hover,
.idu-reg .idu-reg-nav__back:focus-visible {
	color: var(--idu-listings-gold, #eca002) !important;
}
@media (prefers-reduced-motion: reduce) {
	.idu-reg .idu-reg-nav__back > span {
		transition: none;
	}
}
.idu-reg-nav__back[hidden] {
	display: none !important;
}
.idu-reg-error {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #f3c2c2;
	border-radius: 8px;
	background: #fdecec;
	color: #b42424;
	font-size: 14px;
}
.idu-reg-error[hidden] {
	display: none !important;
}
.idu-reg-field-error {
	display: block;
	margin-top: 6px;
	color: #b42424;
	font-size: 13px;
}
/* The submit button takes Continue's place on the right of the row. */
#signup-form .idu-reg-submit-wrap {
	margin: 0 0 0 auto;
}
#signup-form .idu-reg-submit-wrap .submit {
	margin: 0;
	padding: 0;
	text-align: right;
}
@media (max-width: 600px) {
	.idu-reg-types {
		grid-template-columns: 1fr;
	}
	.idu-reg-progress__label {
		display: none;
	}
	.idu-reg-progress__step {
		flex: 0 0 auto;
	}
	.idu-reg-progress__step + .idu-reg-progress__step::before {
		width: 24px;
		flex: 0 0 24px;
	}
	.idu-reg-progress {
		justify-content: center;
	}
}

/* Card behind the module ------------------------------------------------
   The page is cream, and the heading, steps and form sat straight on it.
   The article is the one element that wraps all three.

   BuddyBoss sizes it as body.buddypress.register article.bp_register (450px
   cap, 80-85% wide on small screens), so these selectors carry the body
   classes too in order to win. The cap is widened by the padding, and the
   phone width goes to 100%, so the fields are no narrower than they were. */
body.buddypress.register .bs-bp-container-reg article.bp_register {
	box-sizing: border-box;
	max-width: 546px;
	margin-bottom: 40px;
	padding: 40px 48px;
	border: 1px solid rgba(3, 43, 27, .08);
	border-radius: 20px;
	background: var(--bb-content-background-color, #fff);
	box-shadow: 0 12px 32px rgba(3, 43, 27, .06);
}
/* The check-your-email card is already inside one now. */
.bs-bp-container-reg article.bp_register .idu-reg-done {
	padding: 8px 0;
	border: 0;
	background: none;
}
@media (max-width: 600px) {
	body.buddypress.register .bs-bp-container-reg article.bp_register {
		width: 100%;
		padding: 26px 18px;
		border-radius: 16px;
	}
}
