body.tacc-auth-open {
	overflow: hidden;
}

.tacc-auth-overlay {
	--tacc-auth-bg: var(--toile-checkout-bg, var(--tacc-cart-bg, #f4efea));
	--tacc-auth-ink: var(--toile-checkout-ink, var(--tacc-cart-ink, #3b2a23));
	--tacc-auth-soft: var(--toile-checkout-soft, var(--tacc-cart-soft, #75695f));
	--tacc-auth-line: var(--toile-checkout-line, var(--tacc-cart-line, #e2d9d0));
	--tacc-auth-accent: var(--toile-checkout-accent, var(--tacc-cart-mid, #7f4d3e));
	--tacc-auth-danger: var(--toile-checkout-danger, var(--tacc-cart-danger, #a02020));

	position: fixed;
	inset: 0;
	z-index: 150;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(12px, 4vw, 32px);
	background: rgba(28, 22, 20, 0.48);
	color: var(--tacc-auth-ink);
	font-family: "Poppins", sans-serif;
}

.tacc-auth-overlay[hidden],
.tacc-auth-overlay [hidden] {
	display: none !important;
}

.tacc-auth-overlay *,
.tacc-auth-overlay *::before,
.tacc-auth-overlay *::after {
	box-sizing: border-box;
}

.tacc-auth-sheet {
	width: min(460px, 100%);
	max-height: 88dvh;
	margin: auto;
	overflow: auto;
	background: #fff;
	border-radius: 22px;
	padding: clamp(18px, 3vw, 26px);
	display: flex;
	flex-direction: column;
	gap: 16px;
	box-shadow: 0 18px 50px rgba(28, 22, 20, 0.28);
}

.tacc-auth-sheet__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
}

.tacc-auth-sheet__head h2 {
	margin: 0 0 5px;
	font-family: "Poiret One", sans-serif;
	font-size: 25px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--tacc-auth-ink);
}

.tacc-auth-sheet__head p {
	margin: 0;
	font-size: 13.8px;
	color: var(--tacc-auth-soft);
	line-height: 1.55;
}

.tacc-auth-sheet__close {
	flex: 0 0 44px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 12px;
	border: 1px solid var(--tacc-auth-line);
	background: #fff;
	color: var(--tacc-auth-soft);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.tacc-auth-tabs {
	display: flex;
	gap: 6px;
	background: var(--tacc-auth-bg);
	border-radius: 13px;
	padding: 5px;
}

.tacc-auth-tab {
	flex: 1 1 0;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 11px;
	border: 0;
	background: transparent;
	color: var(--tacc-auth-soft);
	font: inherit;
	font-size: 14.5px;
	cursor: pointer;
}

.tacc-auth-tab.is-active {
	background: var(--tacc-auth-accent);
	color: #fff;
	font-weight: 500;
}

.tacc-auth-field {
	display: block;
	margin: 0;
}

.tacc-auth-field > span:first-child {
	display: block;
	font-size: 13px;
	color: var(--tacc-auth-soft);
	margin-bottom: 7px;
}

.tacc-auth-field input {
	width: 100%;
	min-height: 50px;
	height: auto;
	padding: 0 15px;
	border: 1px solid var(--tacc-auth-line);
	border-radius: 12px;
	background: #fff;
	font-family: inherit;
	font-size: 16px;
	color: var(--tacc-auth-ink);
}

.tacc-password-control {
	position: relative;
	display: block;
}

.tacc-password-control input {
	padding-inline-end: 62px !important;
}

/* WooCommerce appends its own reveal button to password inputs on DOM ready. */
.tacc-password-control > .show-password-input {
	display: none !important;
}

/* XStore wraps password inputs and injects a second pair of eye SVGs. */
.tacc-password-control .input-password-wrap > svg.show-password,
.tacc-password-control .input-password-wrap > svg.hide-password {
	display: none !important;
	pointer-events: none !important;
}

/* Keep the custom, touch-friendly toggle as the only reveal control in Edge. */
.tacc-password-control input::-ms-reveal,
.tacc-password-control input::-ms-clear {
	display: none;
}

.tacc-password-toggle {
	position: absolute;
	top: 50%;
	inset-inline-end: 3px;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 48px;
	min-width: 48px;
	height: 48px;
	min-height: 48px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--tacc-auth-soft, var(--soft, #75695f));
	cursor: pointer;
	touch-action: manipulation;
}

.tacc-password-toggle:hover {
	background: var(--tacc-auth-bg, var(--faint, #faf7f4));
	color: var(--tacc-auth-ink, var(--brand, #3b2a23));
}

.tacc-password-toggle svg {
	display: block;
	width: 22px;
	height: 22px;
}

.tacc-password-toggle svg[hidden] {
	display: none !important;
}

.tacc-auth-sheet button:focus-visible,
.tacc-auth-sheet a:focus-visible,
.tacc-auth-sheet input:focus-visible,
.tacc-password-toggle:focus-visible {
	outline: 3px solid rgba(127, 77, 62, 0.28);
	outline-offset: 2px;
}

.tacc-auth-lost-password {
	align-self: flex-start;
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--tacc-auth-soft);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tacc-auth-lost-password:hover {
	color: var(--tacc-auth-ink);
}

.tacc-auth-error {
	margin: 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fbeaea;
	font-size: 13.5px;
	color: var(--tacc-auth-danger);
	line-height: 1.5;
}

.tacc-auth-note {
	margin: 0;
	font-size: 13px;
	color: var(--tacc-auth-soft);
	line-height: 1.5;
}

.tacc-auth-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: 14px;
	background: var(--tacc-auth-ink);
	color: var(--tacc-auth-bg);
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
}

.tacc-auth-submit:hover {
	background: var(--tacc-auth-accent);
	color: #fff;
}

.tacc-auth-submit:disabled {
	opacity: 0.65;
	cursor: wait;
}

@media (max-width: 520px) {
	.tacc-auth-overlay {
		align-items: flex-end;
		padding: 10px;
	}

	.tacc-auth-sheet {
		max-height: calc(100dvh - 20px);
		border-radius: 20px;
		padding: 20px 16px;
	}

	.tacc-password-toggle {
		width: 50px;
		min-width: 50px;
		height: 50px;
		min-height: 50px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tacc-auth-overlay *,
	.tacc-auth-overlay *::before,
	.tacc-auth-overlay *::after {
		scroll-behavior: auto !important;
	}
}
