/* Registration guard: honeypot, Cloudflare Turnstile and slider puzzle.
   Used on the Create account page, My Account and wp-login.php. */

.tsai-hp-field {
	position: absolute !important;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tsai-form-turnstile {
	margin: 16px 0 14px;
}

/* Dedicated register page card */
.tsai-register-card {
	max-width: 520px;
	margin: 0 auto;
	padding: 28px;
	border: 1px solid rgba(30, 29, 25, 0.14);
	border-radius: 10px;
	background: #fffdf8;
}

.tsai-register-note {
	margin: 0 0 16px;
	color: #6f685c;
	font-size: 13px;
	line-height: 1.6;
}

.tsai-register-field {
	margin-bottom: 16px;
}

.tsai-register-field label {
	display: block;
	margin-bottom: 8px;
	color: #6f685c;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.tsai-register-field input {
	width: 100%;
	max-width: 100%;
	padding: 11px 12px;
	border: 1px solid rgba(30, 29, 25, 0.14);
	border-radius: 6px;
	background: #fff;
	font-size: 13px;
	box-sizing: border-box;
}

.tsai-register-submit {
	padding: 12px 22px;
	border: 0;
	border-radius: 6px;
	background: #1e1d19;
	color: #fbf7f0;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.tsai-register-submit:hover {
	background: #c99b5f;
	color: #fff;
}

.tsai-register-alt {
	margin: 14px 0 0;
	color: #6f685c;
	font-size: 12px;
}

.tsai-register-alt a {
	color: #1e1d19;
	font-weight: 600;
}

.tsai-register-page {
	max-width: 520px;
	margin: 0 auto;
}

/* Notices above the card. WooCommerce positions its icon absolutely; the
   theme's .prose ul reset zeroes the list padding, which made the icon sit on
   top of the text. Restore a dedicated gap and draw a font-independent icon. */
.tsai-register-notices {
	margin: 0 0 18px;
}

.tsai-register-notices ul.woocommerce-error,
.tsai-register-notices ul.woocommerce-info,
.tsai-register-notices ul.woocommerce-message {
	position: relative;
	margin: 0 0 10px;
	padding: 13px 16px 13px 46px;
	border: 1px solid rgba(165, 69, 52, 0.3);
	border-radius: 8px;
	background: #fdf4f1;
	color: #6d3a31;
	font-size: 13px;
	line-height: 1.55;
	list-style: none;
	box-sizing: border-box;
}

.tsai-register-notices ul.woocommerce-info,
.tsai-register-notices ul.woocommerce-message {
	padding-left: 16px;
	border-color: rgba(30, 29, 25, 0.14);
	background: #f8f4eb;
	color: #4a453c;
}

.tsai-register-notices ul.woocommerce-error li,
.tsai-register-notices ul.woocommerce-info li,
.tsai-register-notices ul.woocommerce-message li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tsai-register-notices ul.woocommerce-error li + li {
	margin-top: 6px;
}

.tsai-register-notices ul.woocommerce-error::before {
	content: "!";
	position: absolute;
	top: 12px;
	left: 14px;
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #a54534;
	color: #fff;
	font-family: "Poppins", "Helvetica Neue", sans-serif;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.tsai-register-notices ul.woocommerce-info::before,
.tsai-register-notices ul.woocommerce-message::before {
	display: none;
}

/* Password requirements */
.tsai-register-form .tsai-password-rules {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 14px;
	margin: 9px 0 0;
	padding: 0;
	list-style: none;
}

.tsai-register-form .tsai-password-rules li {
	position: relative;
	margin: 0;
	padding-left: 15px;
	color: #8b8477;
	font-size: 11px;
	line-height: 1.45;
	list-style: none;
}

.tsai-register-form .tsai-password-rules li::before {
	content: "•";
	position: absolute;
	top: 0;
	left: 0;
	color: #b7afa1;
	font-weight: 700;
}

.tsai-register-form .tsai-password-rules li.is-met {
	color: #4d7a52;
}

.tsai-register-form .tsai-password-rules li.is-met::before {
	content: "✓";
	color: #4d7a52;
}

.tsai-password-match {
	margin: 7px 0 0;
	min-height: 15px;
	color: #8b8477;
	font-size: 11px;
	line-height: 1.4;
}

.tsai-password-match.is-ok {
	color: #4d7a52;
}

.tsai-password-match.is-error {
	color: #a54534;
}

/* Progressive verification step */
.tsai-verify-step {
	margin: 18px 0 0;
	padding-top: 16px;
	border-top: 1px solid rgba(30, 29, 25, 0.12);
	animation: tsai-verify-in 0.3s ease both;
}

.tsai-verify-step[hidden] {
	display: none;
}

@keyframes tsai-verify-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.tsai-verify-label {
	margin: 0 0 12px;
	color: #6f685c;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Slider puzzle */
.tsai-slider {
	margin: 0 0 6px;
}

.tsai-slider-stage {
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 460 / 220;
	border-radius: 8px;
	background: #d9d4c8;
	user-select: none;
	-webkit-user-select: none;
	touch-action: pan-y;
	transition: opacity 0.15s ease;
}

.tsai-slider-stage img.tsai-slider-bg {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
}

.tsai-slider-piece {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 13.04348%; /* 60 / 460 */
	height: auto;
	max-width: none;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.32));
}

.tsai-slider-refresh {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid rgba(30, 29, 25, 0.12);
	border-radius: 50%;
	background: rgba(255, 253, 248, 0.9);
	color: #1e1d19;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.tsai-slider-refresh:hover {
	background: #fffdf8;
}

.tsai-slider-refresh:focus-visible {
	outline: 2px solid #c99b5f;
	outline-offset: 2px;
}

.tsai-slider-refresh[disabled] {
	opacity: 0.55;
	cursor: wait;
}

.tsai-slider-refresh svg {
	display: block;
	pointer-events: none;
}

.tsai-slider.is-refreshing .tsai-slider-stage {
	opacity: 0.55;
}

.tsai-slider-bar {
	position: relative;
	overflow: hidden;
	height: 44px;
	margin-top: 10px;
	border: 1px solid rgba(30, 29, 25, 0.14);
	border-radius: 7px;
	background: #f3eee5;
	user-select: none;
	-webkit-user-select: none;
	box-sizing: border-box;
}

.tsai-slider-fill {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 0;
	background: rgba(201, 155, 95, 0.2);
	pointer-events: none;
}

.tsai-slider-label {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6f685c;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	pointer-events: none;
	opacity: 1;
	transition: opacity 0.15s ease;
}

.tsai-slider.is-dragged .tsai-slider-label {
	opacity: 0.35;
}

.tsai-slider-handle {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 100%;
	border: 1px solid rgba(30, 29, 25, 0.2);
	border-radius: 6px;
	background: #fffdf8;
	color: #1e1d19;
	cursor: grab;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
	box-sizing: border-box;
	box-shadow: 0 1px 4px rgba(30, 29, 25, 0.12);
}

.tsai-slider-handle:active {
	cursor: grabbing;
}

.tsai-slider-handle:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px #c99b5f, 0 1px 4px rgba(30, 29, 25, 0.12);
}

.tsai-slider-handle svg {
	display: block;
	pointer-events: none;
}

.tsai-slider.is-error .tsai-slider-bar {
	border-color: rgba(165, 69, 52, 0.65);
}

.tsai-slider.is-error .tsai-slider-handle {
	box-shadow: 0 0 0 1px rgba(165, 69, 52, 0.55), 0 1px 4px rgba(30, 29, 25, 0.12);
}

.tsai-slider.is-checking .tsai-slider-bar {
	opacity: 0.65;
}

.tsai-slider.is-checking .tsai-slider-handle {
	cursor: wait;
}

.tsai-slider.is-verified .tsai-slider-bar {
	border-color: rgba(77, 122, 82, 0.65);
	background: #eef4ec;
}

.tsai-slider.is-verified .tsai-slider-fill {
	background: rgba(77, 122, 82, 0.18);
}

.tsai-slider.is-verified .tsai-slider-handle {
	border-color: rgba(77, 122, 82, 0.55);
	background: #f6fbf4;
	color: #3f6b46;
	cursor: default;
}

.tsai-slider.is-verified .tsai-slider-label {
	opacity: 0;
}

.tsai-slider-status {
	margin: 6px 0 0;
	min-height: 16px;
	color: #4d7a52;
	font-size: 11px;
	line-height: 1.4;
}

.tsai-slider-status.is-error {
	color: #a54534;
}

.tsai-slider-hint {
	margin: 6px 0 16px;
	color: #6f685c;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

@media (max-width: 480px) {
	.tsai-register-card {
		padding: 20px;
	}

	.tsai-register-notices ul.woocommerce-error,
	.tsai-register-notices ul.woocommerce-info,
	.tsai-register-notices ul.woocommerce-message {
		padding-top: 12px;
		padding-bottom: 12px;
	}

	.tsai-slider-bar {
		height: 42px;
	}

	.tsai-slider-handle {
		width: 44px;
	}

	.tsai-slider-label {
		font-size: 9px;
		letter-spacing: 0.1em;
	}
}

@media (max-width: 380px) {
	.tsai-register-form .tsai-password-rules {
		grid-template-columns: 1fr;
	}
}

/* wp-login.php has its own base styles; keep the extras light. */
.login .tsai-slider-hint {
	color: #3c434a;
	text-transform: none;
	letter-spacing: 0.02em;
	font-size: 12px;
	font-weight: 400;
}

.login .tsai-slider-status {
	color: #3c434a;
}
