﻿
.otp-digit {
    width: 55px;
    height: 55px;
    font-size: 1rem;
    text-align: center;
    line-height: 1.2;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-bottom: 3px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    caret-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 0.3rem;
    padding-top: 0.3rem;
}

.otp-digit:focus {
    outline: none;
    border-color: var(--border-color);
    border-bottom-color: var(--color-primary);
    border-bottom-width: 3px;
}

.otp-digit.filled {
    border-color: var(--border-color);
    border-bottom-color: var(--color-primary);
}

.otp-digit.error {
    border-bottom-color: var(--color-danger);
    animation: shake 0.4s ease;
}

.otp-digit.success {
    border-bottom-color: var(--color-success);
}

@keyframes shake {
    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-3px);
    }
}

.timer-ring {
    transition: stroke-dashoffset 1s linear;
}

