import { css } from "lit"; export const altchaStyles = css` @keyframes altcha-spinner { to { transform: rotate(360deg); } } .altcha { background: var(--altcha-color-base, transparent); display: flex; flex-direction: column; position: relative; } .altcha[data-floating] { background: var(--altcha-color-base, white); display: none; filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2)); left: -100%; position: fixed; top: -100%; width: var(--altcha-max-width, 260px); z-index: 999999; } .altcha[data-floating="top"] .altcha-anchor-arrow { border-bottom-color: transparent; border-top-color: var(--altcha-color-border, #a0a0a0); bottom: -12px; top: auto; } .altcha[data-floating="bottom"]:focus-within::after { border-bottom-color: var(--altcha-color-border-focus, currentColor); } .altcha[data-floating="top"]:focus-within::after { border-top-color: var(--altcha-color-border-focus, currentColor); } .altcha[data-floating]:not([data-state="unverified"]) { display: block; } .altcha-anchor-arrow { border: 6px solid transparent; border-bottom-color: var(--altcha-color-border, #a0a0a0); content: ""; height: 0; left: 12px; position: absolute; top: -12px; width: 0; } .altcha-main { align-items: center; display: flex; gap: 0.4rem; padding: 0.7rem; position: relative; } .altcha-code-challenge { background: var(--altcha-color-base, white); border: 1px solid var(--altcha-color-border-focus, currentColor); border-radius: var(--altcha-border-radius, 3px); filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2)); padding: 0.5rem; position: absolute; top: 2.5rem; z-index: 9999999; } .altcha-code-challenge > form { display: flex; flex-direction: column; gap: 0.5rem; } .altcha-code-challenge-input { border: 1px solid currentColor; border-radius: 3px; box-sizing: border-box; outline: 0; font-size: 16px; padding: 0.35rem; width: 220px; } .altcha-code-challenge-input:focus { outline: 2px solid color-mix(in srgb, var(--altcha-color-active, #1d1dc9) 20%, transparent); } .altcha-code-challenge-input:disabled { opacity: 0.7; } .altcha-code-challenge-image { background-color: #fff; border: 1px solid currentColor; border-radius: 3px; box-sizing: border-box; object-fit: contain; height: 50px; width: 220px; } .altcha-code-challenge-audio, .altcha-code-challenge-reload { background: color-mix( in srgb, var(--altcha-color-text, currentColor) 10%, transparent ); border: 0; border-radius: 3px; color: var(--altcha-color-text, currentColor); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0.35rem; } .altcha-code-challenge-audio:disabled, .altcha-code-challenge-reload:disabled, .altcha-code-challenge-verify:disabled { opacity: 0.7; pointer-events: none; } .altcha-code-challenge-audio > *, .altcha-code-challenge-reload > * { height: 20px; width: 20px; } .altcha-code-challenge-buttons { display: flex; justify-content: space-between; } .altcha-code-challenge-buttons-left { display: flex; gap: 0.25rem; } .altcha-code-challenge-verify { align-items: center; background: var(--altcha-color-active, #1d1dc9); border: 0; border-radius: 3px; color: #fff; cursor: pointer; display: flex; gap: 0.5rem; font-size: 100%; padding: 0.35rem 1rem; } .altcha-code-challenge-arrow { border: 6px solid transparent; border-bottom-color: var(--altcha-color-border, currentColor); content: ""; height: 0; left: 0.15rem; position: absolute; top: -12px; width: 0; } .altcha[data-floating="top"] .altcha-code-challenge { top: -150px; } .altcha[data-floating="top"] .altcha-code-challenge-arrow { border-bottom-color: transparent; border-top-color: var(--altcha-color-border, currentColor); bottom: -12px; top: auto; } .altcha-label { cursor: pointer; flex-grow: 1; line-height: 1.15; } .altcha-logo { color: currentColor !important; opacity: 0.7; } .altcha-footer:hover, .altcha-logo:hover { opacity: 1; } .altcha-error { color: var(--altcha-color-error-text, #f23939); display: flex; font-size: 0.85rem; gap: 0.3rem; padding: 0 0.7rem 0.7rem; } .altcha-footer { align-items: center; background-color: var(--altcha-color-footer-bg, transparent); display: flex; font-size: 0.75rem; opacity: 0.7; justify-content: end; padding: 0.2rem 0.7rem; } .altcha-footer a { color: currentColor; } .altcha-checkbox { display: flex; align-items: center; justify-content: center; height: 24px; position: relative; width: 24px; margin: 0; } .altcha-checkbox .altcha-spinner { bottom: 0; left: 0; position: absolute; right: 0; top: 0; } .altcha-checkbox input { width: 18px; height: 18px; margin: 0; } .altcha-checkbox-verifying input { appearance: none; opacity: 0; pointer-events: none; } .altcha-spinner { animation: altcha-spinner 0.75s infinite linear; transform-origin: center; } `;