/* Password + confirm-password fields on the registration form
 * (client_account). Reuses the --ma-* tokens defined on
 * .login-form-wrapper in myaccount.css so it matches the rest of the
 * login/register card without redefining colors. */

.woocommerce-account .login-form-wrapper .ms-reg-password-wrap {
	position: relative;
	display: block;
}

.woocommerce-account .login-form-wrapper .ms-reg-password-wrap input.input-text {
	width: 100%;
	padding-right: 44px;
}

.woocommerce-account .login-form-wrapper .ms-reg-password-toggle {
	position: absolute;
	top: 50%;
	right: 4px;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	min-width: 36px;
	min-height: 36px;
	border: none;
	background: transparent;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	transition: background .15s ease;
}

.woocommerce-account .login-form-wrapper .ms-reg-password-toggle:hover {
	background: var(--ma-bg, #f6f6f7);
}

.woocommerce-account .login-form-wrapper .ms-reg-password-toggle:focus-visible {
	outline: 2px solid var(--ma-accent, #FF1603);
	outline-offset: 1px;
}

/* Eye / eye-off icon, drawn in CSS so no extra asset request. */
.woocommerce-account .login-form-wrapper .ms-reg-password-toggle::before {
	content: '';
	width: 20px;
	height: 20px;
	background-color: var(--ma-muted, #6b7280);
	-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.woocommerce-account .login-form-wrapper .ms-reg-password-toggle.is-visible::before {
	background-color: var(--ma-ink, #0b0b0c);
	-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.94 10.94 0 0 1 12 19c-7 0-11-7-11-7a21.6 21.6 0 0 1 5.06-6.06M9.9 4.24A9.12 9.12 0 0 1 12 5c7 0 11 7 11 7a21.9 21.9 0 0 1-3.22 4.36M1 1l22 22'/%3E%3Cpath d='M14.12 14.12a3 3 0 1 1-4.24-4.24'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.94 10.94 0 0 1 12 19c-7 0-11-7-11-7a21.6 21.6 0 0 1 5.06-6.06M9.9 4.24A9.12 9.12 0 0 1 12 5c7 0 11 7 11 7a21.9 21.9 0 0 1-3.22 4.36M1 1l22 22'/%3E%3Cpath d='M14.12 14.12a3 3 0 1 1-4.24-4.24'/%3E%3C/svg%3E");
}

/* Inline match feedback under the confirm field. */
.woocommerce-account .login-form-wrapper .ms-reg-password-hint {
	display: block;
	min-height: 16px;
	margin-top: 5px;
	font-size: 12px;
	font-weight: 600;
}

.woocommerce-account .login-form-wrapper .ms-reg-password-hint.is-ok {
	color: #1a9e5c;
}

.woocommerce-account .login-form-wrapper .ms-reg-password-hint.is-error {
	color: var(--ma-accent, #FF1603);
}

.woocommerce-account .login-form-wrapper input.ms-reg-input-error {
	border-color: var(--ma-accent, #FF1603) !important;
}

.woocommerce-account .login-form-wrapper input.ms-reg-input-ok {
	border-color: #1a9e5c !important;
}

/* Password fields need room for the eye button; label/spacing otherwise
 * inherited from the shared .woocommerce-form-row rules in myaccount.css. */
.woocommerce-account .login-form-wrapper .ms-reg-password-row {
	margin-top: -2px;
}
