/**
 * Whānau Link · Invoice Web View Styles
 * Used by: clientareaviewinvoice.tpl (client area only, not PDF)
 */

/* === View wrapper === */
body.view {
  background: #fbf7ee;
  margin: 0;
  padding: 0;
}

.view-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px;
}

/* === Action bar === */
.actionbar {
  background: #1a1320;
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.status-block {
  flex: 1;
}

.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 8px;
}

.status-pill .d {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.status-pill.paid {
  background: #1f8a5b;
  color: #fff;
}

.status-pill.paid .d {
  background: #e7f6ee;
}

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

.status-pill.unpaid .d {
  background: #1a1320;
}

.status-pill.overdue {
  background: #ec2073;
  color: #fff;
}

.status-pill.overdue .d {
  background: #fff;
}

.status-pill.cancelled {
  background: #4a3d52;
  color: #fff;
}

.status-pill.cancelled .d {
  background: #ece8ef;
}

.summary {
  margin: 0;
  font-size: 16px;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.summary small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Figtree', sans-serif;
}

.ctas {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-primary {
  background: #ec2073;
  color: #fff;
}

.btn-primary:hover {
  background: #d11a64;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* === Sheet === */
.sheet {
  background: #fff;
  padding: 32px 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(26, 19, 32, 0.08);
}

/* === Auxiliary section === */
.aux {
  margin-top: 24px;
  background: #fff;
  padding: 24px 32px;
  border-radius: 8px;
}

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

.aux .count {
  font-size: 12px;
  font-weight: 400;
  color: #4a3d52;
  margin-left: 8px;
  font-family: 'Figtree', sans-serif;
}

.txns {
  width: 100%;
}

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

.txns thead th.r {
  text-align: right;
}

.txns tbody td {
  padding: 12px 0;
  border-bottom: 1px solid #e8dde5;
  font-size: 13px;
  color: #1a1320;
}

.txns tbody td.r {
  text-align: right;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
}

.txns tbody td.method {
  color: #4a3d52;
}

.txns tbody td.ref {
  font-family: 'Helvena', sans-serif;
  font-size: 12px;
  color: #4a3d52;
}

.empty {
  padding: 32px;
  text-align: center;
  color: #4a3d52;
  font-size: 13px;
  line-height: 1.6;
}

.empty .te-reo {
  display: block;
  font-family: 'Helvena', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #1a1320;
  margin-bottom: 8px;
}

/* === Responsive === */
@media (max-width: 768px) {
  .view-wrap {
    padding: 12px;
  }

  .actionbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .ctas {
    width: 100%;
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .sheet {
    padding: 20px 16px;
  }

  .metagrid td {
    display: block;
    width: 100%;
    padding: 8px 0;
  }

  .hero h1 {
    font-size: 24px;
  }

  .amount {
    font-size: 36px;
  }

  .amount .currency {
    font-size: 16px;
  }

  .amount .cents {
    font-size: 18px;
  }

  .totals-row > tbody > tr > td {
    display: block;
    width: 100%;
  }

  .totals-row td.note {
    padding-right: 0;
    margin-bottom: 16px;
  }

  .totals-row td.right {
    width: 100%;
  }

  .paybox td {
    display: block;
    width: 100%;
    padding-right: 0;
    margin-bottom: 16px;
  }

  .paybox td:last-child {
    margin-bottom: 0;
  }
}
