:root {
    --paper-size: 210mm;
    --page-space: calc(var(--paper-size) * 0.05);
    --paper-safe-width: min(var(--paper-size), calc(100vw - 2rem));
    --paper-scale: min(1, calc(var(--paper-safe-width) / var(--paper-size)));
    --font-size: 16px;
    --line-height: 1.2;
    --heading-size: 3rem;
    --table-heading-size: 1rem;
}

body {
    background: black;
    display: flex;
    font-size: var(--font-size);
    flex-direction: column;
    height: 100vh;
    line-height: var(--line-height);
}

header {
    background: canvas;
    position: sticky;
    top: 0;
    z-index: 1;

    nav {
        align-items: center;
        column-gap: 1rem;
        display: flex; 
        flex-direction: column;
        justify-content: center;
    }
}


main {
    align-items: center;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    margin-inline: auto;
    width: var(--paper-size);
    zoom: var(--paper-scale);
}

section {
    background: canvas;
    border: 1px solid canvasText;
    display: flex;
    flex-direction: column;
    gap: var(--page-space);
    padding: var(--page-space);
    width: var(--paper-size);

    h1 {
        font-size: var(--heading-size);
        font-weight: 700;
        line-height: var(--line-height);
        text-align: center;
    }
}

form {
    display: flex;
    flex-direction: column;
    gap: var(--page-space);
}

fieldset {
    border: none;
    display: flex;
}

button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
}

button[data-dots]::after {
    content: attr(data-dots);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translateX(-50%);
    min-inline-size: 3ch;
    text-align: center;
    pointer-events: none;
}

#customer-name {
    text-transform: uppercase;
}

table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    
    th {
        font-size: var(--table-heading-size);
        font-weight: 700;
        line-height: var(--line-height);
        padding: 0.5em 1em;
    }
    td {
        border: 1px solid ;

        input:focus{
            outline: auto;
        }

    }
}

input, output {
    background: canvas;
    border: none;
    font: inherit;
    outline: none;
    padding: 0.5em;
    width: 100%;

    &[type="date"] {
        max-width: max-content;
        min-width: min-content;
        text-align: right;
        width: fit-content;
    }

    &[id^="item-"] { text-transform: uppercase; }

    &:hover { filter: invert(1); }
}

output {
    display: block;
}

.data-text {
    text-align: left;
}

.data-number {
    text-align: right;
}

.one-tenth {
    width: 10%;
}

.two-tenths {
    width: 20%;
}

.three-tenths {
    width: 30%;
}
.four-tenths {
    width: 40%;
}
