﻿/* Overlay OTP */
.otp-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
}

    .otp-overlay.hidden {
        display: none !important;
    }

.otp-card {
    width: 380px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(56,189,248,.22);
    animation: popup .24s ease-out both;
}

@keyframes popup {
    from {
        opacity: 0;
        transform: scale(.96) translateY(6px)
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0)
    }
}

/* Các ô OTP */
.otp-input {
    width: 48px;
    height: 52px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    outline: none;
    transition: .2s;
}

    .otp-input:focus {
        border-color: #0ea5e9;
        box-shadow: 0 0 0 4px rgba(14,165,233,.25);
        background: #fff
    }

/* Inline error */
.field-error {
    margin-top: 6px;
    font-size: 14px;
    color: #ef4444
}

.has-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.15) !important
}

/* Khoá scroll khi mở modal */
body.modal-open {
    overflow: hidden
}

/* Spinner nho nhỏ cho nút */
.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}
