/* =====================================================================
   LivAsta Auth — OTP / verify screen (LIGHT theme)
   ===================================================================== */

.otp-target-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin-top: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(0, 168, 132, 0.10);
    border: 1px solid rgba(0, 168, 132, 0.28);
    color: var(--login-primary-dark);
    font-weight: 700;
    font-size: 0.85rem;
    word-break: break-all;
}

.otp-target-chip i { color: var(--login-accent); font-size: 0.8rem; }

.otp-container {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: clamp(6px, 2.4vw, 12px);
    margin: clamp(22px, 5vw, 30px) 0 8px;
}

.otp-input {
    width: clamp(38px, 13vw, 52px);
    height: clamp(50px, 16vw, 62px);
    padding: 0;
    text-align: center;
    font-size: clamp(1.3rem, 5vw, 1.7rem);
    font-weight: 800;
    color: var(--login-ink);
    background: var(--login-field);
    border: 1.5px solid var(--login-border);
    border-radius: 14px;
    outline: none;
    caret-color: var(--login-primary);
    transition: all 0.2s var(--login-ease);
}

/* filled digit gets a brand tint (relies on placeholder=" ") */
.otp-input:not(:placeholder-shown) {
    border-color: var(--login-primary);
    background: rgba(0, 168, 132, 0.07);
    color: var(--login-primary-dark);
}

.otp-input:focus {
    border-color: var(--login-primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--login-ring);
    transform: translateY(-1px);
}

/* Inline error shown directly below the OTP boxes */
.otp-error {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 0;
    color: #dc2626;
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
}

.otp-error.show { display: flex; animation: otp-error-in 0.25s ease; }
.otp-error i { font-size: 0.9rem; }

@keyframes otp-error-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Error state on the digit boxes + shake on the row */
.otp-input.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
}

.otp-container.shake { animation: otp-shake 0.4s ease; }

@keyframes otp-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

@media (prefers-reduced-motion: reduce) {
    .otp-container.shake { animation: none; }
    .otp-error.show { animation: none; }
}

.resend-otp {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--login-muted);
}

.resend-otp span {
    color: var(--login-primary);
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease;
}

.resend-otp span:hover { color: var(--login-primary-dark); text-decoration: underline; }

@media (max-height: 680px) {
    .otp-container { margin: 16px 0 6px; }
}
