/* Captcha field — app/Views/common/captcha_field.php. Follows the storefront theme tokens
   (--t1-*) when present, with neutral fallbacks for the customer/admin panel. */
.lc-captcha {
	--lc-brand: var(--t1-brand, #4f46e5);
	--lc-line: var(--t1-line, #e2e8f0);
	--lc-ink: var(--t1-ink, #0f172a);
	--lc-muted: var(--t1-muted, #64748b);
	--lc-bg: var(--t1-bg, #f6f7f9);
	padding: .85rem;
	border: 1.5px solid var(--lc-line);
	border-radius: 16px;
	background: var(--lc-bg);
}
.lc-captcha-label { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; font-size: 13px; font-weight: 700; color: var(--lc-ink); }
.lc-captcha-label svg { width: 16px; height: 16px; fill: var(--lc-brand); flex-shrink: 0; }
/* Image + refresh button stay together; the input takes the rest of the row, or wraps below it. */
.lc-captcha-box { display: flex; flex-wrap: wrap; align-items: stretch; gap: .6rem; }
.lc-captcha-media { display: flex; align-items: stretch; gap: .45rem; flex: 0 0 auto; max-width: 100%; }
.lc-captcha-img {
	position: relative; flex: 0 1 180px; width: 180px; max-width: 100%; height: 56px;
	border-radius: 12px; overflow: hidden; background: #eef2ff;
	box-shadow: inset 0 0 0 1.5px var(--lc-line);
}
.lc-captcha-img img { display: block; width: 100%; max-width: none; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lc-captcha-img img:not([src]) { visibility: hidden; }
.lc-captcha-img.is-loading::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(255,255,255,0) 20%, rgba(255,255,255,.7) 50%, rgba(255,255,255,0) 80%) #eef2ff;
	background-size: 200% 100%; animation: lc-captcha-shimmer 1.1s linear infinite;
}
.lc-captcha .lc-captcha-refresh {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px;
	width: 44px; height: 56px; min-width: 0; margin: 0; padding: 0; box-sizing: border-box; line-height: 1;
	border: 1.5px solid var(--lc-line); border-radius: 12px; background: #fff; color: var(--lc-brand);
	cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.lc-captcha .lc-captcha-refresh:hover { border-color: var(--lc-brand); background: color-mix(in srgb, var(--lc-brand) 6%, #fff); }
.lc-captcha .lc-captcha-refresh:focus-visible { outline: 2px solid var(--lc-brand); outline-offset: 2px; }
.lc-captcha-refresh svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.lc-captcha-refresh.spin svg { animation: lc-captcha-spin .5s ease; }
.lc-captcha .lc-captcha-input {
	flex: 1 1 130px; min-width: 130px; height: 56px; margin: 0;
	background: #fff; font-size: 18px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.lc-captcha .lc-captcha-input::placeholder { font-family: var(--bs-body-font-family, system-ui, sans-serif); font-size: 13px; font-weight: 500; letter-spacing: normal; text-transform: none; }
.lc-captcha .lc-captcha-input:focus { border-color: var(--lc-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc-brand) 18%, transparent); }
.lc-captcha-hint { display: block; margin-top: .5rem; font-size: 12px; color: var(--lc-muted); }
.lc-captcha-hint b { color: var(--lc-brand); }

@keyframes lc-captcha-spin { to { transform: rotate(360deg); } }
@keyframes lc-captcha-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
	.lc-captcha-refresh.spin svg, .lc-captcha-img.is-loading::after { animation: none; }
}
