<!-- OTP Verification Choice Modal -->
<div id="otpChoiceModal" class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50 hidden">
    <div class="relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white">
        <!-- Modal Header -->
        <div class="flex justify-between items-center pb-3">
            <h3 class="text-lg font-semibold text-gray-900">OTP যাচাইকরণের বিকল্প</h3>
            <button type="button" class="text-gray-400 hover:text-gray-600" onclick="closeOtpChoiceModal()">
                <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
                </svg>
            </button>
        </div>

        <!-- Modal Content -->
        <div class="mt-3">
            <input type="hidden" id="otpChoiceOtpPhone" value="">
            <input type="hidden" id="otpChoiceOtpType" value="auth_verification">

            <!-- Instructional Message -->
            <div class="mb-4 p-4 bg-blue-50 border border-blue-200 rounded-lg">
                <p class="text-sm text-blue-800 leading-relaxed">
                    আপনার সর্বশেষ যাচাইকৃত <strong>OTP</strong> এখন আপনার বর্তমান পাসওয়ার্ড হিসেবে কাজ করবে। 
                    লগইন বা অর্ডার নিশ্চিতকরণের জন্য নতুন কোড অনুরোধ না করে সেটি ব্যবহার করতে পারেন।
                </p>
            </div>

            <p class="text-sm text-gray-600 mb-4">
                আপনি নিচের যেকোনো একটি বিকল্প বেছে নিতে পারেন:
            </p>

            <!-- Error Messages -->
            <div id="otpChoiceErrors" class="mb-4 p-3 bg-red-100 border border-red-400 text-red-700 rounded-lg hidden">
                <ul id="otpChoiceErrorsList" class="list-disc list-inside text-sm"></ul>
            </div>

            <!-- Options -->
            <div class="space-y-3">
                <!-- Option 1: Verify by Last OTP -->
                <button type="button" id="verifyLastOtpBtn" onclick="useLastOtp()"
                        class="w-full flex items-center p-4 border-2 border-blue-200 rounded-lg hover:bg-blue-50 hover:border-blue-400 transition-colors text-left">
                    <div class="flex-shrink-0 mr-4">
                        <div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center">
                            <svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path>
                            </svg>
                        </div>
                    </div>
                    <div>
                        <div class="font-medium text-gray-900">শেষ OTP দিয়ে যাচাই করুন</div>
                        <div class="text-xs text-gray-500 mt-0.5">আপনার আগের যাচাইকৃত কোড ব্যবহার করুন</div>
                    </div>
                </button>

                <!-- Option 2: Send new OTP -->
                <button type="button" id="sendNewOtpBtn" onclick="sendNewOtp()"
                        class="w-full flex items-center p-4 border-2 border-green-200 rounded-lg hover:bg-green-50 hover:border-green-400 transition-colors text-left">
                    <div class="flex-shrink-0 mr-4">
                        <div class="w-10 h-10 bg-green-100 rounded-full flex items-center justify-center">
                            <svg class="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"></path>
                            </svg>
                        </div>
                    </div>
                    <div>
                        <div class="font-medium text-gray-900">নতুন OTP পাঠান</div>
                        <div class="text-xs text-gray-500 mt-0.5">মোবাইলে নতুন কোড পাঠান</div>
                    </div>
                    <span id="sendNewOtpLoading" class="hidden ml-auto">
                        <svg class="animate-spin -ml-1 mr-3 h-5 w-5 text-green-600 inline" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
                            <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
                            <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
                        </svg>
                    </span>
                </button>
            </div>
        </div>
    </div>
</div>
<?php /**PATH E:\freshprotidin\ecommerce\resources\views/components/auth/otp-choice-modal.blade.php ENDPATH**/ ?>