<?php
    $lotteryContent = getContent('lottery.content', true);
    $phases = \App\Models\Phase::available()
        ->latest('draw_date')
        ->limit(10)
        ->with('lottery')
        ->get();
        
    $colors = [
        "#FF339A",
        "#6600CC",
        "#00CC99",
        "#D6293A",
        "#1083e5",
        "#fd7f10",
        "#9D4FC6",
    ];
    
    $banners = \App\Models\Banner::latest()->get();
?>

<style>
    .lottery_section h3 {
        text-align: center;
        font-size: 26px;
        color: #1e1B49;
        text-transform: uppercase;
        font-family: MohrRounded-SemiBold;
    }
    
    .card {
        overflow: hidden;
        border-radius: 10px;
    }
    
    .lottery_section .inner {
        background-color: #FF339A;
        color: #fff;
        height: 100%;
        border-radius: 10px;
        overflow: hidden;
        border: none;
    }
    
    .lottery_section .inner .card-title {
        color: #fff;
        text-align: center;
        font-weight: bold;
        font-size: 28px;
        font-family: MohrRounded-Bold;
        text-transform: capitalize;
    }
    
    .lottery_section .inner .card-header {
        border-bottom: 1px solid #ffeb79 !important;
        padding: .7rem 1rem;
        background-color: #ffeb79;
    }
    
    .lottery_section .inner .prize {
        display: block;
        text-align: center;
        font-size: 14px;
        font-weight: 500;
        line-height: 0;
        font-family: MohrRounded-SemiBold;
    }
    
    .lottery_section .inner .price {
        text-align: center;
        margin-top: 4px;
        margin-bottom: 30px;
    }
    
    .lottery_section .inner .price span {
        font-size: 14px;
        font-weight: 500;
        padding: 0 4px;
        font-family: MohrRounded-SemiBold;
    }
    
    .lottery_section .inner .price strong {
        font-weight: bolder;
        font-size: 28px;
        text-shadow: 2px 2px 0 #000;
        font-family: MohrRounded-SemiBold;
    }
    
    .lottery_section .inner p {
        text-align: center;
        font-family: MohrRounded-SemiBold;
        font-size: 22px;
        line-height: 1.3;
        color: #fff;
        text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, 1px 1px #000, -1px 1px #000;
        margin-bottom: 35px;
    }
    
    .lottery_section .inner .button {
        height: 54px;
        border-radius: 27px;
        padding: 0 32px;
        min-width: 160px;
        background-color: #fff;
        margin: 0 auto 14px auto;
        line-height: 1;
        display: block;
        text-transform: uppercase;
    }
    
    .lottery_section .inner .button a {
        color: #1e1B49;
        font-size: 20px;
        font-family: MohrRounded-SemiBold;
    }
    
    .cta-price {
        display: flex;
        align-items: center;
        height: 20px;
        border-radius: 10px;
        justify-content: center;
        text-align: center;
        padding: 0 20px;
        border-style: solid;
        border-width: 1px;
        border-color: #fff;
        width: fit-content;
        margin: 0 auto;
    }
    
    .cta-price span {
        font-family: MohrRounded-SemiBold;
        font-size: 12px;
        color: #fff;
        line-height: 1;
    }
    
    @media (max-width: 768px) {
        .lottery_section {
            padding-top: 10px !important;
        }
        
        .lottery_section h3 {
            font-size: 20px;
        }
    }
</style>

<?php
    $i = 0;
?>

<section class="pt-50 pb-50 lottery_section">
    <div class="container">
        <div class="row justify-content-center g-3">
            <div class="col-lg-8 order-md-1 order-2">
                <div class="bg-white p-3 rounded">
                    <h3>
                        <?php echo e(__(@$lotteryContent->data_values->heading)); ?>

                    </h3>
                    <div class="mt-4 lottery_slider_1">
                        <?php $__currentLoopData = $phases->skip(0)->take(3); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $phase): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="p-2">
                                <div class="inner card" style="background-color: <?php echo e($colors[$i]); ?>;">
                                    <div class="card-header">
                                        <h4 class="card-title mb-0" style="color: <?php echo e($colors[$i]); ?>;"><?php echo e(__($phase->lottery->name)); ?></h4>
                                    </div>
                                    <div class="card-body">
                                        <span class="prize">PRIZE</span>
                                        
                                        <div class="price">
                                            <span ><?php echo e($general->cur_text); ?></span>
                                            <strong><?php echo e(showAmount($phase->lottery->price)); ?></strong>
                                        </div>
                                        
                                        <p><?php echo e($phase->sold); ?> of <?php echo e($phase->quantity); ?><br>TICKETS LEFT</p>
                                        
                                        <?php if(auth()->guard('web')->check()): ?>
                                            <button type="button" class="button"><a href="/user/dashboard">Play Now</a></button>
                                        <?php else: ?>
                                            <button type="button" class="button"><a href="/user/login">Buy Ticket</a></button>
                                        <?php endif; ?>
                                        
                                        <div class="cta-price"><span><?php echo e($general->cur_text); ?> <?php echo e(showAmount($phase->lottery->price)); ?></span></div>
                                    </div>
                                </div>
                            </div>
                            <?php
                                $i = $i + 1;
                            ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 order-md-2 order-1">
                <div class="card p-0" style="background-color: transparent;">
                    <div class="banner_slider">
                        <?php $__currentLoopData = $banners; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $banner): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <img src="<?php echo e(asset(getFilePath('banner') . '/' . $banner->file)); ?>" loading="lazy" width="100%" height="100%" />
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
            </div>
        </div>
        <div class="lottery_slider_2 mt-4">
            <?php $__currentLoopData = $phases->skip(2)->take(4); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $phase): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="p-2">
                    <div class="inner card" style="background-color: <?php echo e($colors[$i]); ?>;">
                        <div class="card-header">
                            <h4 class="card-title mb-0" style="color: <?php echo e($colors[$i]); ?>;"><?php echo e(__($phase->lottery->name)); ?></h4>
                        </div>
                        <div class="card-body">
                            <span class="prize">PRIZE</span>
                            
                            <div class="price">
                                <span ><?php echo e($general->cur_text); ?></span>
                                <strong><?php echo e(showAmount($phase->lottery->price)); ?></strong>
                            </div>
                            
                            <p><?php echo e($phase->sold); ?> of <?php echo e($phase->quantity); ?><br>TICKETS LEFT</p>
                            
                            <?php if(auth()->guard('web')->check()): ?>
                                <button type="button" class="button"><a href="/user/dashboard">Play Now</a></button>
                            <?php else: ?>
                                <button type="button" class="button"><a href="/user/login">Buy Ticket</a></button>
                            <?php endif; ?>
                            
                            <div class="cta-price"><span><?php echo e($general->cur_text); ?> <?php echo e(showAmount($phase->lottery->price)); ?></span></div>
                        </div>
                    </div>
                </div>
                <?php
                    $i = $i + 1;
                ?>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    </div>
</section>





<?php $__env->startPush('script'); ?>
    <script>
        $(document).ready(function(){
            $('.banner_slider').slick({
                dots: false,
                arrows: false,
                infinite: true,
                autoplay: true,
                speed: 300,
                slidesToShow: 1,
                slidesToScroll: 1,
            })
                
            $('.lottery_slider_1').slick({
              dots: false,
              arrows: false,
              infinite: false,
              centerMode: false,
              variableWidth: false,
              autoplay: true,
              speed: 300,
              slidesToShow: 3,
              slidesToScroll: 1,
              responsive: [
                {
                  breakpoint: 1024,
                  settings: {
                    slidesToShow: 2,
                    slidesToScroll: 1,
                  }
                },
                {
                  breakpoint: 600,
                  settings: {
                    slidesToShow: 1,
                    slidesToScroll: 1
                  }
                },
                {
                  breakpoint: 480,
                  settings: {
                    slidesToShow: 1,
                    slidesToScroll: 1
                  }
                }
              ]
            });
            
            $('.lottery_slider_2').slick({
              dots: false,
              arrows: false,
              infinite: false,
              centerMode: false,
              variableWidth: false,
              autoplay: true,
              speed: 300,
              slidesToShow: 4,
              slidesToScroll: 1,
              responsive: [
                {
                  breakpoint: 1024,
                  settings: {
                    slidesToShow: 3,
                    slidesToScroll: 1,
                  }
                },
                {
                  breakpoint: 600,
                  settings: {
                    slidesToShow: 1,
                    slidesToScroll: 1
                  }
                },
                {
                  breakpoint: 480,
                  settings: {
                    slidesToShow: 1,
                    slidesToScroll: 1
                  }
                }
              ]
            });
        })
    </script>
<?php $__env->stopPush(); ?>
<?php /**PATH /home/wwwwebsitedevelo/domains/websitedevelopment.com.pk/public_html/lotto-fiesta.websitedevelopment.com.pk/core/resources/views/templates/basic/sections/lottery.blade.php ENDPATH**/ ?>