<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
          integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <style>
        html {
            font-size: 0.5rem;
        }

        @media (min-width: 576px) {
            html {
                font-size: 0.625rem;
            }
        }

        @media (min-width: 768px) {
            html {
                font-size: 0.75rem;
            }
        }

        @media (min-width: 992px) {
            html {
                font-size: 0.875rem;
            }
        }

        @media (min-width: 1200px) {
            html {
                font-size: 1rem;
            }
        }
        .modal, .modal-backdrop {
        display: block;
    }
    .modal-backdrop.show {
        opacity: 0.5; /* Adjust as needed */
    }
    </style>
    <title>RADIFOX QA - Login</title>
</head>
<body>
    <nav class="navbar sticky-top navbar-dark bg-dark">
        <a class="navbar-brand" href="#">RADIFOX QA</a>
    </nav>
    <div class="modal" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginModalLabel" aria-hidden="true" style="display: block;">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="loginModalLabel">Login Required</h5>
            </div>
            <div class="modal-body">
                {% if error %}
                    <div class="alert alert-warning" role="alert">
                        {{ error }}
                    </div>
                {% endif %}
                <form method="POST" action="{{ url_for('login') }}">
                    Key: <input type="password" name="key" class="form-control">
                    <br>
                    <input type="submit" value="Login" class="btn btn-primary">
                </form>
            </div>
        </div>
    </div>
</div>

<!-- Optional: Adding a backdrop manually -->
<div class="modal-backdrop show"></div>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"
        integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT"
        crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
        integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
        crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
        integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
        crossorigin="anonymous"></script>
<script>
    $(document).ready(function(){
        $('#loginModal').modal({
            backdrop: 'static',
            keyboard: false,
            show: true
        });
    });
</script>
</body>
</html>
