@font-face {
    font-family: IRANSansX;
    font-style: normal;
    font-weight: bold;
    src: url('../fonts/iransans/Woff/IRANSansXFaNum-Bold.woff') format('woff'),
    url('../fonts/iransans/Woff2/IRANSansXFaNum-Bold.woff2') format('woff2');
}

@font-face {
    font-family: IRANSansX;
    font-style: normal;
    font-weight: normal;
    src: url('../fonts/iransans/Woff/IRANSansXFaNum-Regular.woff') format('woff'),
    url('../fonts/iransans/Woff2/IRANSansXFaNum-Bold.woff2') format('woff2');
}

* {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}
body {
    font-family: IRANSansX, serif;
    margin: 0 auto;
    max-width: 29.7cm;
    direction: rtl;
    font-size: 15px;
}
#main {
    padding: 14px;
}
.page {
    background: white;
    page-break-after: always;
    position: relative;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #222;
}
.page:last-child {
    page-break-after: auto;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}
.shipping-label-doc .page,
.product-label-doc .page{
    page-break-after: auto;
}
.table {
    border-collapse: collapse;
    border-spacing: 0;
    border: 0;
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
}
.font-small {
    font-size: 11px;
}
.woocommerce-Price-currencySymbol {
    font-size: 0.8rem;
}
.data-row {
    display: inline-block;
    margin-left: 10px;
    line-height: 2rem;
}
.data-row:last-child {
    margin-left:0;
}
.data-col {
    margin-bottom: 5px;
}
.data-col:last-child{
    margin-bottom:0;
}
table img{
    max-width: 100%;
    height: auto;
}
.total-table .total {
    background: #eee;
    font-weight: bold;
}
.invoice-title {
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: space-between;
    margin: 5px 0;
    border: 1px solid #eee;
    background: #f9f9f9;
}
.invoice-watermark {
    opacity: 0.2;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: 0;
    border: none !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}
.date {
    direction: ltr;
    display: inline-block;
}
table th, table td {
    vertical-align: middle;
    padding: 10px;
    border: 1px solid #000;
}

.products-table td span.product-id{
    display: block;
    text-align: center;
}
.products-table img{
    max-width: 96px;
}
.wc-item-meta,
.westaweb-product-meta,
.westaweb-item-meta {
    padding: 0;
    margin-top: 4px;
    list-style: none;
    font-size: 12px;
}
.wc-item-meta p {
    display: inline-block;
}
dl.variation {
    display: grid;
    grid-template-columns: auto auto;
    gap: 5px;
    word-break: break-word;
    margin-top: 4px;
    font-size: 12px;
}
dl.variation dt {
    font-weight: bold;
    text-align: left;
}
dl.variation dd {
    text-align: right;
}

dl.variation.tc-epo-metadata {
    font-size: 12px;
}
dl.variation.tc-epo-metadata dt {
    text-align: right;
}
dl.variation.tc-epo-metadata dd {
    text-align: left;
}

.responsive-table td,
.responsive-table th {
    text-align: center;
}
.th-label {
    display: none;
}
.invoice-actions {
    position: fixed;
    z-index: 999999;
    right: 0;
    bottom: 40px;
    background: #000851;
    background: linear-gradient(90deg, #1CB5E0 0%, #000851 100%);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    padding: 0 12px;
}
.invoice-actions div {
    display: flex;
    align-items: center;
    color: #fff;
    font-weight: bold;
    border-bottom: 1px solid #fff;
    padding: 5px 0;
    margin: 5px 0;
    cursor: pointer;
}

.invoice-actions div:last-child {
    border-bottom: 0;
}

.invoice-actions img {
    width: 32px;
    height: 100%;
    margin-left: 6px;
}

.invoice-footer {
    text-align: center;
    margin-top: 12px;
}

.data-logo {
    text-align: center;
}

.data-logo img {
    max-height: 60px;
}

.shop-logo, .data-shipping_method {
    text-align: center;
}

.shop-logo img {
    max-height: 120px;
}

.westaweb-btn {
    display: inline-block;
    font-weight: bold;
    background: #CE2029;
    padding: 5px 18px;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
}

.westaweb-btn:hover {
    padding: 5px 21px;
    transition: 0.3s;
}

.westaweb-no-data {
    font-size: 20px;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.westaweb-no-data p {
    font-size: 32px;
}

.westaweb-no-data .westaweb-btn {
    margin-top: 20px;
}

.qrcode {
    display: flex;
    justify-content: center;
}
.qrcode.elementor-qrcode {
    display: block;
}
.qrcode canvas{
    max-width: 86px;
}

@media screen and (max-width: 768px) {
    body {
        padding-bottom: 60px;
    }
    .invoice-title {
        flex-direction: column;
        gap: 8px;
        background: transparent;
    }
    .responsive-table thead,
    .responsive-table tfoot th{
        display: none;
    }
    .responsive-table tbody tr,
    .responsive-table tfoot tr {
        display: block;
        margin-bottom: 10px;
    }
    .responsive-table tbody td,
    .responsive-table tfoot td{
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    .th-label {
        display: inline-block;
    }
    .invoice-actions {
        top: auto;
        bottom: 0;
        left: 0;
        border-radius: 0;
        display: flex;
        justify-content: space-between;
        flex-direction: row;
        background: linear-gradient(180deg, #1CB5E0 0%, #000851 100%);
        min-width: 132px;
    }
    .invoice-actions div {
        width: 50%;
        justify-content: center;
        border-bottom: 0;
        border-left: 1px solid #fff;
        padding: 10px;
        margin: 0;
    }
    .invoice-actions div:last-child {
        border-left: 0;
    }
}

@page {
    size: auto;
    margin:8px 16px;
}
@media print {
    html, body {
        height: 99%;
        page-break-after: avoid;
        page-break-before: avoid;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
        max-width: 100%;
        padding: 0;
        font-size: 12px;
    }
    .invoice-actions, #westaweb_payment_link {
        display: none !important;
    }
    .invoice-doc .page {
        border-bottom: 0;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    .table:not(.products-table),
    .shipping-label-doc .page{
        page-break-inside: avoid;
    }
}