/**
 * WooCommerce password visibility: restyle the injected show-password button.
 *
 * WooCommerce frontend JS wraps each form password input in .password-input
 * and appends <button class="show-password-input">, then toggles
 * input type + .display-password on click. Astra only loads the WooCommerce
 * icon-font glyph on the logged-out login form, so elsewhere the empty
 * button inherits site button styles (orange circles).
 *
 * This file restyles those existing buttons (no extra toggle logic) into
 * discreet in-field eye / eye-off controls on every WooCommerce form.
 */

.woocommerce form .password-input,
.woocommerce-page form .password-input {
	display: block;
	position: relative;
	width: 100%;
	max-width: 100%;
}

.woocommerce form .password-input > input,
.woocommerce-page form .password-input > input {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding-right: 2.75rem;
}

.woocommerce form .password-input button.show-password-input,
.woocommerce-page form .password-input button.show-password-input {
	position: absolute;
	top: 50%;
	right: 0.45rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #34353a !important;
	font-size: 0;
	line-height: 0;
	text-indent: 0;
	text-shadow: none;
	transform: translateY(-50%);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.woocommerce form .password-input button.show-password-input:hover,
.woocommerce form .password-input button.show-password-input:focus,
.woocommerce form .password-input button.show-password-input:active,
.woocommerce form .password-input button.show-password-input:visited,
.woocommerce-page form .password-input button.show-password-input:hover,
.woocommerce-page form .password-input button.show-password-input:focus,
.woocommerce-page form .password-input button.show-password-input:active,
.woocommerce-page form .password-input button.show-password-input:visited {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: #34353a !important;
}

.woocommerce form .password-input button.show-password-input:focus,
.woocommerce form .password-input button.show-password-input:focus-visible,
.woocommerce-page form .password-input button.show-password-input:focus,
.woocommerce-page form .password-input button.show-password-input:focus-visible {
	outline: 2px solid #34353a;
	outline-offset: 2px;
}

.woocommerce form .password-input button.show-password-input::before,
.woocommerce-page form .password-input button.show-password-input::before {
	content: none;
	display: none;
}

.woocommerce form .password-input button.show-password-input::after,
.woocommerce-page form .password-input button.show-password-input::after {
	content: "";
	display: block;
	width: 1.15rem;
	height: 1.15rem;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5C6.48 5 1.73 8.11 0 12c1.73 3.89 6.48 7 12 7s10.27-3.11 12-7c-1.73-3.89-6.48-7-12-7zm0 11.5A4.5 4.5 0 1 1 16.5 12 4.5 4.5 0 0 1 12 16.5zM12 9a3 3 0 1 0 3 3 3 3 0 0 0-3-3z'/%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'%3E%3Cpath fill='black' d='M12 5C6.48 5 1.73 8.11 0 12c1.73 3.89 6.48 7 12 7s10.27-3.11 12-7c-1.73-3.89-6.48-7-12-7zm0 11.5A4.5 4.5 0 1 1 16.5 12 4.5 4.5 0 0 1 12 16.5zM12 9a3 3 0 1 0 3 3 3 3 0 0 0-3-3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.woocommerce form .password-input button.show-password-input.display-password::after,
.woocommerce-page form .password-input button.show-password-input.display-password::after {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M2.1 3.51 3.51 2.1 21.9 20.49 20.49 21.9l-3.32-3.32C15.5 19.48 13.82 20 12 20 5.52 20 .77 16.89-.96 13c.7-1.57 1.86-3.05 3.35-4.27L2.1 3.51zM12 7.5A4.5 4.5 0 0 1 16.5 12c0 .5-.08.98-.23 1.43l-1.62-1.62A2.99 2.99 0 0 0 12 9a3 3 0 0 0-2.81 4.11L7.56 11.5A4.48 4.48 0 0 1 12 7.5zm11 5.5c-.55 1.24-1.5 2.48-2.7 3.54l-1.45-1.45c.86-.74 1.57-1.58 2.09-2.45-1.73-3.89-6.48-7-12-7-.74 0-1.46.07-2.16.2L5.3 4.36C7.3 3.5 9.57 3 12 3c6.48 0 11.23 3.11 12.96 7-.55 1.24-1.37 2.42-2.4 3.48l.54.52z'/%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'%3E%3Cpath fill='black' d='M2.1 3.51 3.51 2.1 21.9 20.49 20.49 21.9l-3.32-3.32C15.5 19.48 13.82 20 12 20 5.52 20 .77 16.89-.96 13c.7-1.57 1.86-3.05 3.35-4.27L2.1 3.51zM12 7.5A4.5 4.5 0 0 1 16.5 12c0 .5-.08.98-.23 1.43l-1.62-1.62A2.99 2.99 0 0 0 12 9a3 3 0 0 0-2.81 4.11L7.56 11.5A4.48 4.48 0 0 1 12 7.5zm11 5.5c-.55 1.24-1.5 2.48-2.7 3.54l-1.45-1.45c.86-.74 1.57-1.58 2.09-2.45-1.73-3.89-6.48-7-12-7-.74 0-1.46.07-2.16.2L5.3 4.36C7.3 3.5 9.57 3 12 3c6.48 0 11.23 3.11 12.96 7-.55 1.24-1.37 2.42-2.4 3.48l.54.52z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 544px) {
	.woocommerce form .password-input > input,
	.woocommerce-page form .password-input > input {
		padding-right: 2.6rem;
	}
}
