/*
 * THE SIGNUP FORM IN THREE STEPS — light theme, scoped to the stepped form
 * (form.sch-steps: the class the script adds; without the script none of this
 * applies and the original form shows). Logical properties throughout, so
 * Arabic (dir="rtl") mirrors without a second sheet. 390px: one column, full
 * width buttons.
 */
form.sch-steps {
	--sch-ink: #122B46;
	--sch-ink-soft: #4d5c6d;
	--sch-ink-faint: #8a97a6;
	--sch-teal: #227F77;
	--sch-teal-dk: #1a6b63;
	--sch-line: #dfe5ec;
	--sch-bg: #ffffff;
	--sch-soft: #f5f8fa;
	--sch-err: #b91c1c;
	color: var(--sch-ink);
}
form.sch-steps .sch-steps-emptied > :not(.sch-steps-frame) { display: none; }
form.sch-steps .sch-steps-holder,
form.sch-steps .sch-steps-holder * { display: none !important; }

/* the progress */
form.sch-steps .sch-steps-head {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	counter-reset: none;
}
form.sch-steps .sch-steps-dot {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	gap: 10px;
	padding-block: 10px;
	border-block-end: 3px solid var(--sch-line);
	color: var(--sch-ink-faint);
	font-weight: 600;
	min-width: 0;
}
form.sch-steps .sch-steps-num {
	flex: 0 0 auto;
	inline-size: 28px;
	block-size: 28px;
	box-sizing: border-box;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--sch-line);
	background: var(--sch-bg);
	color: var(--sch-ink-faint);
	font-size: 14px;
}
form.sch-steps .sch-steps-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
form.sch-steps .sch-steps-dot.is-active { color: var(--sch-ink); border-block-end-color: var(--sch-teal); }
form.sch-steps .sch-steps-dot.is-active .sch-steps-num { border-color: var(--sch-teal); color: var(--sch-teal); }
form.sch-steps .sch-steps-dot.is-done { color: var(--sch-ink-soft); border-block-end-color: var(--sch-teal); }
form.sch-steps .sch-steps-dot.is-done .sch-steps-num { border-color: var(--sch-teal); color: var(--sch-teal); background: #e8f3f2; }

/* a step */
form.sch-steps .sch-step[hidden] { display: none; }
form.sch-steps .sch-step-title { font-size: 22px; line-height: 1.3; margin: 0 0 16px; color: var(--sch-ink); outline: none; }
form.sch-steps .sch-step-body > * { margin-block-end: 16px; }
form.sch-steps .sch-step-body label,
form.sch-steps .sch-step-body legend { color: var(--sch-ink); font-weight: 600; }
form.sch-steps .sch-step-body legend { padding: 0; }
/* the terms checkbox: box and text on one line, like the consent */
form.sch-steps .sch-step-body .bp-checkbox-wrap { display: flex; gap: 10px; align-items: flex-start; }
form.sch-steps .sch-step-body .bp-checkbox-wrap input { margin-block-start: 4px; flex: 0 0 auto; }
form.sch-steps .sch-step-body .bp-checkbox-wrap label { font-weight: 400; display: inline; margin: 0; }
form.sch-steps .sch-step-body input[type="text"],
form.sch-steps .sch-step-body input[type="email"],
form.sch-steps .sch-step-body input[type="password"],
form.sch-steps .sch-step-body input[type="search"],
form.sch-steps .sch-step-body input[type="number"],
form.sch-steps .sch-step-body input:not([type]),
form.sch-steps .sch-step-body select,
form.sch-steps .sch-step-body textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	border: 1px solid var(--sch-line);
	border-radius: 8px;
	background: var(--sch-bg);
	color: var(--sch-ink);
	padding-inline: 12px;
	font-size: 16px; /* no zoom on iOS */
}
form.sch-steps .sch-step-body .datebox-selects,
form.sch-steps .sch-step-body .date-selects { display: flex; gap: 8px; }

/* inline errors */
form.sch-steps .sch-invalid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
form.sch-steps .sch-invalid select,
form.sch-steps .sch-invalid textarea { border-color: var(--sch-err); box-shadow: 0 0 0 1px var(--sch-err); }
form.sch-steps .sch-inline-error,
form.sch-steps .sch-reg-field-error:not(:empty) { color: var(--sch-err); font-size: 14px; margin: 6px 0 0; }

/* consent + notes */
form.sch-steps .sch-reg-consent label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
form.sch-steps .sch-reg-consent input { margin-block-start: 4px; flex: 0 0 auto; }
form.sch-steps .sch-reg-note,
form.sch-steps .sch-reg-hint { color: var(--sch-ink-soft); font-size: 14px; margin: 6px 0 0; }
form.sch-steps .sch-reg-note { background: #fff8e6; border-inline-start: 3px solid #d9a521; padding: 8px 12px; border-radius: 6px; }

/* the association search */
form.sch-steps .sch-combo { position: relative; }
/* the magnifier: ours, inside the wrapper, at the input's START (left; right in Arabic) — the text starts after it */
form.sch-steps .sch-combo::before {
	content: "";
	position: absolute;
	inset-inline-start: 14px;
	inset-block-start: 22px;
	inline-size: 16px;
	block-size: 16px;
	transform: translateY(-50%);
	pointer-events: none;
	z-index: 1;
	background: no-repeat center / 16px 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a97a6' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E");
}
form.sch-steps .sch-step-body .sch-combo .sch-combo-input {
	padding-inline-start: 42px !important; /* beats any theme padding on inputs: the text never runs under the icon */
	padding-inline-end: 12px !important;
	background-image: none !important;     /* no second (theme) magnifier */
	text-indent: 0 !important;
}
form.sch-steps .sch-combo-native { position: absolute !important; inline-size: 1px !important; block-size: 1px !important; opacity: 0; pointer-events: none; }
form.sch-steps .sch-combo-list {
	position: absolute;
	z-index: 30;
	inset-inline: 0;
	inset-block-start: calc(100% + 4px);
	max-height: 280px;
	overflow: auto;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: var(--sch-bg);
	border: 1px solid var(--sch-line);
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(18,43,70,.15);
}
form.sch-steps .sch-combo-group { padding: 8px 12px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--sch-ink-faint); }
form.sch-steps .sch-combo-opt { padding: 10px 12px; cursor: pointer; color: var(--sch-ink); }
form.sch-steps .sch-combo-opt:hover,
form.sch-steps .sch-combo-opt.is-active { background: var(--sch-soft); }
form.sch-steps .sch-combo-opt.is-selected { color: var(--sch-teal); font-weight: 600; }
form.sch-steps .sch-combo-opt.is-none { border-block-start: 1px solid var(--sch-line); color: var(--sch-ink-soft); }
form.sch-steps .sch-combo-empty { padding: 10px 12px; color: var(--sch-ink-faint); }

/* licences */
form.sch-steps .sch-reg-licences fieldset { border: 0; margin: 0; padding: 0; }
form.sch-steps .sch-reg-lic-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 220px) auto;
	gap: 8px 10px;
	align-items: center;
	padding: 12px;
	margin-block-end: 10px;
	border: 1px solid var(--sch-line);
	border-radius: 10px;
	background: var(--sch-soft);
}
form.sch-steps .sch-reg-lic-row.is-primary { border-color: var(--sch-teal); background: #f1f8f7; }
form.sch-steps .sch-reg-lic-label { grid-column: 1 / -1; font-size: 13px; color: var(--sch-ink-soft); font-weight: 600; }
form.sch-steps .sch-reg-lic-remove { inline-size: 40px; block-size: 40px; border: 1px solid var(--sch-line); border-radius: 8px; background: var(--sch-bg); color: var(--sch-ink-soft); font-size: 20px; line-height: 1; cursor: pointer; }
form.sch-steps .sch-reg-lic-add { background: none; border: 0; color: var(--sch-teal); font-weight: 600; padding: 8px 0; cursor: pointer; }
form.sch-steps .sch-reg-lic-add:disabled { color: var(--sch-ink-faint); cursor: default; }
form.sch-steps .sch-req { color: var(--sch-err); }

/* the buttons */
form.sch-steps .sch-steps-nav { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-block-start: 24px; }
form.sch-steps .sch-steps-nav .submit { margin: 0; margin-inline-start: auto; }
form.sch-steps .sch-steps-next { margin-inline-start: auto; }
form.sch-steps .sch-steps-btn-primary,
form.sch-steps .sch-steps-nav input[type="submit"].sch-steps-btn-primary {
	background: var(--sch-teal);
	border: 1px solid var(--sch-teal);
	color: #fff;
	border-radius: 8px;
	min-height: 46px;
	padding-inline: 28px;
	font-weight: 600;
	font-size: 16px;
	cursor: pointer;
}
form.sch-steps .sch-steps-btn-primary:hover { background: var(--sch-teal-dk); border-color: var(--sch-teal-dk); }
form.sch-steps .sch-steps-back {
	background: var(--sch-bg);
	border: 1px solid var(--sch-line);
	color: var(--sch-ink);
	border-radius: 8px;
	min-height: 46px;
	padding-inline: 22px;
	font-weight: 600;
	cursor: pointer;
}

@media (max-width: 600px) {
	form.sch-steps .sch-steps-head { gap: 4px; }
	form.sch-steps .sch-steps-dot { flex-direction: column; gap: 4px; font-size: 12px; text-align: center; }
	form.sch-steps .sch-steps-title { max-width: 100%; }
	form.sch-steps .sch-reg-lic-row { grid-template-columns: minmax(0, 1fr) auto; }
	form.sch-steps .sch-reg-lic-no { grid-column: 1 / 2; }
	form.sch-steps .sch-steps-nav { flex-direction: column-reverse; align-items: stretch; }
	form.sch-steps .sch-steps-nav > *,
	form.sch-steps .sch-steps-nav .submit,
	form.sch-steps .sch-steps-nav .submit input { inline-size: 100%; margin: 0; }
}

/*
 * SHOW PASSWORD — one eye button at the END of each password field (left in
 * Arabic), inside it; the text never runs under it. BuddyBoss's own toggle is
 * replaced by it (public/js/sch-signup-steps.js), so these rules stand without
 * the steps too. Same box for "password" and "text": no jump when toggled.
 */
.bb-password-wrap.sch-pw-wrap { position: relative; display: block; }
.bb-password-wrap.sch-pw-wrap > input[name] { padding-inline-end: 48px !important; width: 100%; box-sizing: border-box; }
.bb-password-wrap.sch-pw-wrap > button.sch-pw-toggle {
	position: absolute;
	inset-block: 0;
	inset-inline-end: 0;
	inset-inline-start: auto;
	inline-size: 46px;
	min-height: 0 !important;
	height: auto;
	margin: 0 !important;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	border-radius: 8px;
	color: #5b6b7c !important;
	cursor: pointer;
	line-height: 1;
}
.bb-password-wrap.sch-pw-wrap > button.sch-pw-toggle:hover { color: #227F77 !important; }
.bb-password-wrap.sch-pw-wrap > button.sch-pw-toggle:focus-visible { outline: 2px solid #227F77; outline-offset: -6px; }
.sch-pw-toggle svg { display: block; inline-size: 20px; block-size: 20px; pointer-events: none; }
.sch-pw-toggle .sch-pw-off,
.sch-pw-toggle.is-shown .sch-pw-on { display: none; }
.sch-pw-toggle.is-shown .sch-pw-off { display: block; }

/*
 * "Didn't get the e-mail? Send it again" under BuddyBoss's green confirmation:
 * clear of the notice, the text and the button on one baseline, the button as
 * the steps' secondary (Back) button; wraps under the text when too narrow.
 */
form.sch-reg-resend {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px 16px;
	margin: 20px 0 24px;
	padding: 0;
}
form.sch-reg-resend .sch-reg-resend-text { margin: 0; color: #122B46; font-size: 16px; line-height: 1.5; }
form.sch-reg-resend button.sch-reg-resend-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 0 22px;
	background: #ffffff !important;
	border: 1px solid #dfe5ec !important;
	border-radius: 8px;
	color: #122B46 !important;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	box-shadow: none;
	cursor: pointer;
}
form.sch-reg-resend button.sch-reg-resend-btn:hover { border-color: #227F77 !important; color: #227F77 !important; }
form.sch-reg-resend button.sch-reg-resend-btn:focus-visible { outline: 2px solid #227F77; outline-offset: 2px; }
