/* =================================
   Print Stylesheet - Order Packet
   ================================= */

@media print {
  /* Hide navigation */
  .navbar {
    display: none !important;
  }

  /* Reset body padding (remove space for hidden navbar) */
  body {
    padding: 0 !important;
    background: white !important;
    color: black !important;
  }

  /* Make the Order Packet card printer-friendly */
  .form-card-container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }

  .form-card-container .modal-content {
    background: white !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .form-card-container .modal-header {
    background: white !important;
    border: none !important;
    padding: 8px 0 !important;
  }

  .form-card-container .modal-title {
    display: none !important;
  }

  .form-card-container .modal-body {
    padding: 16px 0 !important;
  }

  /* Hide the form, keep only QR code */
  .form-card-container form {
    display: none !important;
  }

  /* Style the QR code section for print */
  #web-qr-code {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    padding: 8px 16px !important;
    margin: 0 !important;
    background: white !important;
    border: 1px solid black !important;
    box-sizing: border-box !important;
    z-index: 9999;
    text-align: left !important;
  }

  #web-qr-code .inline-block {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: white !important;
  }

  #web-qr-code .mt-sm {
    display: block !important;
    margin: 0 !important;
    font-weight: bold !important;
    font-size: 14px !important;
    color: black !important;
  }

  #web-qr-code canvas {
    display: block !important;
    background: white !important;
    width: 80px !important;
    height: 80px !important;
  }

  /* Hide the link wrapper in print to show only canvas */
  #web-qr-code a {
    display: contents !important;
  }

  /* QRCode library creates both canvas and img - show only canvas, hide img */
  #web-qr-code .inline-block > img {
    display: none !important;
  }

  /* Reset all colors to black/white except images */
  * {
    background: white !important;
    color: black !important;
    border-color: black !important;
    box-shadow: none !important;
  }

  /* Preserve QR code images and product images */
  img, canvas {
    background: white !important;
  }

  /* Products grid - one product per row */
  .products-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin: 0 !important;
    gap: 0 !important;
    row-gap: 0 !important;
  }

  /* Product cards - full width, clean layout */
  .product-card {
    page-break-inside: avoid;
    border: 1px solid black !important;
    padding: 12px !important;
    margin: 0 0 4px 0 !important;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Product card flex container */
  .product-card > .flex {
    display: flex !important;
    flex-direction: row !important;
    gap: 16px !important;
    align-items: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Product image section - smaller for 3 columns */
  .product-card .flex-shrink-0 {
    flex-shrink: 0 !important;
    max-width: 150px !important;
  }

  .product-card .flex-shrink-0 img {
    max-width: 150px !important;
    height: auto !important;
  }

  /* Field labels */
  .field-label {
    font-weight: bold !important;
    color: black !important;
    margin-bottom: 4px !important;
  }

  /* Product details in THREE COLUMNS */
  .product-card .form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 4px 12px !important;
    flex: 1 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .product-card .form-group {
    display: block !important;
    margin-bottom: 4px !important;
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
  }

  .product-card .form-group > div {
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
  }

  /* QR code links */
  a {
    color: black !important;
    text-decoration: none !important;
  }

  /* Hide any buttons or interactive elements */
  button {
    display: none !important;
  }

  /* Page margins to account for fixed header */
  @page {
    margin-top: 110px;
  }

  .products-grid {
    padding-top: 100px !important;
  }
}
