.ts-otp-modal{
    position:fixed;
    inset:0;
    z-index:999999;
    display:none;
}

.ts-otp-modal.show{
    display:block;
}

.ts-otp-overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.55);
}

.ts-otp-box{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width:520px;
    max-width:95%;
    background:#fff;
    border-radius:20px;
    padding:35px;
}

.ts-otp-close{
    position:absolute;
    top:15px;
    left:15px;
    border:none;
    background:none;
    font-size:30px;
    cursor:pointer;
    color:#dc2626;
    transition:color .2s ease;
}

.ts-otp-close:hover,
.ts-otp-close:focus-visible{
    color:#b91c1c;
}

.ts-otp-title{
    text-align:center;
    font-size:30px;
    font-weight:700;
    margin-bottom:15px;
}

.ts-otp-target{
    text-align:center;
    font-size:22px;
    line-height:1.8;
    margin-bottom:10px;
}

.ts-otp-method{
    text-align:center;
    color:#1fae4b;
    font-size:30px;
    font-weight:700;
    margin-bottom:25px;
}

.ts-otp-inputs{
    display:flex;
    justify-content:center;
    gap:12px;
    margin-bottom:35px;
}

.ts-otp-inputs input{
    width:60px;
    height:70px;
    text-align:center;
    font-size:28px;
    border:1px solid #d8d8d8;
    border-radius:12px;
}

.ts-otp-inputs input:focus{
    border-color:#2563eb;
    outline:none;
}

.ts-otp-resend{
    text-align:center;
    font-size:20px;
    margin-bottom:20px;
}

.ts-otp-actions{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-bottom:25px;
}

.ts-otp-channel{
    border:1px solid #ddd;
    background:#fff;
    border-radius:50px;
    padding:12px 30px;
    cursor:pointer;
}

.ts-otp-channel.active{
    color:#17a34a;
    border-color:#17a34a;
}

.ts-otp-submit{
    width:100%;
    height:60px;
    border:none;
    border-radius:14px;
    background:#e5e7eb;
    color:#666;
    font-size:24px;
    font-weight:700;
}

/* Responsive OTP entry */
.ts-otp-box{
    box-sizing:border-box;
    width:min(430px, calc(100vw - 24px));
    max-width:none;
    max-height:calc(100dvh - 24px);
    overflow-y:auto;
    padding:34px clamp(14px, 5vw, 28px) 24px;
    border-radius:16px;
}

.ts-otp-title{
    margin:0 0 12px;
    font-size:clamp(19px, 5vw, 25px);
    line-height:1.5;
}

.ts-otp-target{
    margin-bottom:14px;
    font-size:clamp(14px, 4vw, 17px);
    overflow-wrap:anywhere;
}

.ts-otp-inputs{
    direction:rtl;
    display:grid;
    grid-template-columns:repeat(6, minmax(0, 1fr));
    gap:clamp(4px, 1.8vw, 8px);
    width:min(100%, 350px);
    margin:0 auto 22px;
}

.ts-otp-inputs input{
    box-sizing:border-box;
    width:100%;
    min-width:0;
    height:clamp(46px, 14vw, 58px);
    padding:0;
    border-radius:9px;
    font-size:clamp(20px, 6vw, 25px);
    direction:ltr;
    text-align:center;
    appearance:none;
}

.ts-otp-inputs input:focus-visible{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37, 99, 235, .12);
}

.ts-otp-resend-container{
    margin:14px 0 !important;
    font-size:14px;
    text-align:center;
}

.ts-otp-resend-container p{
    margin:0 0 4px;
}

.ts-otp-resend-row{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}

#ts-otp-resend-btn{
    padding:4px 6px;
    border:0;
    border-radius:6px;
    background:transparent;
    color:#9ca3af;
    font:inherit;
    cursor:not-allowed;
    transition:color .2s ease, background-color .2s ease;
}

#ts-otp-resend-btn:disabled{
    color:#9ca3af;
    cursor:not-allowed;
}

#ts-otp-resend-btn.is-ready{
    color:#2155ff;
    cursor:pointer;
}

#ts-otp-resend-btn.is-ready:hover,
#ts-otp-resend-btn.is-ready:focus-visible{
    background:#eef2ff;
    color:#1744d2;
    text-decoration:underline;
}

.ts-otp-timer{
    color:#6b7280;
    direction:ltr;
    font-variant-numeric:tabular-nums;
}

.ts-otp-resend-status{
    display:block;
    min-height:1.4em;
    margin-top:2px;
    color:#6b7280;
    font-size:12px;
}

.ts-otp-submit{
    height:50px;
    border-radius:10px;
    font-size:17px;
}

.ts-otp-submit.is-ready{
    background:#93c5fd;
    color:#1e3a8a;
    cursor:pointer;
    transition:background-color .2s ease, color .2s ease;
}

.ts-otp-submit.is-ready:hover,
.ts-otp-submit.is-ready:focus-visible{
    background:#60a5fa;
    color:#172554;
}

@media(max-width:380px){
    .ts-otp-box{
        width:calc(100vw - 20px);
        padding:32px 12px 18px;
    }

    .ts-otp-inputs{
        gap:4px;
    }

    .ts-otp-inputs input{
        height:46px;
        border-radius:7px;
    }
}