/* The 6-digit code ring (two-step page and the 2FA set-up page). static/login.js draws it over the real code box. */
/* ---- the code ring on the two-step page (the real box is still there: it is just laid over the ring) ---- */
.ringbox.ring-on { position: relative; min-height: 244px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 6px; }
.ringbox.ring-on .l-code { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; z-index: 3; cursor: text; border: 0; background: none; box-shadow: none; padding: 0; caret-color: transparent; color: transparent; font-size: 16px; }
.ringsvg { display: block; width: 200px; height: 200px; margin: 0 auto; overflow: visible; pointer-events: none; }
.seg-bg { fill: none; stroke: #dcdde1; stroke-width: 11; stroke-linecap: round; }
.seg-bg.cur { stroke: #b4b6bd; }
.ringbox:focus-within .seg-bg.cur { animation: segCur 1.3s ease-in-out infinite; }
@keyframes segCur { 50% { stroke: #8f9199; } }
.seg-fg { fill: none; stroke: #4a4d55; stroke-width: 11; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .35s cubic-bezier(.3,.8,.3,1), stroke .3s; }
.seg-fg.on { stroke-dashoffset: 0; }
.bead { fill: #4a4d55; transition: fill .3s; }
.rshield { transition: opacity .3s; } .ringbox.hasd .rshield { opacity: .15; }
.rdigit { font: 700 58px ui-monospace, "SF Mono", Menlo, monospace; fill: #2a2b2f; }
.rdigit.pop { animation: digPop .3s cubic-bezier(.3,1.7,.5,1); transform-box: fill-box; transform-origin: center; }
@keyframes digPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ringbox.busy .segs { animation: ringSpin 1s linear infinite; transform-origin: 100px 100px; }
@keyframes ringSpin { to { transform: rotate(360deg); } }
.ringbox.bad { animation: ringShake .42s ease-in-out; } .ringbox.bad .seg-fg { stroke: #b3261e; } .ringbox.bad .bead { fill: #b3261e; }
@keyframes ringShake { 0%, 100% { transform: translateX(0); } 18% { transform: translateX(-10px); } 38% { transform: translateX(9px); } 58% { transform: translateX(-6px); } 78% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .seg-fg, .ringbox * { transition: none !important; animation: none !important; } .ringbox.bad { animation: none; } }
.rdigits { display: flex; gap: 8px; justify-content: center; margin-top: 6px; pointer-events: none; }
.rdigits span { width: 26px; height: 32px; line-height: 30px; text-align: center; font: 600 20px ui-monospace, "SF Mono", Menlo, monospace; color: #4a4d55; border-bottom: 2px solid #dcdde1; }
.rdigits span.cur { border-bottom-color: #8f9199; }
.ringbox:focus-within .rdigits span.cur { border-bottom-color: #4a4d55; animation: segCur 1.3s ease-in-out infinite; }
.ringbox.bad .rdigits span { color: #b3261e; border-bottom-color: #b3261e; }
