/* app/styles/print.css */
@media print {
  /* Reset default styles */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12pt;
    line-height: 1.4;
    margin: 0;
    padding: 0;
  }

  /* Page settings */
  @page {
    size: A4;
    margin: 15mm;
  }

  /* Hide elements not needed for printing */
  .no-print {
    display: none !important;
  }

  /* Packing slip container */
  .packing-slip {
    page-break-after: always;
    padding: 20px 0;
  }

  .packing-slip:last-child {
    page-break-after: auto;
  }

  /* Header styling */
  .packing-slip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
  }

  .company-info h1 {
    font-size: 24pt;
    font-weight: bold;
    margin: 0 0 5px 0;
    color: #333;
  }

  .company-info p {
    margin: 0;
    color: #666;
    font-size: 10pt;
  }

  .order-info {
    text-align: right;
  }

  .order-info h2 {
    font-size: 18pt;
    margin: 0 0 10px 0;
    color: #333;
  }

  .order-info p {
    margin: 2px 0;
    font-size: 10pt;
    color: #666;
  }

  /* Shipping address */
  .shipping-section {
    margin: 30px 0;
  }

  .shipping-section h3 {
    font-size: 14pt;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
  }

  .shipping-address {
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
  }

  .shipping-address p {
    margin: 2px 0;
    font-size: 11pt;
  }

  /* Items table */
  .items-section {
    margin: 30px 0;
  }

  .items-section h3 {
    font-size: 14pt;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
  }

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

  .items-table th,
  .items-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    font-size: 10pt;
  }

  .items-table th {
    background: #f5f5f5;
    font-weight: bold;
    font-size: 9pt;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .items-table td {
    vertical-align: top;
  }

  .items-table .qty-col {
    text-align: center;
    width: 80px;
  }

  .items-table .sku-col {
    width: 120px;
    font-family: monospace;
    font-size: 9pt;
  }

  /* Barcode placeholder */
  .barcode-section {
    margin: 30px 0;
    text-align: center;
  }

  .barcode-placeholder {
    border: 2px dashed #999;
    padding: 30px;
    margin: 0 auto;
    width: 200px;
    background: #f9f9f9;
  }

  .barcode-placeholder p {
    margin: 0;
    color: #666;
    font-size: 10pt;
  }

  /* Notes section */
  .notes-section {
    margin: 20px 0;
  }

  .notes-section h3 {
    font-size: 12pt;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #333;
  }

  .notes-content {
    background: #fffacd;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 10pt;
    min-height: 40px;
  }

  /* Footer */
  .packing-slip-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 9pt;
    color: #666;
  }

  /* Utility classes */
  .text-center { text-align: center; }
  .text-right { text-align: right; }
  .font-bold { font-weight: bold; }
  .uppercase { text-transform: uppercase; }
  
  /* Responsive adjustments for smaller content */
  .items-table th,
  .items-table td {
    font-size: 9pt;
    padding: 6px 8px;
  }
}

/* Screen styles for print preview */
.print-preview {
  max-width: 210mm;
  margin: 0 auto;
  background: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.print-preview .packing-slip {
  padding: 15mm;
  min-height: 297mm;
  box-sizing: border-box;
}