@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@200;300;400;500;600;700;800;900;1000&family=Nunito:wght@200;300;400;500;600;700;800;900;1000&family=Sen:wght@400;700;800&display=swap');

/* Body Styles for Invoice Pages */
body {
  background: #000000;
  font-family: 'Nunito Sans';
  margin: 0;
  padding: 0;
}
.page--invoice {
  background: #000000;
  padding: var(--invoice-spacing-md);
  min-height: 100vh;
  margin: 0;
}

/* Invoice Container */
.invoice-container {
  width: 26%;
  margin: 0 auto;
  background: #ffffff;
  padding: 12px 24px 12px 24px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid #ddd;
  position: relative;
}

/* Header */
.invoice-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #ddd
}

.company-name {
  font-size: 24px;
  padding: 0px 40px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: var(--invoice-spacing-sm);
  color: var(--invoice-black);
  line-height: 1;
}

.company-details {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.company-details img{
  width: 120px;
  height: 80px;
  margin-bottom: 8px
}
.company-details div {
}

/* Invoice Information Grid */
.invoice-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--invoice-spacing-lg);
  margin: var(--invoice-spacing-xl) 0;
  padding: var(--invoice-spacing-lg);
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 5px solid var(--invoice-black);
  
}
.info-grid{
  border-bottom: var(--invoice-border);  
}
.info-item {
  display: flex;
  margin: 6px 0px 6px 0px;
  justify-content: space-between;
}
.info-item:last-child {
  padding: 0px 0px 8px 0px;
}

.info-label {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #000000;
}

.info-value {
  font-size: 16px;
  font-weight: 600;
  color: #666666;
}

/* Items Table */
.items-table-container {
  margin: var(--invoice-spacing-xl) 0;
  overflow: hidden;
  border-radius: 6px;
  border: var(--invoice-border-light);
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border-bottom: 2px solid #ddd;
}

.items-table thead {
  background: #000000;
  color: #ffffff;
}

.items-table th {
  padding: 6px 12px;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
}

.items-table tbody tr {
  transition: background 0.2s ease;
}

.items-table tbody {
  background: #fafafa;
}

.items-table tbody tr:hover {
  background: #f0f0f0;
}

.items-table td {
  padding: 10px 6px;
  font-weight: 500;
  font-size: 13px;
}

.items-table td:nth-child(2) {
  text-align: center;
}

.items-table td:nth-child(3),
.items-table td:nth-child(4) {
  text-align: left;
  font-weight: normal;
}

/* Totals Section */
.totals-section {
  border-top: var(--invoice-border);
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 15px;
}

.total-row:last-child {

}

.total-label {
  font-weight: normal;
  color: var(--invoice-dark);
}

.total-value {
  font-weight: 600;
}

.discount-row .total-value {
  color: var(--invoice-red);
  font-weight: 700;
}

.final-total {
  font-size: 15px;
  font-weight: 900;
  border-top: 3px solid var(--invoice-black);
  border-bottom: 3px solid var(--invoice-black);
  color: var(--invoice-black);
}

/* Payment Section */
.payment-section {
  border-radius: 8px;
}

/* Footer */
.invoice-footer {
  text-align: center;
  color: var(--invoice-gray);
  border-top: 2px solid #ddd;
  padding-top: 18px;
}

.footer-message {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: var(--invoice-spacing-sm);
  color: var(--invoice-black);
}

.footer-note {
  font-size: 12px;
  margin: 6px 0;
}

.footer-developer {
  font-style: italic;
  color: var(--invoice-gray);
  margin-top: var(--invoice-spacing-md);
  font-size: 12px;
}

.uuid-display {
  font-size: 11px;
  color: #888;
  margin-top: var(--invoice-spacing-lg);
  padding: var(--invoice-spacing-md);
  background: #f9f9f9;
  border-radius: 4px;
  word-break: break-all;
  border: 1px dashed #ddd;
}

/* Action Buttons */
.invoice-actions {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.action-button {
  padding: 14px 28px;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#block-invoice-theme-page-title{
    display: none;
}

.print-button {
  background: linear-gradient(135deg, var(--invoice-blue) 0%, #0b7dda 100%);
  color: white;
}

.print-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3);
}

.download-button {
  background: linear-gradient(135deg, var(--invoice-green) 0%, #45a049 100%);
  color: white;
}

.download-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.company-phone{
    font-size: 14px;
    font-weight: normal;
    color: #666666;
}

.company-website{
    font-size: 15px;
    font-weight: normal;
    color: #666666;
}

/* Invoice Container */
.invoice-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: white;
  font-family: 'Arial', sans-serif;
  color: #333;
}

/* Header */
.invoice-header {
  text-align: center;
  /* margin-bottom: 30px; */
  /* padding-bottom: 20px; */
  border-bottom: 2px solid #3d3d3d;
}

.company-details img {
  max-width: 150px;
  margin-bottom: 15px;
}

.company-address {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 5px;
}

.company-phone, .company-email, .company-website {
  color: #666;
  font-size: 14px;
  margin: 2px 0;
}

/* Invoice Info */
.invoice-info {
  background: #f8f9fa;
  /* padding: 15px; */
  border-radius: 8px;
  margin-bottom: 20px;
}

.info-grid {
  display: grid;
  /* grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); */
  /* gap: 10px; */
}

.info-item {
  display: flex;
  justify-content: space-between;
}

.info-label {
  font-weight: 500;
  color: #555;
}

.info-value {
  color: #333;
  font-weight: 500;
}

/* Items Table */
.items-table-wrapper {
  margin: 0px;
  overflow-x: auto;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.items-table th {
  background: #333;
  color: white;
  padding: 12px;
  text-align: left;
  font-weight: normal;
}

.items-table td {
  /* padding: 10px; */
  border-bottom: 1px solid #eee;
}

.items-table tbody tr:hover {
  background: #f9f9f9;
}

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Totals Section */
.totals-section {
  background: #f8f9fa;
  padding: 0px;
  border-radius: 8px;
  /* margin: 20px 0; */
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 16px;
  font-weight: normal;
}

.total-label {
  color: #555;
}

.total-value {
  font-weight: 600;
  color: #000000;
}

/* Discount Styling */
.discount-row.highlight {
  color: #333333;
  font-weight: bold;
  /* background: #fff8e1; */
  /* padding: 10px; */
  /* border-radius: 5px; */
  /* margin: 5px 0; */
}

.discount-value {
  color: #ff9800;
  font-weight: bold;
}

.discount-icon {
  margin-right: 8px;
}

.discount-percentage .percentage {
  color: #666;
  font-size: 13px;
  font-style: italic;
}

/* Tax */
.tax-row {
  color: #666;
}

/* Divider */
.total-divider {
  height: 1px;
  /* background: #ddd; */
  /* margin: 15px 0; */
}

/* Final Total */
.final-total.highlight {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  border-top: 2px solid #F2F2F2;
  padding-top: 15px;
  margin-top: 10px;
}

/* Payment Section */
.payment-section {
  /* background: #e8f5e9; */
  /* padding: 20px; */
  /* border-radius: 8px; */
  /* margin: 20px 0; */
}

.payment-title {
  margin-top: 0;
  color: #333333;
  border-bottom: 1px solid #c8e6c9;
  padding-bottom: 10px;
}

.paid-amount {
  color: green;
  font-weight: bold;
}
.total-value-balancedue {
  color: red;
  font-weight: bold;
}

.balance-due.highlight {
  color: #333333;
  font-weight: normal;
  /* background: #ffe6e6; */
  /* padding: 10px; */
  /* border-radius: 5px; */
  /* margin-top: 10px; */
}

.fully-paid.highlight {
  color: #28a745;
  font-weight: bold;
  background: #d4edda;
  padding: 10px;
  border-radius: 5px;
  margin-top: 10px;
}

/* Notes Section */
.notes-section {
  background: #e3f2fd;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
}

.notes-title {
  color: #1565c0;
  margin-top: 0;
}

.notes-content {
  color: #555;
  line-height: 1.5;
}

/* Footer */
.invoice-footer {
  text-align: center;
  margin-top: 20px;
  /* padding-top: 20px; */
  border-top: 1px solid #eee;
  color: #666;
}

.footer-message {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.footer-contact {
  font-size: 12px;
  margin: 10px 0;
  color: #555;
}

.footer-note {
  font-style: italic;
  margin: 10px 0;
  color: #666;
}

.footer-developer {
  font-size: 12px;
  color: #999;
  margin-top: 15px;
}

/* Print Styles */
@media print {
  .invoice-container {
    padding: 0;
    max-width: 100%;
  }
  
  .invoice-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
  }
  
  button, .no-print {
    display: none !important;
  }
}

/* Print Preview */
@media screen and (max-width: 210mm) {
  .invoice-container {
    width: 95%;
    padding: 5%;
  }
  
  .invoice-info-grid {
    grid-template-columns: 1fr;
  }
  
  .invoice-actions {
    bottom: 20px;
    right: 20px;
  }
}