/* =========================
   ZBK INVOICE CREATOR STYLE
   FINAL PROFESSIONAL VERSION
========================= */

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

/* =========================
   INVOICE CONTAINER (SCREEN)
========================= */
.zbk-container {
    width: 210mm;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* =========================
   INPUTS
========================= */
input, textarea {
    width: 95%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

textarea {
    height: 60px;
    resize: none;
}

/* =========================
   TABLES
========================= */
table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 6px;
}

#product-table th {
    background: #f2f2f2;
    text-align: center;
}

#product-table td {
    text-align: center;
}

/* =========================
   BUTTONS
========================= */
button {
    padding: 6px 10px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
}

#add-row {
    background: #007bff;
    color: white;
}

#print-invoice {
    background: green;
    color: white;
}

.remove-row {
    background: red;
    color: white;
}

/* =========================
   TEXT CLEANING
========================= */
h2, h3 {
    margin: 6px 0;
}

hr {
    margin: 10px 0;
}

/* =========================
   PRINT SYSTEM (FINAL FIX)
========================= */

@media print {

    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    /* HIDE EVERYTHING FIRST */
    body * {
        visibility: hidden !important;
    }

    /* SHOW ONLY INVOICE */
    .zbk-container,
    .zbk-container * {
        visibility: visible !important;
    }

    /* POSITION INVOICE */
    .zbk-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #fff !important;
        box-shadow: none !important;
    }

    /* HIDE WORDPRESS HEADER + FOOTER (IMPORTANT FIX) */
    header,
    footer,
    nav,
    .site-header,
    .site-footer,
    .main-header,
    .main-footer,
    .elementor-location-header,
    .elementor-location-footer,
    #masthead,
    #colophon {
        display: none !important;
        visibility: hidden !important;
    }

    /* HIDE BUTTONS */
    #add-row,
    #print-invoice,
    .remove-row {
        display: none !important;
    }

    /* PREVENT PAGE BREAK ISSUES */
    table {
        page-break-inside: avoid !important;
    }

    tr {
        page-break-inside: avoid !important;
    }

    td {
        page-break-inside: avoid !important;
    }
}