

<style>
.appBottomMenu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #FFC300 !important;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 3px 0;
    min-height: 35px;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    padding-bottom: calc(env(safe-area-inset-bottom) + 5px);
}

.appBottomMenu a {
    text-align: center;
    color: white;
    flex: 1;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.appBottomMenu .col {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    gap: 2px;
}

.appBottomMenu i {
    font-size: 24px;
    transition: transform 0.2s;
}

.appBottomMenu a:hover i {
    transform: scale(1.15);
}

/* Tombol Tengah (Kasir) */
.appBottomMenu .center-button {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3px;
}

.appBottomMenu .center-button .circle {
    width: 55px;
    height: 55px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(-25px);
    border: 3px solid #FEB200;
    transition: all 0.2s ease-in-out;
}

.appBottomMenu .center-button .circle:hover {
    transform: translateY(-26px) scale(1.05);
}

.appBottomMenu .center-button i {
    font-size: 28px;
    color: #FEB200;
}

.appBottomMenu a {
    color: white !important;
}

.appBottomMenu a strong {
    color: white !important;
}

.appBottomMenu i {
    color: white !important;
}

.appBottomMenu .center-button i {
    color: #FEB200 !important;
}


/* Responsif */
@media (max-width: 768px) {
    .appBottomMenu {
        min-height: 40px;
    }
    .appBottomMenu i {
        font-size: 22px;
    }
    .appBottomMenu .col {
        font-size: 9px;
    }
    .appBottomMenu .center-button .circle {
        width: 50px;
        height: 50px;
        transform: translateY(-22px);
    }
    .appBottomMenu .center-button i {
        font-size: 26px;
    }
}
@media (max-width: 400px) {
    .appBottomMenu {
        min-height: 38px;
    }
    .appBottomMenu i {
        font-size: 20px;
    }
    .appBottomMenu .col {
        font-size: 8px;
    }
    .appBottomMenu .center-button .circle {
        width: 48px;
        height: 48px;
        transform: translateY(-20px);
    }
    .appBottomMenu .center-button i {
        font-size: 24px;
    }
}
/* Sembunyikan di layar besar */
@media (min-width: 769px) {
    .appBottomMenu {
        display: none !important;
    }
}
.appBottomMenu a:hover i,
.appBottomMenu a:hover strong,
.appBottomMenu a.active i,
.appBottomMenu a.active strong {
    color: #8e4a00;
}

body {
    background-color: transparent;
}

</style>
<?php if(in_array($page, ['Dashboard', 'Akun Saya'])): ?>
    <!-- App Bottom Menu -->
    <div class="appBottomMenu">
        <a href="<?= base_url() ?>" class="item<?= $page === 'Dashboard' ? ' active' : '' ?>">
            <div class="col">
                <i class="bi bi-grid"></i>
                <strong>Beranda</strong>
            </div>
        </a>

        <a href="<?= base_url('page/riwayat'); ?>" class="item<?= $page === 'Transaksi' ? ' active' : '' ?>" style="border-top-right-radius: 30px">
            <div class="col">
                <i class="bi bi-receipt"></i>
                <strong>Transaksi</strong>
            </div>
        </a>

        <a href="<?= base_url('/shop'); ?>" class="item" style="opacity: 1; border-top: 0">
            <div class="center-button">
                <div class="circle">
                    <i class="bi bi-bag"></i>
                </div>
            </div>
        </a>

        <a href="<?= base_url('page/event.php'); ?>" class="item<?= $page === 'Daftar Harga' ? ' active' : '' ?>" style="border-top-left-radius: 30px">
            <div class="col">
                <i class="bi bi-calendar-event"></i>
                <strong>Event</strong>
            </div>
        </a>

        <a href="<?= base_url('account/profile') ?>" class="item<?= $page === 'Akun Saya' ? ' active' : '' ?>">
            <div class="col">
                <i class="bi bi-person"></i>
                <strong>Saya</strong>
            </div>
        </a>
    </div>
    <!-- * App Bottom Menu -->
<?php endif ?>

<? require _DIR_('library/modal') ?>
    <!-- ///////////// Js Files ////////////////////  -->
    <script type="module" src="https://unpkg.com/ionicons@5.4.0/dist/ionicons/ionicons.js"></script>
    <!-- Owl Carousel -->
    <script src="<?= assets('mobile/') ?>js/plugins/jquery-marquee/jquery.marquee.min.js"></script>
    <script src="<?= assets('mobile/') ?>js/plugins/owl-carousel/owl.carousel.min.js"></script>
    <!-- jQuery Circle Progress -->
    <script src="<?= assets('mobile/') ?>js/plugins/jquery-circle-progress/circle-progress.min.js"></script>
    <!-- Base Js File -->
        <script src="<?= assets('mobile/') ?>js/plugins/jquery-inputmask/inputmask.min.js"></script>
    <script src="<?= assets('mobile/') ?>js/plugins/jquery-inputmask/bindings/inputmask.binding.js"></script>

    <script src="<?= assets('mobile/') ?>js/base.js?=<?= time() ?>"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.13.0/dist/sweetalert2.all.min.js"></script>
    <script>
        $(document).ready(function() {
            $('.marquee').marquee({
                duration: 4100,
                delayBeforeStart: 1500,
                direction: 'left',
            });

            if($('#successResult').length) {
                $('#successResult').modal('show');
            } else if($('#errorResult').length) {
                $('#errorResult').modal('show');
            }
        });
    </script>
    <script>
        $('#name, #nohp').keyup(function() {
            var name = $('#name').val().length;
            var nohp = $('#nohp').val().length;
            if(name > 4 && nohp > 10) {
                $('#next-step').attr('disabled', false);
            } else {
                $('#next-step').attr('disabled', true);
            }
        });
    </script>
<?php if($page === 'Coming Soon'): ?>
    <!-- jQuery Countdown -->
    <script src="<?= assets('mobile/') ?>js/plugins/jquery-countdown/jquery.countdown.min.js"></script>
    <!-- jQuery Countdown Settings -->
    <script>
        var date = "2021/12/20"; 
        $('#countDown').countdown(date, function (event) {
            $(this).html(event.strftime(
                '<div>%D<span>Days</span></div>'
                +
                '<div>%H<span>Hours</span></div>'
                +
                '<div>%M<span>Minutes</span></div>'
                +
                '<div>%S<span>Seconds</span></div>'
            ));
        });
    </script>
    
<?php endif; ?>
    <script type="text/javascript">
        function depositNominal(value) {
            $('input[name="nominal"]').val(value);
        }
        function copyToClipboard(value) {
            var tempInput = document.createElement('input');
            tempInput.value = value;
            document.body.appendChild(tempInput);
            tempInput.select();
            document.execCommand('copy');
            document.body.removeChild(tempInput);
            toastbox('toastCopy', 1000).show();
        }
        function Loader() {
            $('body').html('<div id="loader"><div class="spinner-border text-primary" role="status"></div></div>');
        }
        function disabled() {
            var e = this;
            setTimeout(function(){
                e.disabled=true;
            }, 0);
            return true;
        }
    </script>
    <script>
    function goBack() {
        window.history.back();
    }
    </script>
    <script>
        const actualBtn = document.getElementById('actual-btn');
        const fileChosen = document.getElementById('file-chosen');
        actualBtn.addEventListener('change', function(){
          fileChosen.textContent = this.files[0].name
        })
    </script>
    
    <div id="toastCopy" class="toast-box toast-center bg-secondary">
        <div class="in">
            <div class="text">
                Berhasil Salin Ke Clipboard
            </div>
        </div>
    </div>
    
    <div id="toastComingSoon" class="toast-box toast-center bg-secondary">
        <div class="in">
            <div class="text">
                Sedang dalam pembaruhan....
            </div>
        </div>
    </div>
    
</body>

</html>