<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Live Programs | Option</title>

    <link rel="apple-touch-icon" sizes="180x180" href="/fm/assets/img/favicon/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/fm/assets/img/favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/fm/assets/img/favicon/favicon-16x16.png">
    <link rel="manifest" href="/fm/assets/img/favicon/site.webmanifest">

    <style>
        @import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
        @import url('https://fonts.googleapis.com/css2?family=Andada+Pro:ital@1&display=swap');
        *{
            margin: 0;
            padding: 0;
            font-family: Poppins;
        }
        body{
            background-color: rgba(10, 19, 26, 0.99);
        }
        h1{
            text-align: center;
            padding: 2rem 2rem 0rem;
            font-size: 2.5em;
            color: #F7DE60;
            letter-spacing: 0.2rem;
        }
        div.programs-grid{
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr;
            gap: 2rem;
            margin: 3rem;
        }
        button{
            border: none;
            background: none;
            width: 100%;
            height: 100%;
        }
        button[disabled] p{
            color: rgb(4, 222, 0);
        }
        button[disabled] img{
            opacity: 0.5;
        }
        p{
            text-align: center;
            font-size: 2em;
            font-family: Poppins;
            color: white;
        }
        img{
            width: 100%;
            border-radius: 0.5rem;
        }
        button:hover{
            cursor: pointer;
        }
        button[disabled]{
            cursor: not-allowed;
        }
        @media (max-width: 1200px){
            div.programs-grid{
                grid-template-columns: repeat(3,1fr);
            }
        }
        @media (max-width: 892px){
            div.programs-grid{
                grid-template-columns: repeat(2,1fr);
            }
        }
        @media (max-width: 768px){
            h1{
                margin: 2rem 2.5rem 0rem;
            }
            div.programs-grid{
                grid-template-columns: repeat(1,1fr);
                margin: 3rem 15vw;
            }
        }
        @media (max-width: 576px){
            div.programs-grid{
                margin: 3rem 10vw;
            }
        }
        @media (max-width: 448px){
            h1{
                font-size: 2em;
            }
        }
    </style>
</head>
<body>
    <div>
        <h1>
            Choose program, you want to get LIVE for?
        </h1>
        <div class="programs-grid">

            <% ap.forEach(function(prg){ %>
                <div class="program">
                    <form action="/fm/go_live" method="post">
                        <% if (clp.includes(prg)){ %>
                            <button disabled>
                                <input type="hidden" name="eventName" value="<%= prg %>">
                                <img src="/fm/data/programPics/<%= prg %>.jpg" alt="">
                            <p><%= prg %> - LIVE</p>
                        </button>
                        <% } else{ %>
                            <button>
                                <input type="hidden" name="eventName" value="<%= prg %>">
                                <img src="/fm/data/programPics/<%= prg %>.jpg" alt="">
                                <p><%= prg %></p>
                            </button>
                        <% } %>
                    </form>
                </div>
            <% }) %>
        </div>
    </div>
</body>
</html>