/* Generated from products/design-system/shared/invoice-document by Navorina/scripts/sync-ds-invoice-document.mjs. Do not edit. */
/* Invoice document (nv-o-invoice): the one source of the invoice sheet look for the DS catalog and the
   product. Markup: shared/invoice-document.js. The product gets a byte-identical copy in
   css/components/nv-invoice-document.css via Navorina/scripts/sync-ds-invoice-document.mjs; edit this file only.

   One calm surface, no outlines and no rules between rows: hierarchy comes from type roles and space.
     sheet      island radius · 48 px padding (24 px under 560 px of sheet width) · up to 820 px wide
     head       title 1 "Invoice", meta lines "Label: value" in footnote under it, logo 64 px on the right
     sections   40 px apart (32 px narrow)
     labels     footnote, tertiary
     values     body or callout, primary and secondary; numbers tabular
     items      plain muted head row; under 560 px each line stacks: description, then qty · price · tax and amount
     Total      numeric display (numeric title when narrow)
     placeholder quaternary text: the empty case and the editor
   Accent (data-accent, I8): a calm preset tints the title, the initial plate and Total, mixed a quarter with the
   text colour so it reads on light and dark sheets alike; graphite (no attribute) is the plain text colour.
   QR: "Scan to pay" sits as a third footer column, 88 px, always dark on white.
   Edge: the island border token (a hairline on light islands, none on dark), never a decorative outline.
   Theme: the sheet follows the page tokens; data-theme="light" | "dark" pins it (PDF, previews). */
@layer components {
  .nv-o-invoice {
    --nv-invoice-sheet: var(--nv-invoice-surface, var(--nv-table-island, var(--dash-card, #121212)));
    --nv-invoice-well: var(--nv-table-well, color-mix(in srgb, #888888 9%, #020203));
    --nv-invoice-text: var(--nv-text-primary, #eeeeee);
    --nv-invoice-secondary: var(--nv-text-secondary, rgb(238 238 238 / .7));
    --nv-invoice-tertiary: var(--nv-text-tertiary, rgb(238 238 238 / .5));
    --nv-invoice-placeholder: var(--nv-text-quaternary, rgb(238 238 238 / .3));
    --nv-invoice-accent: var(--nv-invoice-text);
    display: block;
    inline-size: 100%;
    max-inline-size: var(--nv-invoice-width, 820px);
    margin-inline: auto;
    border: var(--nv-invoice-edge, var(--nv-table-island-border, 0));
    border-radius: var(--nv-island-radius, 2rem);
    background: var(--nv-invoice-sheet);
    color: var(--nv-invoice-text);
    font-family: var(--nv-font-sans, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    container: nv-invoice / inline-size;
  }

  .nv-o-invoice[data-theme="dark"] {
    --nv-invoice-edge: 0;
    --nv-invoice-sheet: #121212;
    --nv-invoice-well: color-mix(in srgb, #888888 12%, #121212);
    --nv-invoice-text: #eeeeee;
    --nv-invoice-secondary: rgb(238 238 238 / .7);
    --nv-invoice-tertiary: rgb(238 238 238 / .5);
    --nv-invoice-placeholder: rgb(238 238 238 / .3);
    color-scheme: dark;
  }

  .nv-o-invoice[data-theme="light"] {
    --nv-invoice-edge: 1px solid color-mix(in srgb, #5e5e5e 10%, #ffffff);
    --nv-invoice-sheet: #ffffff;
    --nv-invoice-well: color-mix(in srgb, #5e5e5e 8%, #ffffff);
    --nv-invoice-text: #1a1a1c;
    --nv-invoice-secondary: #5c5c61;
    --nv-invoice-tertiary: #6e6e73;
    --nv-invoice-placeholder: #aeaeb2;
    color-scheme: light;
  }

  .nv-o-invoice[data-accent="slate"] { --nv-invoice-accent-base: #5b6b8c; }
  .nv-o-invoice[data-accent="sage"] { --nv-invoice-accent-base: #5e7f68; }
  .nv-o-invoice[data-accent="clay"] { --nv-invoice-accent-base: #a06a52; }
  .nv-o-invoice[data-accent="plum"] { --nv-invoice-accent-base: #7d5f86; }
  .nv-o-invoice[data-accent="ocean"] { --nv-invoice-accent-base: #3f7f8a; }
  .nv-o-invoice[data-accent] { --nv-invoice-accent: color-mix(in srgb, var(--nv-invoice-accent-base, var(--nv-invoice-text)) 75%, var(--nv-invoice-text)); }

  .nv-o-invoice__sheet {
    display: grid;
    gap: 40px;
    padding: 48px;
    color: var(--nv-invoice-text);
  }

  /* Resets stay at one class of weight so every part below wins over them and over host page type. */
  .nv-o-invoice :where(p, dl, dt, dd, table, th, td) { margin: 0; }

  .nv-o-invoice__sr {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .nv-o-invoice .nv-o-invoice__label {
    margin: 0;
    color: var(--nv-invoice-tertiary);
    font-size: var(--nv-type-footnote-size, 12px);
    font-weight: var(--nv-type-weight-regular, 400);
    line-height: var(--nv-type-footnote-line, 16px);
    letter-spacing: var(--nv-type-footnote-tracking, 0);
  }

  /* Head: the document word with the meta lines under it on the left, the logo on the right. */
  .nv-o-invoice__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
  }

  .nv-o-invoice__heading { display: grid; gap: 12px; min-inline-size: 0; }

  .nv-o-invoice__logo {
    display: block;
    max-inline-size: 160px;
    max-block-size: 64px;
    object-fit: contain;
    object-position: right top;
  }

  .nv-o-invoice__mark {
    display: inline-grid;
    flex: none;
    inline-size: 64px;
    block-size: 64px;
    place-items: center;
    border-radius: 16px;
    background: var(--nv-invoice-well);
    color: var(--nv-invoice-text);
    font-size: var(--nv-type-title-2-size, 20px);
    font-weight: var(--nv-type-weight-semibold, 600);
    line-height: 1;
  }

  .nv-o-invoice[data-accent] .nv-o-invoice__mark:not(.nv-o-invoice__placeholder) {
    background: color-mix(in srgb, var(--nv-invoice-accent) 16%, var(--nv-invoice-sheet));
    color: var(--nv-invoice-accent);
  }

  .nv-o-invoice__mark.nv-o-invoice__placeholder {
    font-size: var(--nv-type-caption-size, 11px);
    font-weight: var(--nv-type-weight-medium, 500);
  }

  .nv-o-invoice__title {
    color: var(--nv-invoice-accent);
    font-size: var(--nv-type-title-1-size, 24px);
    font-weight: var(--nv-type-title-1-weight, 600);
    line-height: var(--nv-type-title-1-line, 32px);
    letter-spacing: var(--nv-type-title-1-tracking, -.019em);
  }

  /* Meta: one line each, "Label: value", small and quiet under the title. */
  .nv-o-invoice__meta { display: grid; gap: 2px; }

  .nv-o-invoice__meta-item {
    display: flex;
    min-inline-size: 0;
    gap: 6px;
    color: var(--nv-invoice-tertiary);
    font-size: var(--nv-type-footnote-size, 12px);
    line-height: var(--nv-type-footnote-line, 16px);
    letter-spacing: var(--nv-type-footnote-tracking, 0);
  }

  .nv-o-invoice__meta-item dt { flex: none; white-space: nowrap; }

  .nv-o-invoice__meta-value {
    overflow-wrap: anywhere;
    color: var(--nv-invoice-secondary);
    font-variant-numeric: var(--nv-type-numeric-figures, tabular-nums lining-nums);
  }

  /* Parties: From and To share one grid line. */
  .nv-o-invoice__parties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .nv-o-invoice__party { display: grid; align-content: start; gap: 2px; min-inline-size: 0; }
  .nv-o-invoice .nv-o-invoice__party .nv-o-invoice__label { margin-block-end: 6px; }

  .nv-o-invoice__party-name {
    overflow-wrap: anywhere;
    color: var(--nv-invoice-text);
    font-size: var(--nv-type-headline-size, 15px);
    font-weight: var(--nv-type-headline-weight, 600);
    line-height: var(--nv-type-headline-line, 20px);
    letter-spacing: var(--nv-type-headline-tracking, -.009em);
  }

  .nv-o-invoice__party-line {
    overflow-wrap: anywhere;
    color: var(--nv-invoice-secondary);
    font-size: var(--nv-type-callout-size, 13px);
    line-height: var(--nv-type-callout-line, 18px);
    letter-spacing: var(--nv-type-callout-tracking, -.003em);
  }

  .nv-o-invoice__party-line--address { white-space: pre-line; }

  /* Items: plain muted head row; lines are separated by space only. */
  .nv-o-invoice__items {
    inline-size: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
  }

  .nv-o-invoice__th {
    padding: 0 12px 8px;
    color: var(--nv-invoice-tertiary);
    font-size: var(--nv-type-footnote-size, 12px);
    font-weight: var(--nv-type-weight-medium, 500);
    line-height: var(--nv-type-footnote-line, 16px);
    text-align: start;
    white-space: nowrap;
  }

  .nv-o-invoice__th:first-child,
  .nv-o-invoice__cell:first-child { padding-inline-start: 0; }
  .nv-o-invoice__th:last-child,
  .nv-o-invoice__cell:last-child { padding-inline-end: 0; }

  .nv-o-invoice__cell {
    padding: 12px;
    vertical-align: top;
    color: var(--nv-invoice-secondary);
    font-size: var(--nv-type-body-size, 14px);
    line-height: var(--nv-type-body-line, 20px);
    letter-spacing: var(--nv-type-body-tracking, -.006em);
  }

  .nv-o-invoice__cell--description { inline-size: 100%; color: var(--nv-invoice-text); }
  .nv-o-invoice__description { display: block; overflow-wrap: anywhere; white-space: pre-line; }

  .nv-o-invoice__cell--num {
    font-variant-numeric: var(--nv-type-numeric-figures, tabular-nums lining-nums);
    text-align: end;
    white-space: nowrap;
  }

  .nv-o-invoice__cell--amount {
    color: var(--nv-invoice-text);
    font-weight: var(--nv-type-weight-medium, 500);
  }

  /* Totals: a right column; Total is the one display number on the sheet. */
  .nv-o-invoice__totals {
    display: grid;
    inline-size: min(100%, 360px);
    justify-self: end;
    gap: 8px;
  }

  .nv-o-invoice__total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    color: var(--nv-invoice-secondary);
    font-size: var(--nv-type-callout-size, 13px);
    line-height: var(--nv-type-callout-line, 18px);
    letter-spacing: var(--nv-type-callout-tracking, -.003em);
  }

  .nv-o-invoice__total-row dd {
    color: var(--nv-invoice-text);
    font-variant-numeric: var(--nv-type-numeric-figures, tabular-nums lining-nums);
    text-align: end;
    white-space: nowrap;
  }

  .nv-o-invoice__total-row--grand {
    align-items: center;
    margin-block-start: 8px;
    color: var(--nv-invoice-text);
    font-size: var(--nv-type-headline-size, 15px);
    font-weight: var(--nv-type-headline-weight, 600);
    line-height: var(--nv-type-headline-line, 20px);
  }

  .nv-o-invoice__total-row--grand dd {
    font-size: var(--nv-type-numeric-display-size, 32px);
    font-weight: var(--nv-type-numeric-display-weight, 600);
    line-height: var(--nv-type-numeric-display-line, 40px);
    letter-spacing: var(--nv-type-numeric-display-tracking, -.025em);
  }

  .nv-o-invoice[data-accent] .nv-o-invoice__total-row--grand dd { color: var(--nv-invoice-accent); }

  /* Inclusive tax is only stated: quieter than the rows that add up. */
  .nv-o-invoice__total-row--included,
  .nv-o-invoice__total-row--included dd { color: var(--nv-invoice-tertiary); }

  .nv-o-invoice__total-row--equivalent { justify-content: flex-end; }

  .nv-o-invoice__total-row--equivalent dd {
    color: var(--nv-invoice-tertiary);
    font-size: var(--nv-type-footnote-size, 12px);
    line-height: var(--nv-type-footnote-line, 16px);
    white-space: normal;
  }

  .nv-o-invoice__total-row--balance {
    color: var(--nv-invoice-text);
    font-size: var(--nv-type-body-size, 14px);
    font-weight: var(--nv-type-weight-semibold, 600);
    line-height: var(--nv-type-body-line, 20px);
  }

  /* Footer: payment details and the note side by side, stacked when narrow. */
  .nv-o-invoice__footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .nv-o-invoice__footer--qr { grid-template-columns: repeat(2, minmax(0, 1fr)) max-content; }

  .nv-o-invoice__block { display: grid; align-content: start; gap: 8px; min-inline-size: 0; }

  .nv-o-invoice__block--qr { grid-column: -2 / -1; justify-items: center; gap: 6px; }

  .nv-o-invoice__qr-code {
    display: block;
    inline-size: 88px;
    block-size: 88px;
    border-radius: 8px;
  }
  .nv-o-invoice__details { display: grid; gap: 4px; }

  .nv-o-invoice__detail {
    display: grid;
    grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
    gap: 12px;
    font-size: var(--nv-type-callout-size, 13px);
    line-height: var(--nv-type-callout-line, 18px);
    letter-spacing: var(--nv-type-callout-tracking, -.003em);
  }

  .nv-o-invoice__detail dt { color: var(--nv-invoice-tertiary); }

  .nv-o-invoice__detail dd {
    overflow-wrap: anywhere;
    color: var(--nv-invoice-text);
    font-variant-numeric: var(--nv-type-numeric-figures, tabular-nums lining-nums);
  }

  .nv-o-invoice__copy {
    overflow-wrap: anywhere;
    color: var(--nv-invoice-secondary);
    font-size: var(--nv-type-callout-size, 13px);
    line-height: var(--nv-type-callout-line, 18px);
    letter-spacing: var(--nv-type-callout-tracking, -.003em);
    white-space: pre-line;
  }

  @container nv-invoice (max-width: 560px) {
    .nv-o-invoice__sheet { gap: 32px; padding: 24px; }
    .nv-o-invoice__head { gap: 16px; }
    .nv-o-invoice__mark { inline-size: 48px; block-size: 48px; border-radius: 12px; }
    .nv-o-invoice__logo { max-inline-size: 112px; max-block-size: 40px; }
    .nv-o-invoice__parties,
    .nv-o-invoice__footer { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .nv-o-invoice__block--qr { grid-column: auto; justify-items: start; }

    /* Lines stack: description on its own row, then qty · price · tax on the left and the amount on the right. */
    .nv-o-invoice__items thead { display: none; }
    .nv-o-invoice__items,
    .nv-o-invoice__items tbody { display: grid; }
    .nv-o-invoice__items tbody { gap: 16px; }
    .nv-o-invoice__row {
      display: grid;
      grid-template-columns: repeat(3, max-content) minmax(0, 1fr);
      align-items: baseline;
      column-gap: 12px;
    }
    .nv-o-invoice__cell { padding: 0; }
    .nv-o-invoice__cell--description { grid-column: 1 / -1; margin-block-end: 2px; }
    .nv-o-invoice__row .nv-o-invoice__cell--num:not(.nv-o-invoice__cell--amount) {
      color: var(--nv-invoice-tertiary);
      font-size: var(--nv-type-footnote-size, 12px);
      line-height: var(--nv-type-footnote-line, 16px);
      text-align: start;
    }
    .nv-o-invoice__row .nv-o-invoice__cell--num:not(.nv-o-invoice__cell--amount)::before { content: attr(data-label) " "; }
    .nv-o-invoice__row .nv-o-invoice__cell--amount { grid-column: -2; }
    .nv-o-invoice__totals { inline-size: 100%; }
    .nv-o-invoice__total-row--grand dd {
      font-size: var(--nv-type-numeric-title-size, 22px);
      line-height: var(--nv-type-numeric-title-line, 28px);
      letter-spacing: var(--nv-type-numeric-title-tracking, -.02em);
    }
  }

  /* Placeholders sit last so they win over every value colour above. */
  .nv-o-invoice .nv-o-invoice__sheet .nv-o-invoice__placeholder { color: var(--nv-invoice-placeholder); }

  /* Status pill for the page around the sheet. Paid and Overdue carry a soft tone; the rest stay neutral. */
  .nv-o-invoice-status {
    --nv-invoice-status-tone: var(--nv-text-secondary, rgb(238 238 238 / .7));
    display: inline-flex;
    block-size: 24px;
    align-items: center;
    padding-inline: 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--nv-invoice-status-tone) 14%, transparent);
    color: var(--nv-invoice-status-tone);
    font-size: var(--nv-type-footnote-size, 12px);
    font-weight: var(--nv-type-weight-medium, 500);
    line-height: 1;
    white-space: nowrap;
  }

  .nv-o-invoice-status--paid { --nv-invoice-status-tone: var(--nv-feedback-success, #6eb8a0); }
  .nv-o-invoice-status--overdue { --nv-invoice-status-tone: var(--nv-feedback-error, #ef4444); }

  @media print {
    .nv-o-invoice { max-inline-size: none; border: 0; border-radius: 0; }
  }
}
