/**
 * Whānau Link · Invoice Body Styles (shared between PDF and web view)
 * Used by: invoicepdf.tpl, clientareaviewinvoice.tpl
 */

/* === Fonts === */
body {
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  color: #1a1320;
  line-height: 1.5;
}

.h, h1, h2, h3, h4, h5, h6, .h-display {
  font-family: 'Helvena', sans-serif;
}

/* === Reset === */
* {
  box-sizing: border-box;
}

table {
  border-collapse: collapse;
}

/* === Masthead === */
.masthead {
  width: 100%;
  border-bottom: 2px solid #1a1320;
}

.masthead td {
  padding: 0 0 10px;
  vertical-align: bottom;
}

.masthead td.r,
.masthead td.right {
  text-align: right;
}

.masthead .logo-img {
  height: 42px;
  width: auto;
  display: block;
}

.brand {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 26px;
  line-height: 1;
  margin: 0;
}

.brand .pill {
  background: #ec2073;
  color: #ffffff;
  border-radius: 999px;
  padding: 3px 10px 4px;
  font-size: 15px;
  margin-left: 4px;
}

.brand-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #4a3d52;
}

.doctype {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  color: #ec2073;
  margin: 0 0 4px;
}

.docno {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 21px;
  line-height: 1;
  margin: 0;
}

/* === Hero === */
.hero {
  width: 100%;
  border-bottom: 1px solid #e8dde5;
}

.hero td {
  padding: 16px 0 14px;
  vertical-align: bottom;
}

.hero td.r,
.hero td.right {
  text-align: right;
}

.hero h1 {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  letter-spacing: -0.035em;
  font-size: 32px;
  line-height: 0.95;
  margin: 0;
  max-width: 380px;
}

.amount {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-size: 52px;
  line-height: 0.85;
  color: #1a1320;
  white-space: nowrap;
}

.amount .currency {
  font-size: 20px;
  color: #4a3d52;
  vertical-align: super;
  margin-right: 4px;
}

.amount .cents {
  font-size: 22px;
  color: #ec2073;
  vertical-align: super;
  margin-left: 2px;
}

/* === Status tags === */
.tag {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  font-size: 12px;
}

.tag .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.tag-paid,
.tag.paid {
  background: #e7f6ee;
  color: #1f8a5b;
}

.tag.paid .dot {
  background: #1f8a5b;
}

.tag-unpaid,
.tag.unpaid {
  background: #fbf7ee;
  color: #1a1320;
  border: 1px solid #1a1320;
}

.tag.unpaid .dot {
  background: #1a1320;
}

.tag-overdue,
.tag.overdue {
  background: #ec2073;
  color: #ffffff;
}

.tag.overdue .dot {
  background: #ffffff;
}

.tag-cancelled,
.tag.cancelled {
  background: #ece8ef;
  color: #4a3d52;
}

.tag.cancelled .dot {
  background: #4a3d52;
}

/* === Metagrid === */
.metagrid {
  width: 100%;
  border-bottom: 1px solid #e8dde5;
}

.metagrid td {
  width: 25%;
  padding: 12px 20px 14px 0;
  vertical-align: top;
}

.metagrid td:last-child {
  padding-right: 0;
}

.metagrid h5 {
  margin: 0 0 6px;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  color: #ec2073;
}

.v {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.vs {
  font-size: 12px;
  color: #4a3d52;
  line-height: 1.5;
  margin: 0;
}

.vs b {
  color: #1a1320;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
}

/* === Section header === */
.section-h {
  margin: 12px 0 6px;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  color: #1a1320;
}

/* === Line items table === */
.lines {
  width: 100%;
}

.lines th {
  text-align: left;
  padding: 0 0 8px;
  border-bottom: 1px solid #e8dde5;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a3d52;
}

.lines th.r {
  text-align: right;
}

.lines td {
  padding: 8px 0;
  border-bottom: 1px solid #e8dde5;
  vertical-align: top;
  font-size: 13px;
}

.lines td.r {
  text-align: right;
  white-space: nowrap;
}

.lines td.amt {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  font-size: 15px;
}

.lines .t {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
  margin: 0 0 2px;
}

.lines .s {
  color: #4a3d52;
  font-size: 12px;
  margin: 0;
}

/* === Totals === */
.totals-row {
  width: 100%;
}

.totals-row > tbody > tr > td {
  padding: 12px 0 0;
  vertical-align: top;
}

.totals-row td.note {
  padding-right: 40px;
}

.totals-row td.r,
.totals-row td.right {
  width: 270px;
}

.note .te-reo {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1a1320;
  font-size: 18px;
  margin: 0 0 4px;
}

.note p {
  margin: 0;
  font-size: 13px;
  color: #4a3d52;
  line-height: 1.55;
}

.note b {
  color: #1a1320;
}

.totals {
  width: 100%;
}

.totals td {
  padding: 6px 0;
  font-size: 13px;
  border-top: 1px solid #e8dde5;
}

.totals tr:first-child td {
  border-top: 0;
}

.totals td.l {
  color: #4a3d52;
}

.totals td.v {
  text-align: right;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
}

.totals tr.grand td {
  border-top: 2px solid #1a1320;
  padding-top: 10px;
}

.totals tr.grand td.l {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  color: #1a1320;
  font-size: 17px;
}

.totals tr.grand td.v {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: #1a1320;
}

.credit {
  color: #ec2073;
}

/* === Payment box === */
.paybox {
  margin-top: 14px;
  padding: 12px 18px;
  border: 1px solid #1a1320;
}

.paybox table {
  width: 100%;
}

.paybox td {
  vertical-align: top;
  padding-right: 22px;
}

.paybox td:last-child {
  padding-right: 0;
}

.paybox h5 {
  margin: 0 0 6px;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  color: #ec2073;
}

.paybox p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.paybox b {
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
}

.paybox .small {
  color: #4a3d52;
  font-size: 12px;
}

/* === Footer === */
.foot {
  width: 100%;
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid #e8dde5;
  font-size: 11px;
  color: #4a3d52;
}

.foot td.r,
.foot td.right {
  text-align: right;
}
