html {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    color: #505050;
    background-color: rgb(242, 242, 242);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16pt;
    overflow: hidden;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 10%;

    h1 {
        font-size: 4rem;
        font-weight: bold;
    }
}

.page {
    flex:1;
    width: 100%;
    box-sizing: border-box;
    display: none; /* Hide all pages by default */
}

.page.active {
    display: block; /* Show only active pages */
}

.page:not(.active) {
    display: none;
}

footer {
    box-sizing: border-box;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 10%;
    padding-left: 5px;
    background-color: #505050;

    .brand {
        box-sizing: border-box;
        height: 100%;
        padding: 10px;
    }

    .brand.pctech {
        height: 60%;
    }
}

.doc-info .bold {
    font-weight: bold;
}

#submit img {
    height: 80%;
    width: 80%;
    font-weight: bold;
}

/* Fixed size for submit button to prevent resizing when showing spinner */
#submit {
    min-width: 320px;
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#landing-page {
    .content {
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 2rem;
        
        h2 {
            font-size: 2.5rem;
            margin-bottom: 1rem;
        }
        
        p {
            font-size: 1.5rem;
            margin-bottom: 2rem;
        }
        
        #qr-scanner-container {
            width: 100%;
            max-width: 500px;
            height: 300px;
            margin: 0 auto 2rem;
            border: 2px solid #ccc;
            border-radius: 8px;
            overflow: hidden;
        }
    }
}

.success-message {
    color: #28a745;
    font-size: 1.5rem;
    text-align: center;
    margin: 1rem 0;
}

#signature-page {
    .content {
        height: 90%;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;

        .doc-info {
            display: flex;
            justify-content: space-between;
            align-items: stretch;
            height: 10%;
        }
    }
}

#signature {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1rem;
    position: relative;
    aspect-ratio: 3/1;
}

#signame {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    margin: 0;
    color: black;
}

#signature canvas {
    border: 3px solid #505050;
    background-color: #fff;
    box-sizing: border-box;
    aspect-ratio: 3/1;
}

.document {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    .display {
        box-sizing: border-box;
        height: 85%;
        width: 70%;
        border: 3px solid #505050;
    }

    .controls {
        box-sizing: border-box;
        height: 7%;
        width: 70%;
        padding-top: 1rem;

        .pdf-pages {
            display: flex;
            justify-content: space-between;
        }
    }

    .form-pages {
        box-sizing: border-box;
        width: 100%;
        padding-top: 1rem;
        height: 8%;
        display: flex;
        justify-content: flex-end;
    }
}

.document .display canvas {
    width: 100%;
    height: 100%;
}

#reset {
    position: absolute;
    top: 0px;
    left: 0px;
    background-color: rgba(0, 0, 0, 0.2);
    border: none;
}

#reset:active {
    background-color: rgba(0, 0, 0, 0.4);
}

/* components */
.button {
    border: none;
    background-color: rgb(80, 80, 80);
    color: white;

    padding: 10px 20px;
}

button:disabled {
    opacity: 0.5;
}

.big-button {
    font-size: 24pt;
    font-weight: bold;
}

.small-button {
    font-size: 16pt;
}

.spacer {
    flex: 1;
}

/* PDF container and canvas styles */
