/*
 * Login › verificação em duas etapas (login-totp.js): animação de espera do código do Google Authenticator.
 * Celular com os 6 pontos do código (acendem em sequência enquanto espera; ficam azuis conforme a digitação),
 * ondas azuis fracas saindo dele (as mesmas da antena do robô) e o anel de 30 s do código atual.
 */
.login-totp-wait {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin: 10px 0 6px;
}
.login-totp-wait[hidden] { display: none; }

/* Celular */
.login-totp-wait__phone {
    position: relative;
    width: 58px;
    height: 92px;
    flex: none;
    border: 2px solid #1b2430;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 10px 22px -10px rgba(16, 36, 80, .3);
}
.login-totp-wait__phone::before {               /* alto-falante */
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 16px;
    height: 3px;
    border-radius: 3px;
    background: #1b2430;
    transform: translateX(-50%);
}
.login-totp-wait__screen {
    position: absolute;
    inset: 14px 6px 12px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 6px;
    border-radius: 6px;
    background: linear-gradient(180deg, #eef4ff, #dfe9ff);
    overflow: hidden;
}
.login-totp-wait__brand { width: 14px; height: 14px; color: #0056fe; }
.login-totp-wait__dots { display: grid; grid-template-columns: repeat(3, 6px); gap: 4px 4px; }
.login-totp-wait__dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b9cdf6;
    animation: login-totp-dot 1.8s ease-in-out infinite;
}
.login-totp-wait__dots i:nth-child(2) { animation-delay: .15s; }
.login-totp-wait__dots i:nth-child(3) { animation-delay: .3s; }
.login-totp-wait__dots i:nth-child(4) { animation-delay: .45s; }
.login-totp-wait__dots i:nth-child(5) { animation-delay: .6s; }
.login-totp-wait__dots i:nth-child(6) { animation-delay: .75s; }
.login-totp-wait__dots i.is-on { background: #0056fe; animation: none; transform: scale(1.1); }
@keyframes login-totp-dot {
    0%, 70%, 100% { background: #b9cdf6; transform: scale(1); }
    30% { background: #0056fe; transform: scale(1.25); }
}
/* Seis dígitos ou conferindo: os pontos pulsam juntos */
.login-totp-wait.is-ready .login-totp-wait__dots i,
.login-totp-wait.is-checking .login-totp-wait__dots i { animation: login-totp-ready 1s ease-in-out infinite; background: #0056fe; }
@keyframes login-totp-ready { 50% { opacity: .45; transform: scale(.85); } }
.login-totp-wait__recovery { display: none; font-size: 6.5px; font-weight: 700; color: #0047d6; text-align: center; line-height: 1.25; letter-spacing: 0; }
.login-totp-wait.is-recovery .login-totp-wait__dots { display: none; }
.login-totp-wait.is-recovery .login-totp-wait__recovery { display: block; }

/* Ondas azuis fracas saindo do celular */
.login-totp-wait__waves { position: absolute; inset: 0; pointer-events: none; }
.login-totp-wait__waves i {
    position: absolute;
    inset: -2px;
    border: 1.5px solid rgba(0, 86, 254, .5);
    border-radius: 16px;
    opacity: 0;
    animation: login-totp-wave 2.4s ease-out infinite;
}
.login-totp-wait__waves i:nth-child(2) { animation-delay: .8s; }
.login-totp-wait__waves i:nth-child(3) { animation-delay: 1.6s; }
@keyframes login-totp-wave {
    0% { opacity: .55; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.55, 1.35); }
}
.login-totp-wait.is-checking .login-totp-wait__waves i { animation-duration: 1.2s; }

/* Anel de 30 s do código atual */
.login-totp-wait__timer { display: grid; justify-items: center; gap: 4px; min-width: 64px; }
.login-totp-wait__ring { position: relative; width: 44px; height: 44px; }
.login-totp-wait__ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.login-totp-wait__ring circle { fill: none; stroke-width: 4; }
.login-totp-wait__ring .is-track { stroke: #e6ecf5; }
.login-totp-wait__ring .is-arc { stroke: #0056fe; stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset .9s linear, stroke .3s; }
.login-totp-wait__secs { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #1b2430; font-variant-numeric: tabular-nums; }
.login-totp-wait__label { font-size: 11px; font-weight: 600; color: var(--text-muted, #8a93a0); white-space: nowrap; }
.login-totp-wait.is-ending .login-totp-wait__ring .is-arc { stroke: #e08a00; }
.login-totp-wait.is-ending .login-totp-wait__secs { color: #995400; }

@media (prefers-reduced-motion: reduce) {
    .login-totp-wait__dots i, .login-totp-wait__waves i,
    .login-totp-wait.is-ready .login-totp-wait__dots i,
    .login-totp-wait.is-checking .login-totp-wait__dots i { animation: none; }
    .login-totp-wait__ring .is-arc { transition: none; }
}
