/*
 * Massive Users Registration.
 * Fields, buttons and the card come from the theme's login card (login-modal.css);
 * this file only adds what the plugin's own steps need. Colors use the theme tokens.
 */

/* Step layout (registration, SMS code, email check, lost password) */
.mur-step {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	min-width: 0;
}

.mur-step .wd-login-modal__form {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.mur-step__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.mur-step__head--center {
	align-items: center;
	text-align: center;
}

.mur-step__title {
	margin: 0;
	padding: 0;
	color: var(--1-Colormodes-Text-Icon-1000, #000);
	font-family: 'Google Sans', sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 30px;
}

.mur-step__text {
	margin: 0;
	color: var(--1-Colormodes-Text-Icon-700, #545454);
	font-family: 'Google Sans', sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

.mur-step__text strong {
	color: var(--1-Colormodes-Text-Icon-1000, #000);
	font-weight: 700;
	word-break: break-all;
}

.mur-step__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 8px;
	border-radius: 50%;
	background: var(--0-Primitives-Colors-Green-25, #eff5ee);
}

.mur-step__icon::before {
	content: '';
	width: 28px;
	height: 28px;
	background-color: var(--0-Primitives-Colors-Green-600, #4e8348);
	-webkit-mask: var(--mur-icon) center / contain no-repeat;
	mask: var(--mur-icon) center / contain no-repeat;
}

.mur-step__icon--mail {
	--mur-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E");
}

.mur-step__icon--phone {
	--mur-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2' width='12' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E");
}

.mur-step__secondary {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 0;
}

.mur-link-button {
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.mur-link-button:disabled {
	opacity: 0.5;
	cursor: default;
}

/* First + last name side by side */
.mur-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 479px) {
	.mur-row {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

.mur-hint {
	margin: 4px 0 0;
	color: var(--1-Colormodes-Text-Icon-500, #8a8a8a);
	font-family: 'Google Sans', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 18px;
}

/* Password show / hide */
.mur-password {
	position: relative;
	display: block;
}

.mur-password input {
	padding-right: 48px !important;
}

/* !important: the theme's global button styles win otherwise */
.mur-password .mur-password__toggle {
	position: absolute !important;
	top: 50% !important;
	right: 8px;
	z-index: 2;
	display: block !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 8px;
	transform: translateY(-50%);
	background-color: transparent !important;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23545454' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cpath d='m1 1 22 22'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
	box-shadow: none;
	cursor: pointer;
}

.mur-password .mur-password__toggle.is-visible {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23545454' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

/* Password strength */
.mur-strength {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}

.mur-strength[hidden] {
	display: none;
}

.mur-strength__bar {
	flex: 1;
	height: 4px;
	overflow: hidden;
	border-radius: 4px;
	background: var(--1-Colormodes-Borders-200Alpha, #e5e5e5);
}

.mur-strength__bar span {
	display: block;
	width: 33%;
	height: 100%;
	background: var(--0-Primitives-Colors-Red-500, #ef3034);
	transition: width 0.2s ease, background-color 0.2s ease;
}

.mur-strength[data-score='1'] .mur-strength__bar span {
	width: 66%;
	background: var(--0-Primitives-Colors-Orange-500, #f79009);
}

.mur-strength[data-score='2'] .mur-strength__bar span {
	width: 100%;
	background: var(--0-Primitives-Colors-Green-600, #4e8348);
}

.mur-strength__label {
	min-width: 56px;
	color: var(--1-Colormodes-Text-Icon-700, #545454);
	font-family: 'Google Sans', sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 18px;
	text-align: right;
}

/* SMS code */
input.mur-otp {
	font-size: 20px !important;
	font-weight: 700 !important;
	letter-spacing: 0.5em;
	text-align: center;
}

/* Banners */
.wd-form-success-banner {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	border-radius: 12px;
	background: var(--0-Primitives-Colors-Green-25, #eff5ee);
	color: var(--0-Primitives-Colors-Green-700, #406c3b);
	font-family: 'Google Sans', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 18px;
}

.mur-notice + .mur-notice {
	margin-top: 8px;
}

/* The theme shows this box only for WooCommerce notices; the pending-email note counts too */
.wd-edit-profile-form__notices:has(.wd-edit-profile-form__notice) {
	display: flex;
}

/* Field errors on the account forms (login card fields style their own) */
.wd-edit-profile-form input[aria-invalid='true'],
.wd-change-password-form input[aria-invalid='true'],
.wd-edit-profile-form .is-error .iti {
	border-color: var(--0-Primitives-Colors-Red-500, #ef3034) !important;
}

.wd-edit-profile-form .wd-login-modal__field-error,
.wd-change-password-form .wd-login-modal__field-error {
	margin: 4px 0 0;
	color: var(--0-Primitives-Colors-Red-500, #ef3034);
	font-family: 'Google Sans', sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 18px;
}

/* Success message on pages without a plugin form */
.mur-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 1000001;
	max-width: calc(100vw - 32px);
	padding: 12px 20px;
	border-radius: 12px;
	background: var(--1-Colormodes-Background-1000, #000);
	color: var(--1-Colormodes-Text-Icon-0, #fff);
	font-family: 'Google Sans', sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	box-shadow: 0 8px 24px rgb(0 0 0 / 0.16);
	transform: translateX(-50%);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.mur-toast.is-hidden {
	opacity: 0;
	transform: translate(-50%, 16px);
	pointer-events: none;
}

.is-error .mur-hint {
	display: none;
}

/* Profile phone: the theme's profile reset zeroes the room intl-tel-input needs for the flag */
body .wd-edit-profile-form .wd-phone-field .iti input {
	padding-left: 64px !important;
	padding-right: 8px !important;
}

/* Inline "Verify" on the registration form */
.mur-verify .wd-login-modal__input-wrap,
.mur-verify .input-wrapper {
	position: relative;
	display: block;
}

.mur-verify input.input-text:not(.mur-verify__code-input),
.mur-verify.wd-phone-field .iti input {
	padding-right: 128px !important;
}

.mur-verify .mur-verify__send,
.mur-verify .mur-verify__check {
	height: 36px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 14px !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: var(--1-Colormodes-Background-1000, #000) !important;
	color: var(--1-Colormodes-Text-Icon-0, #fff) !important;
	font-family: 'Google Sans', sans-serif;
	font-size: 12px !important;
	font-weight: 700 !important;
	line-height: 36px !important;
	text-transform: none !important;
	white-space: nowrap;
	cursor: pointer;
}

.mur-verify .mur-verify__send {
	position: absolute !important;
	top: 50%;
	right: 6px;
	z-index: 5;
	transform: translateY(-50%);
}

.mur-verify .mur-verify__send[hidden] {
	display: none !important;
}

.mur-verify .mur-verify__send:disabled,
.mur-verify .mur-verify__check:disabled {
	opacity: 0.5;
	cursor: default;
}

.mur-verify__badge {
	position: absolute;
	top: 50%;
	right: 12px;
	z-index: 5;
	display: none;
	align-items: center;
	gap: 4px;
	transform: translateY(-50%);
	color: var(--0-Primitives-Colors-Green-600, #4e8348);
	font-family: 'Google Sans', sans-serif;
	font-size: 12px;
	font-weight: 700;
	pointer-events: none;
}

.mur-verify__badge::before {
	content: '';
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mur-verify.is-verified .mur-verify__badge {
	display: inline-flex;
}

.mur-verify.is-verified input.input-text,
.mur-verify.is-verified .iti {
	border-color: var(--0-Primitives-Colors-Green-600, #4e8348) !important;
}

.mur-verify__code {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.mur-verify__code[hidden] {
	display: none;
}

.mur-verify__code .wd-login-modal__input-wrap {
	flex: 1;
}

.mur-verify__code-input:not(:placeholder-shown) {
	letter-spacing: 0.3em;
	font-weight: 700 !important;
}

.mur-verify .mur-verify__check {
	height: 48px !important;
	line-height: 48px !important;
	border-radius: 12px !important;
}

.mur-verify__status {
	margin: 4px 0 0;
	color: var(--1-Colormodes-Text-Icon-700, #545454);
	font-family: 'Google Sans', sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 18px;
}

.mur-verify__status:empty {
	display: none;
}

.mur-verify__status.is-error {
	color: var(--0-Primitives-Colors-Red-500, #ef3034);
}

.mur-verify .mur-verify__resend {
	align-self: flex-start;
	margin-top: 4px;
	font-size: 12px;
}

.mur-verify .mur-verify__resend[hidden] {
	display: none;
}

body .wd-edit-profile-form .mur-verify.wd-phone-field .iti input {
	padding-right: 128px !important;
}

/* Switch (marketing consent) */
.mur-switch {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	cursor: pointer;
}

.mur-switch input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.mur-switch__track {
	position: relative;
	flex: 0 0 auto;
	width: 40px;
	height: 24px;
	border-radius: 12px;
	background: var(--1-Colormodes-Borders-300, #d0d5dd);
	transition: background-color 0.2s ease;
}

.mur-switch__track::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
	transition: transform 0.2s ease;
}

.mur-switch input:checked + .mur-switch__track {
	background: var(--0-Primitives-Colors-Green-500, #5c9a55);
}

.mur-switch input:checked + .mur-switch__track::after {
	transform: translateX(16px);
}

.mur-switch input:focus-visible + .mur-switch__track {
	outline: 2px solid var(--0-Primitives-Colors-Primary-Color-400, #6029ff);
	outline-offset: 2px;
}

.mur-switch__label {
	padding-top: 2px;
	color: var(--1-Colormodes-Text-Icon-700, #545454);
	font-family: 'Google Sans', sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

.mur-switch.is-disabled {
	cursor: default;
}

.mur-switch.is-disabled .mur-switch__track {
	opacity: 0.6;
}

.mur-consent {
	margin-top: 8px !important;
}
