:root {
    --zapa-table-spacing: 20px;
    --zapa-dark-blue-color: rgb(42, 114, 222);
    --zapa-dark-red-color: rgb(249 108 101);
    --zapa-light-blue-color: rgb(199 230 250);
    --zapa-light-red-color: rgb(243 222 229);
}

body {
    padding: 15px;
    width: 100%;
}

#main {
    width: 1190px;
    line-height: 1.4;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    top: calc(-2 * var(--zapa-table-spacing));
}

p {
    margin-bottom: 0.4em !important;
}

.light-blue-bg {
    background-color: var(--zapa-light-blue-color);
}

.light-red-bg {
    background-color: var(--zapa-light-red-color);
}

.black-text {
    color: black;
    display: inline;
}

.zapa-table { /* TODO: Find a better name */
    width: calc(100% + 2 * var(--zapa-table-spacing));
    margin: calc(-1 * var(--zapa-table-spacing));
    border-spacing: var(--zapa-table-spacing);
    border-collapse: separate;
    font-size: 18px;
    color: var(--zapa-dark-blue-color);
    table-layout: fixed;  /* This forces the table to actually respect the widths */
}

.small-text {
    font-size: 13px !important;
}

.zapa-table > tbody > tr > td {
    padding: 10px;
    vertical-align: top;
}

.zapa-table table > tbody > tr:not(:first-child) > td:not(:has(> table)) {
    padding-top: 5px;
}

.zapa-table > tbody > tr > td:has(> table) {
    padding: 0;
}

.width-row > td {
    padding: 0;
}

.width-row > td:nth-child(1) {
    width: 280px;
}

.width-row > td:nth-child(2) {
    width: 400px;
}

.width-row > td:nth-child(3) {
     width: 470px;
}

.td-padding {
    padding: 10px !important;
}

.td-padding-top tr:not(:first-child) > td {
    padding-top: 20px !important;;
}

.td-padding-bottom tr:not(:last-child) > td {
    padding-bottom: 20px;
}

.td-padding-bottom-2 tr:not(:last-child) > td {
    padding-bottom: 10px;
}

.width-33 {
    width: 33% !important
}

.three-row-height {
    height: 4.7em;
}

.logo-cell {
    color: white;
    background-color: var(--zapa-dark-blue-color);
    text-align: right;
    vertical-align: bottom !important;
    font-size: 25px;
}

.logo-cell img {
    vertical-align: baseline;
}

.sheet-no-cell {
    width: 25% !important;
    background-color: var(--zapa-light-blue-color);
    font-size: 25px;
    font-weight: bold;
    color: var(--zapa-dark-blue-color);
}

.sheet-no-cell > div {
    text-align-last: justify;
}

.sheet-no-cell .black-text {
    font-size: 25px;
}

.stripe-table {
    color: black;
    height: 100%;
    width: 100%;
}

.blue-stripe {
    background-color: var(--zapa-dark-blue-color);
    height: 20px;
}

.red-stripe {
    background-color: var(--zapa-dark-red-color);
    height: 20px;
    padding: 1px !important;
    padding-left: 10px !important;
    font-size: 12px;
    letter-spacing: 1px;
    color: lightgray;
}

.aligned-fill-table {
    white-space: nowrap;
}

.aligned-fill-table tr td:first-child {
    font-weight: bold;
    padding-right: 15px;
    width: 0;
}

.aligned-fill-table tr td:first-child:after {
    content: ":"
}

.aligned-fill-table tr td:last-child {
    color: black;
}

.white-box {
    width: 100%;
    height: 100%;
    background-color: white;
    color: var(--zapa-light-blue-color);
    font-size: 12px;
    padding-left: 5px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

div > .white-box {
    display: inline-flex;
    height: 2em;
    margin: 3px 5px;
}

div:has(> .white-box) {
    display: flex;
    align-items: center;
}

td:has(> .white-box) {
    height: 0; /* Height does not work on .white-box without this.️ https://stackoverflow.com/questions/3215553/make-a-div-fill-an-entire-table-cell#comment84754579_34781198 */
}

tr.name-signature > td {
    width: 50%;
    height: 4em;
}

.warning-table td {
    border: 3px solid var(--zapa-dark-blue-color);
    text-align: left;
    font-weight: bold;
    font-size: 8px;
    letter-spacing: 1px;
    line-height: 1;
    padding: 2px;
}

.warning-table td:has(img) {
    text-align: center;
}

.warning-table img {
    height: 40px;
    width: 40px;
    object-fit: cover;
    object-position: center;
}


@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    body {
        padding-top: 31px;
        padding-right: 0;
        padding-bottom: 0;
        padding-left: 45px
    }

    #main {
        margin-left: 0;
        margin-right: 0;
    }
}
