/* NOTE: WARRANTY CERTIFICATE (certificat-garantie.php). On screen: the certificate in the usual text column, the repair
   sheet as fill-in lines, the warranty form under it. Printed (the "printează" button): only the certificate, in the
   sizes of the old print sheet (assets.komoder.com/styles/warranty-print-ro.css), with the repair sheet as a table
   on its own page. */

/* fill-in lines (date, product, buyer, delivery address) and the repair sheet lines: one under the other */
.kmd-certificate__fields,
.kmd-certificate__repair-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kmd-prose .kmd-certificate__fields p,
.kmd-prose .kmd-certificate__repair-rows p {
    margin: 0;
}

/* the repair sheet table: printed only */
.kmd-certificate__repairs-table {
    display: none;
}

/* 1px narrower than the column: half of the collapsed outer border is drawn outside the table, and at 100% the
   right one was cut off in print */
.kmd-prose .kmd-certificate__repairs-table table {
    width: calc(100% - 1px);
    border-collapse: collapse;
    font-size: 14px;
}

.kmd-prose .kmd-certificate__repairs-table th,
.kmd-prose .kmd-certificate__repairs-table td {
    padding: 10px 20px;
    border: 1px solid #A0A0A0;
    color: #000000;
    line-height: 1.2;
    text-align: center;
    vertical-align: middle;
}

.kmd-prose .kmd-certificate__repairs-table th {
    font-weight: 700;
}

.kmd-prose .kmd-certificate__repairs-table td {
    font-weight: 400;
}

@media print {
    /* the white margin around the sheet (the old print had it from the page padding) */
    @page {
        margin: 15mm;
    }

    body {
        background: none;
        color: #000000;
    }

    /* only the certificate: no bars, header, navigation, breadcrumbs, form, footer, pop-ups or button */
    .kmd-promo-bar,
    .kmd-header,
    .kmd-section-nav,
    .kmd-sticky-cta,
    .kmd-breadcrumbs,
    .kmd-certificate__print,
    #ticket,
    .kmd-prefooter,
    .kmd-footer,
    .kmd-promo-popup,
    #cookiescript_injected_wrapper,
    #cookiescript_badge,
    .consent-box {
        display: none !important;
    }

    .kmd-section,
    .kmd-page-hero {
        padding: 0;
        background: none;
    }

    .kmd-container {
        max-width: none;
        padding: 0;
    }

    .kmd-page-hero__content {
        gap: 0;
    }

    /* one rhythm for the printed text: the margins below replace the spacing of the text column */
    .kmd-prose > * + *,
    .kmd-prose > * + h2,
    .kmd-prose li + li {
        margin-top: 0;
    }

    .kmd-page-hero__title {
        margin: 0 0 20px;
        color: #000000;
        font-size: 24px;
        font-weight: 600;
        line-height: 1.2;
    }

    /* a heading sits closer to its text than to the section before it; paragraphs and list items keep an even gap */
    .kmd-prose h2 {
        margin: 18px 0 8px;
        color: #202020;
        font-size: 20px;
        font-weight: 600;
        line-height: 1.2;
    }

    .kmd-prose h3 {
        margin: 12px 0 6px;
        color: #202020;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.2;
    }

    .kmd-prose p,
    .kmd-prose li {
        color: #424242;
        font-size: 12px;
        font-weight: 400;
        line-height: 1.2;
    }

    .kmd-prose p {
        margin: 0 0 6px;
    }

    .kmd-prose li {
        margin: 0 0 3px;
    }

    .kmd-prose ul,
    .kmd-prose ol {
        margin: 0 0 8px;
        padding-left: 18px;
    }

    .kmd-prose strong {
        font-weight: 700;
    }

    /* the seller and the service unit: name, address, phone and e-mail on their own lines, a bit apart */
    .kmd-prose .kmd-certificate__contact {
        line-height: 1.5;
    }

    .kmd-certificate__fields {
        gap: 0;
        margin: 4px 0 10px;
    }

    .kmd-prose .kmd-certificate__fields p {
        margin-bottom: 10px;
    }

    .kmd-certificate__repair-rows {
        display: none;
    }

    .kmd-certificate__repairs-table {
        display: block;
        margin-top: 10px;
    }

    .kmd-certificate__new-page {
        break-before: page;
    }

    /* headings stay with the text after them, rows and list items are not cut between pages */
    .kmd-prose h2,
    .kmd-prose h3 {
        break-after: avoid;
    }

    .kmd-prose li,
    .kmd-certificate__repairs-table tr {
        break-inside: avoid;
    }
}
