﻿
/* ============================================================
   KPS CUSTOMER QUOTATION
   QR CODE + PROMOTIONS EXTENSION
   ============================================================ */

/* QR CODE */

.kps-quote-document .kps-quote-summary.with-qr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 27mm;
    gap: 3mm;
    align-items: stretch;
}

.kps-quote-qr {
    width: 27mm;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .kps-quote-qr img {
        display: block;
        width: 100%;
        max-width: 27mm;
        max-height: 27mm;
        height: auto;
        object-fit: contain;
    }

.kps-quote-qr-label {
    font-size: 7px;
    color: #64748b;
    text-align: center;
    margin-top: 1mm;
}

/* PROMOTION SECTION */

.kps-quote-promotions {
    display: block;
    width: 100%;
    margin-top: 5mm;
    padding: 3mm;
    border: 1px solid #d9e1e9;
    border-radius: 2mm;
    background: #fff;
    box-sizing: border-box;
    break-inside: avoid;
    page-break-inside: avoid;
}

.kps-quote-promotions-title {
    margin: 0 0 3mm;
    color: #344d77;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.kps-quote-promotions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3mm;
    align-items: start;
}

.kps-quote-promo-item {
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

    .kps-quote-promo-item img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 67mm;
        object-fit: contain;
        border-radius: 1mm;
    }

    /* Prevent empty elements from appearing */

    .kps-quote-promo-item:empty,
    .kps-quote-qr:empty {
        display: none;
    }

/* PRINT */

@media print {

    .kps-quote-document .kps-quote-summary.with-qr {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 27mm !important;
    }

    .kps-quote-qr,
    .kps-quote-promotions,
    .kps-quote-promo-item {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .kps-quote-promotions {
        box-shadow: none !important;
    }

    .kps-quote-promo-item img {
        max-height: 67mm !important;
    }

    .kps-quote-promotions-title {
        color: #344d77 !important;
    }
}

/* SCREEN PREVIEW */

@media screen and (max-width: 750px) {

    .kps-quote-document .kps-quote-summary.with-qr {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 27mm;
    }
}
