.opt-inputs{
    width: 100%;
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.opt-inputs--invalid{
    & .opt-digit{
        border-color: #C0392B !important;
        box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12) !important;
        animation: shake 0.4s ease both;
    }
}

.opt-inputs--valid{
    & .opt-digit{
        border-color: var(--green) !important;
    box-shadow: 0 0 0 3px rgba(58, 107, 53, 0.12) !important;
    background: rgba(58, 107, 53, 0.04)
    }
}

.opt-digit{
    width: 100%;
    max-width: 58px;
    aspect-ratio: 1/1;

    background: #fff;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text);
    text-align: center;
    outline: none;
    caret-color: var(--cherry);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
    caret-color: transparent;
    -moz-appearance: textfield;

    &:focus{
        border-color: var(--cherry);
        box-shadow: 0 0 0 3px rgba(139, 26, 43, 0.1);
    }

    &::-webkit-outer-spin-button,
    &::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
}

.opt-digit--filled{
    border-color: rgba(139, 26, 43, 0.35);
    background: rgba(139, 26, 43, 0.03);
}

.opt-not_received{
    text-align: center;
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 300;

    & a{
        text-decoration: underline;
        text-underline-offset: 2px;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }
    60% {
        transform: translateX(-4px);
    }
    80% {
        transform: translateX(4px);
    }
}

.ask-new-code{
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cherry);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s;

    & span{
        font-weight: 600;
        color: var(--cherry);
        font-size: 0.78rem;
    }

    &:disabled{
        color: var(--muted);
        text-decoration: none;
        cursor: default;
    }
}