:root {
    --bg: #f3f3f3;
    --fg: #000000;
    --acc: #8f8f8f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg);
    color: var(--fg);
    font-family: 'Times New Roman';
    font-size: 1em;
}

main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
}

button {
    cursor: pointer;
}

#controls-window {
    margin: 1rem;
    width: 300;
    height: fit-content;
    flex-shrink: 0; /* Prevent the window from shrinking */
}

#controls-window .window-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#info-panel {
    padding: 0.5rem;
}

#preview {
    flex: 2;
    background-color: var(--acc);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    gap: 20px;
    padding: 20px;
    .page-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 45%;
        height: 90%;
    }
    #og-page, #rmx-page {
        font-family: 'Times New Roman';
        font-size: 1em;
        background: var(--bg);
        width: 100%;
        height: 100%;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
        position: relative; /* Crucial for positioning layout blocks */
        overflow: hidden;
        #pdf-canvas {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }
        .layout-block {
            position: absolute;
            background-color: none;
            border: 1px none var(--fg);
            box-sizing: border-box;
            color: var(--fg);
            overflow: hidden;
            padding: 2px;
            white-space: pre-wrap; /* Respects whitespace and wraps text */
            word-break: break-all;
        }
        .sentence-block {
            font-size: 0.5em;
        }
        .multi-term-block {
            font-size: 0.7em;
        }
        .basic-block {
            font-size: 0.9em;
        }
    }
}