/**
 * @file
 * Invoice theme print styles.
 */

/* Print Settings */
@page {
  size: A4;
  margin: 15mm;
}

@media print {
  /* Hide unnecessary elements */
  body * {
    visibility: hidden;
  }
  
  .invoice-container,
  .invoice-container * {
    visibility: visible;
  }
  
  /* Reset for print */
  .invoice-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    background: white;
  }
  
  /* Hide action buttons */
  .invoice-actions,
  .action-button,
  .no-print {
    display: none !important;
  }
  
  /* Optimize for black and white printing */
  .company-name,
  .info-value,
  .total-value,
  .final-total {
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  /* Ensure table borders print */
  .items-table th,
  .items-table td {
    border: 1px solid #000 !important;
  }
  
  .items-table thead {
    background: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  /* Remove backgrounds for better printing */
  .invoice-info-grid,
  .payment-section,
  .uuid-display {
    background: none !important;
    border: 1px solid #000 !important;
  }
  
  /* Add print date */
  .print-date::after {
    content: "Printed: " attr(data-date);
    display: block;
    font-size: 10px;
    color: #666;
    text-align: center;
    margin-top: 10px;
  }
  
  /* Page breaks */
  .page-break {
    page-break-before: always;
  }
  
  /* Avoid breaking inside important elements */
  .items-table,
  .totals-section,
  .payment-section {
    page-break-inside: avoid;
  }
}