/* ─── OTP Modal Overlay ─── */
#ff-otp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

/* ─── Modal ─── */
#ff-otp-modal {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
    animation: ffOtpFadeIn 0.25s ease;
}

@keyframes ffOtpFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── Close Button ─── */
#ff-otp-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

#ff-otp-close:hover {
    color: #333;
}

/* ─── Icon ─── */
#ff-otp-icon {
    margin-bottom: 10px;
}

/* ─── Title ─── */
#ff-otp-modal h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

/* ─── Description ─── */
#ff-otp-desc {
    font-size: 14px;
    color: #666;
    margin: 0 0 22px;
}

/* ─── OTP Digit Inputs ─── */
#ff-otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 6px;
}

.ff-otp-digit {
    width: 46px;
    height: 54px;
    border: 2px solid #ddd;
    border-radius: 10px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    caret-color: #1a7efb;
}

.ff-otp-digit:focus {
    border-color: #1a7efb;
    box-shadow: 0 0 0 3px rgba(26, 126, 251, 0.15);
}

.ff-otp-digit.ff-otp-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* ─── Shake Animation ─── */
.ff-otp-shake {
    animation: ffShake 0.5s ease;
}

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

/* ─── Verify Button ─── */
#ff-otp-submit {
    display: block;
    width: 100%;
    padding: 13px;
    margin-top: 18px;
    background: #1a7efb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

#ff-otp-submit:hover:not(:disabled) {
    background: #1565d8;
}

#ff-otp-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Timer / Resend ─── */
#ff-otp-timer-wrap {
    margin-top: 16px;
    font-size: 13px;
    color: #888;
}

#ff-otp-resend {
    background: none;
    border: none;
    color: #1a7efb;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 0;
    text-decoration: underline;
}

#ff-otp-resend:hover {
    color: #1565d8;
}

/* ─── Message Area ─── */
#ff-otp-message p {
    margin: 10px 0 0;
    font-size: 13px;
}

/* ─── Mobile Responsive ─── */
@media (max-width: 480px) {
    #ff-otp-modal {
        padding: 28px 20px 22px;
        border-radius: 14px;
    }

    .ff-otp-digit {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }

    #ff-otp-inputs {
        gap: 7px;
    }
}
/* ─── Inline Validation Errors (like Fluent Form) ─── */
.ff-otp-inline-error {
    color: #f56c6c !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    padding-top: 4px !important;
    display: block !important;
}

.ff-otp-field-error {
    border-color: #f56c6c !important;
    box-shadow: 0 0 0 1px #f56c6c !important;
}

.ff-otp-field-error:focus {
    border-color: #f56c6c !important;
    box-shadow: 0 0 0 2px rgba(245, 108, 108, 0.25) !important;
}