/* =====================================================
   ROYAL KEYS - OTP VERIFICATION POPUP
   ===================================================== */
.rk-otp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100050;
    background: rgba(20, 2, 19, 0.72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}
.rk-otp-overlay.active { display: flex; }

.rk-otp-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    padding: 30px 24px 24px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    animation: rkOtpIn 0.25s ease-out;
}
@keyframes rkOtpIn {
    from { transform: translateY(14px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.rk-otp-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px;
}
.rk-otp-close:hover { color: #111; }

.rk-otp-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #d4af37;
    background: #240122;
}

.rk-otp-card h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #111;
}
.rk-otp-sub {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}
.rk-otp-sub strong { color: #111; white-space: nowrap; }
.rk-otp-change {
    background: none;
    border: none;
    padding: 0;
    margin-left: 4px;
    color: #b8901f;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
}

.rk-otp-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 56px;
    border: 2px solid #e2e2e2;
    border-radius: 10px;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 12px;
    padding-left: 12px; /* letter-spacing balance */
    color: #111;
    background: #fafafa;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}
.rk-otp-input:focus { border-color: #d4af37; background: #fff; }
.rk-otp-input.rk-shake { animation: rkShake 0.35s; border-color: #ef4444; }
@keyframes rkShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.rk-otp-msg {
    min-height: 20px;
    margin: 10px 0 4px;
    font-size: 13px;
    line-height: 1.4;
}
.rk-otp-msg.error { color: #dc2626; }
.rk-otp-msg.ok    { color: #15803d; }
.rk-otp-msg.info  { color: #555; }

.rk-otp-verify-btn {
    width: 100%;
    height: 48px;
    margin-top: 6px;
    border: none;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}
.rk-otp-verify-btn:hover { background: #333; }
.rk-otp-verify-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.rk-otp-sub strong { word-break: break-all; white-space: normal; }

.rk-otp-hint {
    margin: 14px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f7f4ec;
    font-size: 12px;
    line-height: 1.45;
    color: #6b5b2e;
}
.rk-otp-hint i { color: #d4af37; margin-right: 4px; }

.rk-otp-resend-row {
    margin-top: 14px;
    font-size: 13px;
    color: #666;
}
.rk-otp-resend {
    background: none;
    border: none;
    padding: 0;
    color: #b8901f;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}
.rk-otp-resend:disabled { color: #999; cursor: default; font-weight: 500; }

.rk-otp-test {
    margin-top: 14px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff7e0;
    border: 1px dashed #d4af37;
    color: #7a5d00;
    font-size: 12px;
}

.rk-otp-secure {
    margin-top: 16px;
    font-size: 11px;
    color: #999;
}
.rk-otp-secure i { color: #22c55e; margin-right: 4px; }

/* small loader */
.rk-spin {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rkSpin 0.7s linear infinite;
    display: inline-block;
}
@keyframes rkSpin { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
    .rk-otp-card { padding: 26px 18px 20px; }
    .rk-otp-input { font-size: 22px; letter-spacing: 9px; padding-left: 9px; }
}
