/* Print Styles - Hide UI controls when printing from main page */

@media print {
  /* Hide all non-print elements */
  .no-print,
  .print-controls,
  .print-select-label,
  header,
  nav,
  #uploadBtn,
  #uAttendFile,
  #clientSearch,
  #clientSearchResults,
  .add-row,
  .add-retro,
  .toggle-retro,
  .delete-row,
  button,
  input[type="file"] {
    display: none !important;
  }

  /* Remove shadows and rounded corners */
  .invoice-block {
    box-shadow: none !important;
    border-radius: 0 !important;
    page-break-after: always;
  }

  .invoice-block:last-child {
    page-break-after: auto;
  }

  /* Remove background colors that don't print well */
  body {
    background: white !important;
  }

  /* Ensure content prints from top */
  #mainContent {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* Make inputs look like text */
  input {
    border: none !important;
    background: transparent !important;
  }

  /* Ensure proper page breaks */
  table {
    page-break-inside: auto;
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  thead {
    display: table-header-group;
  }

  tfoot {
    display: table-footer-group;
  }
}

/* Screen-only: Style the print checkbox labels */
@media screen {
  .print-select-label {
    cursor: pointer;
    transition: opacity 0.2s;
  }

  .print-select-label:hover {
    opacity: 0.8;
  }

  .print-select-checkbox:checked + span {
    color: #16a34a;
    font-weight: 600;
  }

  /* Highlight selected invoices */
  .invoice-block:has(.print-select-checkbox:checked) {
    outline: 3px solid #22c55e;
    outline-offset: -3px;
  }
}
