|
| 1 | +:host { |
| 2 | + display: inline-block; |
| 3 | +} |
| 4 | + |
1 | 5 | @media (prefers-reduced-motion: reduce) { |
2 | 6 | .captcha, |
3 | 7 | .captcha * { |
|
27 | 31 | } |
28 | 32 |
|
29 | 33 | .captcha { |
| 34 | + position: relative; |
| 35 | + display: inline-block; |
| 36 | + width: var(--cap-widget-width, 260px); |
| 37 | + height: var(--cap-widget-height, 58px); |
30 | 38 | background-color: var(--cap-background, #fdfdfd); |
31 | 39 | border: 1px solid var(--cap-border-color, #dddddd8f); |
32 | 40 | border-radius: var(--cap-border-radius, 14px); |
33 | 41 | user-select: none; |
34 | | - height: var(--cap-widget-height, 58px); |
35 | | - width: var(--cap-widget-width, 260px); |
36 | | - display: flex; |
37 | | - align-items: center; |
38 | | - padding: var(--cap-widget-padding, 14px); |
39 | | - gap: var(--cap-gap, 15px); |
40 | 42 | cursor: pointer; |
41 | 43 | transition: |
42 | 44 | filter 0.2s, |
43 | | - transform 0.2s; |
44 | | - position: relative; |
| 45 | + transform 0.2s, |
| 46 | + height 0.2s; |
45 | 47 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0); |
46 | 48 | overflow: hidden; |
47 | 49 | color: var(--cap-color, #212121); |
48 | | -} |
49 | | - |
50 | | -.captcha:not([data-state]):active { |
51 | | - transform: scale(0.97); |
52 | | -} |
53 | | - |
54 | | -.captcha:hover { |
55 | | - filter: brightness(98%); |
56 | | -} |
57 | | - |
58 | | -.captcha * { |
59 | 50 | font-family: var( |
60 | 51 | --cap-font, |
61 | 52 | system, |
|
73 | 64 | ); |
74 | 65 | } |
75 | 66 |
|
| 67 | +.captcha.has-troubleshoot { |
| 68 | + height: calc(var(--cap-widget-height, 58px) + 26px); |
| 69 | +} |
| 70 | + |
| 71 | +.captcha.has-troubleshoot .captcha-trigger { |
| 72 | + inset-block-end: 26px; |
| 73 | +} |
| 74 | + |
| 75 | +.captcha:not([data-state]):active { |
| 76 | + transform: scale(0.97); |
| 77 | +} |
| 78 | + |
| 79 | +.captcha:hover { |
| 80 | + filter: brightness(98%); |
| 81 | +} |
| 82 | + |
| 83 | +.captcha-trigger { |
| 84 | + position: absolute; |
| 85 | + inset: 0; |
| 86 | + display: flex; |
| 87 | + align-items: center; |
| 88 | + padding: var(--cap-widget-padding, 14px); |
| 89 | + gap: var(--cap-gap, 15px); |
| 90 | + border-radius: inherit; |
| 91 | + transition: inset 0.2s; |
| 92 | +} |
| 93 | + |
| 94 | +.captcha-trigger:focus-visible { |
| 95 | + outline: 2px solid var(--cap-focus-ring, #0066cc); |
| 96 | + outline-offset: -3px; |
| 97 | +} |
| 98 | + |
76 | 99 | .checkbox { |
77 | 100 | width: var(--cap-checkbox-size, 25px); |
78 | 101 | height: var(--cap-checkbox-size, 25px); |
|
82 | 105 | transition: opacity 0.2s; |
83 | 106 | margin-top: var(--cap-checkbox-margin, 2px); |
84 | 107 | margin-bottom: var(--cap-checkbox-margin, 2px); |
| 108 | + flex-shrink: 0; |
85 | 109 | } |
86 | 110 |
|
87 | 111 | .captcha p { |
|
106 | 130 | content: ""; |
107 | 131 | pointer-events: none; |
108 | 132 | position: absolute; |
109 | | - left: 0; |
| 133 | + inset-inline-start: 0; |
110 | 134 | width: 100%; |
111 | 135 | height: 0.6em; |
112 | 136 | z-index: 1; |
|
229 | 253 | } |
230 | 254 | } |
231 | 255 |
|
232 | | -.captcha[disabled] { |
| 256 | +.captcha-trigger[disabled] { |
233 | 257 | cursor: not-allowed; |
234 | 258 | } |
235 | 259 |
|
236 | | -.captcha[disabled][data-state="verifying"] { |
| 260 | +.captcha[data-state="verifying"] .captcha-trigger { |
237 | 261 | cursor: progress; |
238 | 262 | } |
239 | 263 |
|
240 | | -.captcha[disabled][data-state="done"] { |
| 264 | +.captcha[data-state="done"] .captcha-trigger { |
241 | 265 | cursor: default; |
242 | 266 | } |
243 | 267 |
|
244 | | -.captcha .credits { |
| 268 | +.credits { |
245 | 269 | position: absolute; |
246 | | - bottom: 10px; |
247 | | - right: 10px; |
| 270 | + inset-block-end: 4px; |
| 271 | + inset-inline-end: 4px; |
248 | 272 | font-size: 12px !important; |
249 | 273 | color: var(--cap-color, #212121); |
250 | 274 | opacity: 0.8 !important; |
251 | 275 | text-underline-offset: 0.18em; |
252 | 276 | text-decoration-thickness: 0.08em; |
253 | | - z-index: 6; |
254 | | - display: block !important; |
| 277 | + z-index: 2; |
| 278 | + min-width: 24px; |
| 279 | + min-height: 24px; |
| 280 | + padding: 4px 6px; |
| 281 | + display: inline-flex !important; |
| 282 | + align-items: center; |
| 283 | + justify-content: flex-end; |
| 284 | + border-radius: 4px; |
| 285 | + text-decoration: underline; |
| 286 | +} |
| 287 | + |
| 288 | +.credits:focus-visible { |
| 289 | + outline: 2px solid var(--cap-focus-ring, #0066cc); |
| 290 | + outline-offset: 2px; |
| 291 | + opacity: 1 !important; |
255 | 292 | } |
256 | 293 |
|
257 | 294 | .cap-troubleshoot-link { |
258 | | - color: #0066cc; |
| 295 | + position: absolute; |
| 296 | + inset-block-end: 4px; |
| 297 | + inset-inline-start: 14px; |
| 298 | + display: inline-flex; |
| 299 | + align-items: center; |
| 300 | + padding: 4px 6px; |
| 301 | + min-width: 24px; |
| 302 | + min-height: 24px; |
| 303 | + color: var(--cap-troubleshoot-color, #0050a0); |
259 | 304 | text-decoration: underline; |
260 | 305 | text-underline-offset: 0.15em; |
261 | 306 | text-decoration-thickness: 0.08em; |
262 | 307 | cursor: pointer; |
263 | 308 | font-weight: 500; |
264 | | - font-size: inherit; |
| 309 | + font-size: 13px; |
| 310 | + border-radius: 4px; |
| 311 | + z-index: 2; |
265 | 312 | } |
| 313 | + |
| 314 | +.cap-troubleshoot-link[hidden] { |
| 315 | + display: none; |
| 316 | +} |
| 317 | + |
266 | 318 | .cap-troubleshoot-link:hover { |
267 | | - opacity: 0.8; |
| 319 | + opacity: 0.85; |
| 320 | +} |
| 321 | + |
| 322 | +.cap-troubleshoot-link:focus-visible { |
| 323 | + outline: 2px solid var(--cap-focus-ring, #0066cc); |
| 324 | + outline-offset: 2px; |
| 325 | +} |
| 326 | + |
| 327 | +@media (forced-colors: active) { |
| 328 | + .captcha { |
| 329 | + border-color: CanvasText; |
| 330 | + } |
| 331 | + .checkbox { |
| 332 | + border-color: CanvasText; |
| 333 | + } |
| 334 | + .captcha-trigger:focus-visible, |
| 335 | + .credits:focus-visible, |
| 336 | + .cap-troubleshoot-link:focus-visible { |
| 337 | + outline-color: Highlight; |
| 338 | + } |
| 339 | + .progress-ring-bg { |
| 340 | + stroke: GrayText; |
| 341 | + } |
| 342 | + .progress-ring-circle { |
| 343 | + stroke: CanvasText; |
| 344 | + } |
| 345 | + .captcha.invalid { |
| 346 | + border-color: Mark; |
| 347 | + box-shadow: none; |
| 348 | + } |
| 349 | + .credits { |
| 350 | + opacity: 1 !important; |
| 351 | + } |
268 | 352 | } |
0 commit comments