/* Widok wydruku faktury: kolory tylko z motywu, przy drukowaniu widoczna jest wyłącznie faktura. */

.faktury-print {
    max-width: 210mm;
    margin: 0 auto;
    padding: 12mm;
    background: var(--ajb-surface, Canvas);
    color: var(--ajb-text, CanvasText);
    border: 1px solid var(--ajb-border, GrayText);
    font-size: 0.9rem;
}

.faktury-print__accent {
    border-top: 6px solid var(--faktury-accent, var(--ajb-accent, Highlight));
}

.faktury-print__logo {
    max-height: 60px;
    max-width: 220px;
}

.faktury-print table {
    width: 100%;
    border-collapse: collapse;
}

.faktury-print th,
.faktury-print td {
    border-bottom: 1px solid var(--ajb-border, GrayText);
    padding: 4px 6px;
    vertical-align: top;
}

.faktury-print .faktury-num {
    text-align: end;
    white-space: nowrap;
}

.faktury-print__qr img {
    width: 120px;
    height: 120px;
}

@media print {
    /* The style sheet is linked for the whole application (index.html): hide the rest of the page only when an invoice print view is on it. */
    body:has(.faktury-print) * {
        visibility: hidden;
    }

    .faktury-print,
    .faktury-print * {
        visibility: visible;
    }

    .faktury-print {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: none;
        border: none;
        padding: 0;
        background: none;
        color: inherit;
    }

    .faktury-no-print {
        display: none !important;
    }
}

/* Lines of the editor: on a tablet and below (up to 991px, where the fields no longer fit in one row) every line is a card (theme colors only). */
@media (max-width: 991.98px) {
    .faktury-line {
        border: 1px solid var(--ajb-border, GrayText);
        border-radius: 0.5rem;
        padding: 0.5rem;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (min-width: 992px) {
    .faktury-line {
        border-bottom: 1px solid var(--ajb-border, GrayText);
        padding-bottom: 0.5rem;
    }
}

/* Search field above a grid of the module. */
.faktury-search {
    min-width: 220px;
    max-width: 100%;
}
