/* 15-invoice.css - an invoice shown as the invoice itself (Workspace HQ project "Invoices - open as the invoice itself",
   Sam, 28 Nov 2026: "laid out exactly as the client will receive it ... a slim, well designed toolbar sits across the top").
   The invoice is a sheet of paper as the client gets it: white in both themes, the same parts, order and type as its PDF
   (Simple and Bold in a plain sans, Classic in a serif), the Brand's colour as --inv-accent. A draft (data-edit) is typed
   into where it stands: its fields sit flat on the paper and show a fine line only on hover and focus. The toolbar is the
   object head's actions: small line buttons with their icons, the likely one filled. Sharp corners, nothing over 600. */

/* the toolbar */
.gg-inv-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:6px}
.gg-inv-bar :is(.btn,.btn-sm){display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;white-space:nowrap}
.gg-inv-bar .gg-inv-ic{padding:0 8px}
/* the head gives the toolbar all the room the name leaves (the object head splits its width in half) */
.gg-obj:has(.gg-inv-bar){grid-template-columns:auto minmax(0,1fr)}
.gg-obj:has(.gg-inv-bar)>.gg-obj-r{grid-column:2;grid-row:1}
.gg-inv-bar svg{width:15px;height:15px;flex:0 0 15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* the paper */
.gg-inv-page{display:flex;justify-content:center;padding:8px 0 48px}
.gg-inv{--inv-accent:#022F42;--inv-ink:#101828;--inv-grey:#737373;--inv-line:#BFBFBF;
  box-sizing:border-box;width:100%;max-width:794px;min-height:1000px;padding:56px 72px 64px;background:#FFFFFF;color:var(--inv-ink);
  font:400 13px/1.45 Helvetica,Arial,"Liberation Sans",sans-serif;box-shadow:0 1px 3px rgba(16,24,40,.12),0 12px 32px rgba(16,24,40,.10);
  border-radius:0}
.gg-inv[data-design="classic"]{font-family:"Times New Roman",Times,"Liberation Serif",serif;font-size:14px}
.gg-inv h3{margin:0 0 3px;font-family:inherit;font-size:12px;font-weight:600;letter-spacing:0;color:var(--inv-ink)}
.gg-inv a{color:inherit}

/* the top: who it is from, the word, the facts */
.gg-inv-top{display:grid;grid-template-columns:1fr auto;grid-template-areas:"logo word" "from facts";column-gap:24px;align-items:start;margin-bottom:22px}
.gg-inv-logo{grid-area:logo;display:block;max-width:186px;max-height:70px;object-fit:contain;margin-bottom:8px}
.gg-inv-from{grid-area:from}
.gg-inv-biz{font-size:21px;font-weight:600;line-height:1.2;margin-bottom:6px}
.gg-inv-addr{font-size:12px;line-height:1.35}
.gg-inv-word{grid-area:word;justify-self:end;font-size:21px;font-weight:600;letter-spacing:.02em}
.gg-inv-top:not(:has(.gg-inv-logo)){grid-template-areas:"from word" "from facts"}
.gg-inv-facts{grid-area:facts;justify-self:end;display:grid;grid-template-columns:auto auto;column-gap:28px;row-gap:3px;margin:6px 0 0;font-size:12px}
.gg-inv-facts dt{font-weight:600}
.gg-inv-facts dd{margin:0;text-align:right}

/* Classic: centred head between two rules, the word spaced out */
.gg-inv[data-design="classic"] .gg-inv-top{grid-template-columns:1fr;grid-template-areas:"logo" "from" "word" "facts";text-align:center}
.gg-inv[data-design="classic"] .gg-inv-logo{justify-self:center;max-width:80px;max-height:80px}
.gg-inv[data-design="classic"] .gg-inv-biz{font-size:26px}
.gg-inv[data-design="classic"] .gg-inv-addr{color:var(--inv-grey);padding-bottom:10px;border-bottom:4px double #000}
.gg-inv[data-design="classic"] .gg-inv-word{justify-self:center;margin:24px 0 10px;font-size:17px;letter-spacing:.5em}
.gg-inv[data-design="classic"] .gg-inv-facts{text-align:left}

/* Bold: a band of the Brand's colour across the top, white words on it */
.gg-inv[data-design="bold"]{padding-top:0}
.gg-inv[data-design="bold"] .gg-inv-top{grid-template-columns:auto 1fr auto;grid-template-areas:"logo from word" "facts facts facts";
  margin:0 -72px 30px;padding:28px 72px 0;row-gap:52px}
.gg-inv[data-design="bold"] .gg-inv-top::before{content:"";grid-row:1;grid-column:1/-1;align-self:stretch;margin:-28px -72px -24px;background:var(--inv-accent)}
.gg-inv[data-design="bold"] .gg-inv-top>*{position:relative}
.gg-inv[data-design="bold"] .gg-inv-top:not(:has(.gg-inv-logo)){grid-template-columns:1fr auto;grid-template-areas:"from word" "facts facts"}
.gg-inv[data-design="bold"] :is(.gg-inv-biz,.gg-inv-addr,.gg-inv-word){color:#FFFFFF}
.gg-inv[data-design="bold"] .gg-inv-logo{max-width:86px;max-height:86px;margin:0}
.gg-inv[data-design="bold"] .gg-inv-biz{font-size:24px}
.gg-inv[data-design="bold"] .gg-inv-word{font-size:32px;align-self:center}
.gg-inv[data-design="bold"] .gg-inv-facts{justify-self:end}
.gg-inv[data-design="bold"] :is(.gg-inv-bill,.gg-inv-note) h3{color:var(--inv-accent)}

/* sample, test, paid and preview marks */
.gg-inv-band{margin:0 -8px 14px;padding:8px;font-size:16px;font-weight:600}
.gg-inv-band-sample{background:#FCE8C7}
.gg-inv-band-paid{background:#D9F0DE}
.gg-inv-mark{margin-bottom:10px;font-size:13px;font-weight:600}
.gg-inv-quiet{color:var(--inv-grey)}

/* bill to */
.gg-inv-bill{margin:6px 0 22px;font-size:13px}
.gg-inv-who{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:4px}

/* the lines */
.gg-inv-lines{width:100%;border-collapse:collapse;font-size:12px}
.gg-inv-lines th{font-weight:600;text-align:left;padding:5px 0;border-bottom:.5px solid var(--inv-line)}
.gg-inv-lines td{padding:5px 0;vertical-align:top}
.gg-inv-lines .n{text-align:right;white-space:nowrap;padding-left:18px}
.gg-inv-lines tbody tr:last-child td{padding-bottom:9px}
.gg-inv-lines tfoot th,.gg-inv-lines tfoot td{padding-top:9px;border-top:.5px solid var(--inv-line);border-bottom:0;font-size:15px}
.gg-inv[data-design="classic"] .gg-inv-lines thead th{background:#EDEDED;border:0;padding:5px 6px}
.gg-inv[data-design="classic"] .gg-inv-lines tfoot th{border-bottom:4px double #000}
.gg-inv[data-design="bold"] .gg-inv-lines thead th{background:var(--inv-accent);color:#FFFFFF;border:0;padding:5px 6px}
.gg-inv[data-design="bold"] .gg-inv-lines tfoot th{background:var(--inv-accent);color:#FFFFFF;padding:6px}

/* payment details, note, footer */
.gg-inv-notes{margin-top:30px;font-size:12px}
.gg-inv-note{margin-bottom:12px}

/* a draft, typed into where it stands: flat on the paper, a fine line on hover and focus */
.gg-inv-in{box-sizing:border-box;margin:0;padding:2px 4px;margin-left:-5px;width:calc(100% + 5px);border:1px solid transparent;border-radius:0;
  background:transparent;color:inherit;font:inherit;line-height:inherit;resize:none;overflow:hidden}
.gg-inv-in:hover{border-color:#D0D5DD}
.gg-inv-in:focus{outline:0;border-color:#E8B44F;background:#FFFBF2}
.gg-inv-in::placeholder{color:#98A2B3}
.gg-inv-area{display:block;min-height:1.6em}
.gg-inv-who .gg-inv-in{width:auto;flex:1 1 180px;margin-left:-5px;font-size:12px;color:var(--inv-grey)}
.gg-inv-facts .gg-inv-in{width:auto;text-align:right;padding:0 2px;margin:0}
.gg-inv-num{width:76px;margin:0;text-align:right}
.gg-inv-cur{margin-right:1px}
.gg-inv[data-edit] .gg-inv-lines td{vertical-align:middle}
.gg-inv-in[type="date"]{font-variant-numeric:tabular-nums}
.gg-inv-lines .x{width:26px;padding-left:6px;text-align:right}
.gg-inv-del{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:0;background:none;color:#98A2B3;cursor:pointer;opacity:0}
.gg-inv-del svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.gg-inv-lines tr:hover .gg-inv-del,.gg-inv-del:focus-visible{opacity:1}
.gg-inv-del:hover{color:#B42318}
.gg-inv-add td{padding-top:8px}
.gg-inv-add .btn-line{height:28px;padding:0 10px;font-size:12px;color:#475467;border-color:#D0D5DD;background:none}

/* the details in the side panel */
.gg-inv-details h3{margin:18px 0 6px;font-size:13px;font-weight:600}

/* a phone: the paper fills the screen, the head stacks */
@media (max-width:700px){
  .gg-inv{padding:28px 18px 36px;min-height:0;font-size:12px}
  .gg-inv-top{grid-template-columns:1fr;grid-template-areas:"logo" "from" "word" "facts"}
  .gg-inv-word,.gg-inv-facts{justify-self:start}
  .gg-inv[data-design="bold"] .gg-inv-top{grid-template-columns:1fr;grid-template-areas:"logo" "from" "word" "facts";margin:0 -18px 24px;padding:20px 18px 0;row-gap:8px}
  .gg-inv[data-design="bold"] .gg-inv-top::before{grid-row:1/4;margin:-20px -18px -10px}
  .gg-inv-num{width:56px}
  .gg-inv-lines .n{padding-left:8px}
  .gg-inv-bar{justify-content:flex-start}
  .gg-obj:has(.gg-inv-bar){grid-template-columns:minmax(0,1fr)}
  .gg-obj:has(.gg-inv-bar)>.gg-obj-r{grid-column:1;grid-row:auto}
}
@media print{.gg-inv{box-shadow:none;max-width:none}}
