:root {
    --page-width: 210mm;
    --page-height: 297mm;
}



/* #region print and screen */

@page {
    size: A4;
    margin: 10mm;
}

@media screen {
    .page {
        margin: auto;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    }
}

@media print {
    body {
        background: none;
    }
}



/* #region layout */

body {
    font-family: sans-serif;
    font-size: 14pt;
    margin: 0;
}

* {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    margin: 6px 10px 12px 10px;
}

hr {
    margin-left: 10px;
    margin-right: 10px;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

#settings-table {
    border-spacing: 10px;
}

#buttons-container {
    display: flex;
    gap: 10px;
    margin: 10px;
}

button {
    padding: 5px 10px;
    font-size: 14pt;
    cursor: pointer;
}

#form-page, #stats-container {
    padding: 10px;
}

#form-page.hidden {
    display: none;
}

#stats-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#notes {
    margin-right: 10px;
    font-size: 13pt;
}



/* #region page */

.page {
    page-break-after: always;
    break-after: page;
}

.page {
    width: 210mm;
    height: 297mm;
    box-sizing: border-box;
}



/* #region form elements */

textarea {
    min-width: 100px;
    max-width: 400px;
    min-height: 100px;
    max-height: 450px;
}

input[type="text"],
input[type="number"],
select,
textarea {
    font-size: 12pt;
}

input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}



/* #region dropzone */

.dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-wrap: balance;
}

.dropzone:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.dropzone.dragover {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.dropzone-content {
    pointer-events: none;
}

.dropzone-text {
    font-weight: 500;
}

.dropzone-link {
    color: #007bff;
    text-decoration: underline;
}

.image-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-preview #remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview #remove-image:hover {
    background: #c82333;
}



/* #region vouchers */

.voucher-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.voucher {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid #000;
    padding: 2mm;
    width: 80mm;
    height: calc(var(--page-height) / 6);
}

.voucher-image {
    padding-top: 2mm;
    max-width: 50mm;
    max-height: 30mm;
    object-fit: contain;
}

.voucher-text {
    font-size: 18pt;
    font-weight: bold;
    text-wrap: balance;
}
