/* TWS CRM – Public Invoice Styles */

.tws-invoice-page {
    background: #f3f4f6;
    padding: 2rem 1rem;
}

.tws-invoice-card {
    max-width: 920px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    padding: 2rem;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
}

.tws-invoice-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.tws-invoice-brand {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.tws-invoice-logo {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #ff4d00;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
}

.tws-invoice-brand-text h1 {
    font-size: 1.2rem;
    margin: 0 0 0.25rem 0;
}

.tws-invoice-brand-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.tws-invoice-meta {
    min-width: 220px;
    text-align: right;
}

.tws-invoice-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.tws-invoice-meta-label {
    color: #6b7280;
}

.tws-invoice-meta-value {
    font-weight: 600;
}

.tws-invoice-status-badge {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tws-status-draft {
    background: #e5e7eb;
    color: #374151;
}

.tws-status-sent {
    background: #dbeafe;
    color: #1d4ed8;
}

.tws-status-paid {
    background: #dcfce7;
    color: #166534;
}

.tws-status-cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.tws-invoice-section {
    margin-bottom: 1.5rem;
}

.tws-invoice-section h2 {
    font-size: 1rem;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.tws-invoice-section--split {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.tws-invoice-subsection {
    flex: 1 1 260px;
}

.tws-invoice-client-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tws-invoice-muted {
    color: #9ca3af;
    font-size: 0.9rem;
}

.tws-invoice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tws-invoice-table thead tr {
    background: #f9fafb;
}

.tws-invoice-table th,
.tws-invoice-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: right;
}

.tws-invoice-table th.tws-col-desc,
.tws-invoice-table td.tws-col-desc {
    text-align: left;
    width: 50%;
}

.tws-invoice-table th.tws-col-qty,
.tws-invoice-table td.tws-col-qty {
    width: 10%;
}

.tws-invoice-table th.tws-col-unit,
.tws-invoice-table td.tws-col-unit {
    width: 20%;
}

.tws-invoice-table th.tws-col-total,
.tws-invoice-table td.tws-col-total {
    width: 20%;
}

.tws-invoice-summary {
    display: flex;
    justify-content: flex-end;
}

.tws-invoice-summary-inner {
    width: 100%;
    max-width: 320px;
}

.tws-invoice-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.tws-invoice-summary-row span:first-child {
    color: #6b7280;
}

.tws-invoice-summary-row--total {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
}

.tws-invoice-summary-row--highlight {
    margin-top: 0.5rem;
    background: #fff7ed;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.tws-invoice-actions {
    text-align: center;
}

.tws-invoice-callout {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.tws-invoice-button {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    background: #ff4d00;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}

.tws-invoice-button:hover {
    filter: brightness(0.95);
}

.tws-invoice-paid-note {
    font-size: 0.95rem;
    color: #16a34a;
    font-weight: 600;
}

.tws-invoice-footer {
    margin-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
}

/* === LOCK DOWN PUBLIC INVOICE PAGE (hide site chrome) === */
body.single-tws_invoice header,
body.single-tws_invoice nav,
body.single-tws_invoice footer{
  display: none !important;
}
body.single-tws_invoice{
  padding-top: 0 !important;
  margin-top: 0 !important;
}


/* Responsive tweaks */
@media (max-width: 640px) {
    .tws-invoice-card {
        padding: 1.25rem;
    }

    .tws-invoice-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .tws-invoice-meta {
        text-align: left;
    }
}

/* === Review Footer (TRUE footer, not sticky) === */
.tws-review-sticky{
  position: static;      /* was fixed */
  margin-top: 18px;
  padding: 12px 14px;
  background: #111;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.tws-review-sticky__inner{
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.tws-review-sticky__text{
  min-width: 0;
}

.tws-review-sticky__headline{
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.tws-review-sticky__subtext{
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.2;
  color: rgba(255,255,255,0.85);
}

.tws-review-sticky__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ff7a00;
  color: #111;
  white-space: nowrap;
}

.tws-review-sticky__btn:hover{
  filter: brightness(1.03);
}

/* Remove the old "make room" padding hack */
body{
  padding-bottom: 0;
}

/* Mobile layout */
@media (max-width: 720px){
  .tws-review-sticky__inner{
    flex-direction: column;
    align-items: stretch;
  }
  .tws-review-sticky__btn{
    width: 100%;
  }
  body{
    padding-bottom: 0;
  }
}


.tws-review-sticky__inner{
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.tws-review-sticky__text{
  min-width: 0;
}

.tws-review-sticky__headline{
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.tws-review-sticky__subtext{
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.2;
  color: rgba(255,255,255,0.85);
}

.tws-review-sticky__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ff7a00;
  color: #111;
  white-space: nowrap;
}

.tws-review-sticky__btn:hover{
  filter: brightness(1.03);
}


