@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Palanquin:wght@100;200;300;400;500;600;700&display=swap');

* {
    font-family: 'Rajdhani', 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
}

.container {
    box-sizing: border-box;
    padding: 0 15px;
    color: #021526;

    .header-container {
        padding: 20px 0 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        background-color: #FFF;
    }

    .header-title {
        margin: 10px auto 0;
        color: rgba(3, 52, 110, 0.7);;
        font-size: 48px;
        font-weight: 600;

        @media (max-width: 425px) {
            font-size: 34px;
            text-align: left;
        }
    }


    .header-subtitle {
        margin: 10px auto;
        font-size: 32px;
        font-weight: 400;

        @media (max-width: 425px) {
            font-size: 24px;
            text-align: left;
        }
    }

    .extra-info-title {
        margin: 10px 0;
        font-size: 28px;
        font-weight: 500;
        text-align: center;

        @media (max-width: 425px) {
            font-size: 20px;
        }
    }

    .header-extra-info {
        margin: 0 auto 20px;
        
        @media (max-width: 425px) {
            text-align: left;
        }

        a {
            color: #021526;
            text-decoration: none;
            cursor: pointer;
        }
    }

    #allowAccess {
        padding: 10px 20px;
        width: 100%;
        max-width: 350px;
        max-height: 50px;
        color: #FFF;
        opacity: .2;
        background-color: rgba(3, 52, 110, 0.7);
        font-size: 24px;
        border: none;
        transition: background-color .5s ease, opacity .3s ease-in-out;

        @media (max-width: 425px) {
            max-height: fit-content;
        }

        &:hover {
            background-color: #6EACDA;
        }

        &.visible {
            opacity: 1;
        }

        &.disabled {
            opacity: 0;
        }
    }

    video,
    canvas {
        margin: 0 auto;
        border: 2px solid #6EACDA;
        background-color: #021526;
        object-fit: cover;

        @media (max-width: 425px) {
            width: 345px;
            height: 345px;
        }
    }

    .img-container {
        margin: 0 -15px;
        padding: 50px 0;
        width: calc(100% + 30px);
        display: flex;
        flex-direction: column;
        align-items: center;
        background: rgba(3, 52, 110, 0.1);
    }

    .video-container {
        position: relative;

        video {
            width: 680px;
            height: 480px;
            max-width: 100%;
            border: 2px solid #03346E;
        }
    }

    #label-container {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 130px;
        height: fit-content;
        color: #FFF;
        font-size: 14px;
        background-color: rgba(3, 52, 110, 0.3);

        @media (max-width: 425px) {
            font-size: 10px;
        }
    }

    #videoOverlay {
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 41%;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: inherit;
        max-width: 680px;
        max-height: 70px;
        opacity: 0;
        color: white;
        background-color: rgba(110, 172, 218, 0.6);
        transition: opacity .2s ease-in-out;
        text-align: center;
        align-items: center;
        justify-content: space-evenly;

        &.takePhoto {
            opacity: 1;
        }

        svg {
            animation: loading 5s infinite;
        }
    }

    .position-marker {
        position: absolute;
        top: 75px;
        left: 178px;
        z-index: 2;
        width: 330px;
        height: 330px;
        opacity: 0;
        transition: opacity .3s ease-in-out;

        @media (max-width: 425px) {
            top: 80px;
            left: 45px;
        }

        &.visible {
            opacity: 1;
        }
    }

    h3 {
        color: rgba(3, 52, 110, 0.7);;
        font-size: 32px;
        font-weight: 500;
    }

    .canvas-container {
        display: flex;
        flex-direction: row-reverse;
        gap: 40px;

        @media (max-width: 425px) {
            flex-direction: column;
        }

        #canvasPicture {
            width: 100%;
            height: 240px;
            max-width: 320px;
            max-height: 240px;
        }

        #croppedCanvas {
            width: 345px;
            height: 345px;
            max-width: 100%;
            max-height: 345px;
        }
    }
}

@keyframes loading {
    0% {
        transform: rotateZ(0deg);
    }

    25% {
        transform: rotateZ(45deg);
    }

    50% {
        transform: rotateZ(90deg);
    }

    75% {
        transform: rotateZ(180deg);
    }

    100% {
        transform: rotateZ(270deg);
    }
}