/* Printable documents. Used in the in-app preview, by window.print() and by the PDF export window. */
@font-face{font-family:"Kufi";src:url(fonts/noto-kufi-arabic-arabic-700-normal.woff2) format("woff2");font-weight:700}
@font-face{font-family:"NSA";src:url(fonts/noto-sans-arabic-arabic-400-normal.woff2) format("woff2");font-weight:400;unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200E}
@font-face{font-family:"NSA";src:url(fonts/noto-sans-arabic-arabic-600-normal.woff2) format("woff2");font-weight:600;unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFF,U+200C-200E}
@font-face{font-family:"NSA";src:url(fonts/noto-sans-arabic-latin-400-normal.woff2) format("woff2");font-weight:400;unicode-range:U+0000-00FF,U+2000-206F,U+2212}
@font-face{font-family:"NSA";src:url(fonts/noto-sans-arabic-latin-600-normal.woff2) format("woff2");font-weight:600;unicode-range:U+0000-00FF,U+2000-206F,U+2212}

body.pdf{margin:0;background:#fff}
.doc{font-family:"NSA",Tahoma,sans-serif;color:#1d1724;font-size:12.5px;line-height:1.65;position:relative;direction:rtl;background:#fff}
html[dir=ltr] .doc{direction:ltr}
.doc .n{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
.doc b{font-weight:600}
.dh{display:flex;align-items:center;gap:12px;border-bottom:2px solid #6B3F7A;padding-bottom:10px;margin-bottom:12px}
.dlogo{width:46px;height:46px;border-radius:10px;background:#6B3F7A;color:#fff;display:grid;place-items:center;font-family:"Kufi","NSA";font-size:20px;overflow:hidden;flex:none}
.dlogo img{width:100%;height:100%;object-fit:cover}
.dcl{flex:1;min-width:0}
.dcl b{display:block;font-family:"Kufi","NSA";font-size:15px;line-height:1.4}
.dcl span,.dtitle span{color:#5e546a;font-size:11px}
.dtitle{text-align:end}
.dtitle>b{display:block;font-family:"Kufi","NSA";font-size:15px;color:#6B3F7A}
.dtitle span b{color:#1d1724}
.dh2{font-family:"Kufi","NSA";font-size:16px;margin:4px 0 10px}
.dh3{font-family:"Kufi","NSA";font-size:13px;margin:14px 0 6px}
.dinfo{display:flex;gap:24px;flex-wrap:wrap;margin-bottom:12px}
.dinfo span{color:#5e546a;font-size:11px;display:block}
.dt{width:100%;border-collapse:collapse;margin-bottom:10px}
.dt th{background:#f1ecf4;color:#3d3347;font-size:11px;font-weight:600;padding:5px 7px;text-align:start}
.dt td{border-bottom:1px solid #e4dde9;padding:5px 7px;vertical-align:top}
.dt td small{display:block;color:#5e546a;font-size:10.5px}
.dt.sm{font-size:11px}
.dt .n,.dsum .n{text-align:end}
.dsum{margin-inline-start:auto;width:min(330px,100%);border-collapse:collapse}
.dsum.wide{width:100%}
.dsum td{padding:4px 7px;border-bottom:1px dashed #e4dde9}
.dsum tr.big td{font-size:14px;border-top:1.5px solid #1d1724;border-bottom:1.5px solid #1d1724}
.dsum tr.due td{color:#9E3558}
.dnote{color:#5e546a;font-size:11px;margin:8px 0 0}
.dfoot{text-align:center;margin:18px 0 0;font-family:"Kufi","NSA";font-size:12px}
.dprinted{text-align:center;color:#9a90a5;font-size:9.5px;margin:6px 0 0}
.stamp{position:absolute;top:70px;left:30px;transform:rotate(-14deg);border:3px solid #9E3558;color:#9E3558;font-family:"Kufi","NSA";font-size:22px;padding:2px 16px;border-radius:8px;opacity:.75}
.dsign{display:flex;gap:40px;margin-top:40px}
.dsign div{flex:1;border-top:1px solid #1d1724;text-align:center;padding-top:4px;font-size:11px;color:#5e546a}
.dlist{list-style:none;padding:0;margin:0 0 14px}
.dlist li{display:flex;gap:8px;padding:5px 0;border-bottom:1px solid #eee7f1}
.dlist .ck{width:18px;height:18px;border:1.5px solid #1F6F60;color:#1F6F60;border-radius:4px;display:grid;place-items:center;font-size:12px;flex:none;margin-top:2px}
.dsig{border:1px solid #ddd6e3;border-radius:10px;padding:8px 12px;width:330px}
.dsig span{font-size:11px;color:#5e546a}
.dsig img{display:block;width:100%;height:auto}
.dcards{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid #ddd6e3;border-radius:8px;margin-bottom:10px}
.dcards div{padding:6px 10px;border-inline-start:1px solid #ddd6e3}
.dcards div:first-child{border:0}
.dcards span{display:block;font-size:10.5px;color:#5e546a}
.dcards b{font-family:"Kufi","NSA";font-size:14px}
/* 80mm thermal receipt */
.doc.s80,.s80 .doc{font-size:11px}
.s80 .dh{flex-wrap:wrap;gap:6px}
.s80 .dlogo{width:32px;height:32px;font-size:14px}
.s80 .dtitle{text-align:start;width:100%}
.s80 .dsum{width:100%}
.s80 .dt th,.s80 .dt td{padding:3px 3px}
.s80 .stamp{top:40px;left:10px;font-size:16px}

/* ---------- in-app preview ---------- */
.printview{position:fixed;inset:0;z-index:40;background:rgba(23,18,28,.6);display:flex;flex-direction:column}
.pbar{display:flex;align-items:center;gap:8px;padding:10px 18px;background:var(--surface,#fff);border-bottom:1px solid var(--line,#ddd);flex-wrap:wrap}
.pbar b{font-family:var(--display)}
.pscroll{flex:1;overflow:auto;padding:24px}
.sheet{background:#fff;margin:0 auto;box-shadow:0 10px 40px rgba(0,0,0,.3);padding:14mm 12mm;border-radius:4px}
.sheet.sA5{width:148mm;min-height:200mm}
.sheet.sA4{width:210mm;min-height:280mm}
.sheet.s80{width:80mm;padding:5mm 4mm}

@media print{
  body.printing{overflow:visible;background:#fff}
  body.printing>*:not(.printview){display:none!important}
  body.printing .printview{position:static;background:#fff;display:block}
  body.printing .pbar{display:none}
  body.printing .pscroll{padding:0;overflow:visible}
  body.printing .sheet{box-shadow:none;width:auto;min-height:0;padding:0;margin:0}
}
.dlogo.has-img{background:none;width:auto;max-width:150px;border-radius:0}
.dlogo.has-img img{width:auto;height:100%;object-fit:contain}
.dlogo img.lg-light{filter:brightness(0)}
.s80 .dlogo.has-img{width:auto;max-width:100px}

html[lang=en] .doc th::first-letter, html[lang=en] .dsum td:first-child::first-letter { text-transform: uppercase; }

/* the shop receipt's top: logo side, logo size, text centred (set in the shop's settings) */
.shoph.lp-end .dlogo{order:2}
.shoph.lp-end .dcl{order:1}
.shoph.lp-end .dtitle{order:3}
.shoph.lp-top{flex-direction:column;align-items:center}
.shoph.lp-top .dcl,.shoph.lp-top .dtitle{width:100%}
.shoph.al-center .dcl,.shoph.al-center .dtitle{text-align:center}
.shoph.al-center .dcl span{display:block}
.shoph .dlogo.has-img{max-width:none}
.shoph.lz-s .dlogo{height:32px;min-width:32px}
.shoph.lz-m .dlogo{height:48px;min-width:48px}
.shoph.lz-l .dlogo{height:66px;min-width:66px}
.shoph.lz-xl .dlogo{height:90px;min-width:90px}
.s80 .shoph.lz-s .dlogo{height:32px;width:auto}
.s80 .shoph.lz-m .dlogo{height:46px;width:auto}
.s80 .shoph.lz-l .dlogo{height:62px;width:auto}
.s80 .shoph.lz-xl .dlogo{height:84px;width:auto}
.s80 .shoph .dlogo.has-img{max-width:150px}
.s80 .shoph.lp-top .dlogo.has-img{max-width:220px}
.s80 .shoph .dlogo:not(.has-img){width:auto;aspect-ratio:1}
.shoph .dcl b{word-break:break-word}
/* the shop's name and address at the bottom of the receipt; the phone read left to right */
.dshop{text-align:center;margin:16px 0 0;padding-top:10px;border-top:1px dashed #cfc6d8}
.dshop b{display:block;font-family:"Kufi","NSA";font-size:13px}
.dshop span{display:block;color:#5e546a;font-size:11px;line-height:1.6}
.dphone{font-size:13px;color:#1d1724;font-weight:600}
.dshop .dphone{color:#1d1724;font-size:12px}
