/*
 * Order invoice (My Orders → Invoice). Loaded on the site for the modal and again inside the print frame,
 * so the on-screen invoice and the printed / PDF copy match.
 */
.inv {
  --inv-brand: #fd6e00;
  --inv-ink: #111111;
  --inv-muted: #6b6b6b;
  --inv-line: #e6e6e6;
  font-family: 'Inter', sans-serif;
  color: var(--inv-ink);
  font-size: 13px;
  line-height: 1.5;
  background: #fff;
}
.inv * {
  box-sizing: border-box;
}

.inv__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--inv-brand);
}
.inv__brand {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.inv__brand span {
  color: var(--inv-brand);
}
.inv__seller {
  margin-top: 6px;
  max-width: 280px;
  color: var(--inv-muted);
  font-size: 12px;
}
.inv__title {
  text-align: right;
}
.inv__title h2 {
  margin: 0 0 8px;
  color: var(--inv-brand);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
}
.inv__meta {
  margin-left: auto;
  border-collapse: collapse;
  font-size: 12px;
}
.inv__meta th {
  padding: 2px 12px 2px 0;
  color: var(--inv-muted);
  font-weight: 500;
  text-align: left;
}
.inv__meta td {
  padding: 2px 0;
  font-weight: 600;
  text-align: right;
}

.inv__parties {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--inv-line);
}
.inv__parties h3 {
  margin: 0 0 6px;
  color: var(--inv-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase !important;
}
.inv__parties p {
  margin: 0;
  font-size: 12.5px;
  word-break: break-word;
}
.inv__pay {
  font-weight: 600;
}
.inv__pay--paid {
  color: #1f9d55;
}
.inv__pay--due {
  color: #c65400;
}
.inv__pay--refunded {
  color: #6b6b6b;
}

.inv__items {
  width: 100%;
  margin: 18px 0 0;
  border-collapse: collapse;
}
.inv__items th {
  padding: 9px 10px;
  background: #f4f4f5;
  border-top: 1px solid var(--inv-line);
  border-bottom: 1px solid var(--inv-line);
  color: #333;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: left;
  text-transform: uppercase !important;
}
.inv__items td {
  padding: 10px;
  border-bottom: 1px solid var(--inv-line);
  vertical-align: top;
}
.inv__items .num {
  text-align: right;
  white-space: nowrap;
}
.inv__items th.num:first-child,
.inv__items td.num:first-child {
  width: 36px;
  text-align: center;
}
.inv__item-name {
  font-weight: 500;
}
.inv__sku {
  color: var(--inv-muted);
  font-size: 12px;
}

.inv__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-top: 16px;
}
.inv__note {
  margin: 0;
  max-width: 300px;
  color: var(--inv-muted);
  font-size: 12px;
}
.inv__totals {
  min-width: 260px;
  border-collapse: collapse;
}
.inv__totals th {
  padding: 6px 16px 6px 0;
  color: #444;
  font-weight: 500;
  text-align: left;
}
.inv__totals td {
  padding: 6px 0;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.inv__grand th,
.inv__grand td {
  padding-top: 10px;
  border-top: 2px solid var(--inv-ink);
  color: var(--inv-ink);
  font-size: 15px;
  font-weight: 800;
}
.inv__grand td {
  color: var(--inv-brand);
}
.inv__foot {
  margin: 24px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--inv-line);
  color: #999;
  font-size: 11px;
  text-align: center;
}

/* Modal on phones: stack the header and parties */
@media (max-width: 560px) {
  .inv__head,
  .inv__bottom {
    flex-direction: column;
  }
  .inv__title {
    text-align: left;
  }
  .inv__meta {
    margin-left: 0;
  }
  .inv__parties {
    grid-template-columns: 1fr;
  }
  .inv__totals {
    width: 100%;
    min-width: 0;
  }
  .inv__items th:nth-child(3),
  .inv__items td:nth-child(3) {
    display: none;
  }
}

/* Print frame: keep colours (header rule, table shading) in the PDF */
.inv-print .inv {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.inv-print .inv__items tr {
  page-break-inside: avoid;
}
