/* PDF Generation Styles */

@media print {
  .page-break {
    page-break-before: always;
    break-before: page;
  }
}

.pdf-avoid-break {
  break-inside: avoid;
  page-break-inside: avoid;
}

.section-header {
  break-after: avoid;
  page-break-after: avoid;
}

.pdf-line-field {
  display: flex;
  align-items: flex-end;
  min-height: 20px;
  border-bottom: 1px solid #6c757d;
  overflow: hidden;
}

.pdf-line-field--multiline {
  min-height: 2.5em;
}

.pdf-line-value {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0 0.25rem;
  color: #212529;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.pdf-line-value--multiline {
  white-space: normal;
  max-height: 2.5em;
}

.pdf-item-group {
  width: 100%;
}

.pdf-item-group-header,
.pdf-item-group-row {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.pdf-item-group-cell {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  padding-right: 0.5rem;
}

.pdf-item-group-cell--compact {
  flex: 0 0 auto;
}

.pdf-item-group-cell > .d-flex,
.pdf-item-group-cell > .d-inline-flex {
  flex: 1 1 auto;
}

.pdf-item-group-cell > .pdf-line-field {
  width: 100%;
  margin-top: auto;
}

.pdf-item-group-row + .pdf-item-group-row {
  border-top: 2px solid transparent;
}

.pdf-field-row {
  min-width: 0;
}

.pdf-field-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pdf-signature-block {
  margin-top: 0.5rem;
}

.table th,
.table td,
.section-content {
  overflow-wrap: anywhere;
}

.attachment-page {
  padding: 1rem;
}

.attachment-header {
  margin-bottom: 1rem;
  border-bottom: 2px solid #77bb41;
  padding-bottom: 0.5rem;
}

.attachment-header h2 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.attachment-header p {
  font-size: 0.85rem;
  margin-bottom: 0;
}

.animal-group-section {
  margin-bottom: 1.25rem;
}

.group-info {
  background-color: #f8f9fa;
  border-left: 4px solid #77bb41;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.group-info h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.group-info .row {
  font-size: 0.85rem;
}

.table-bordered {
  border: 1px solid #dee2e6;
  margin-bottom: 0;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid #dee2e6;
  padding: 0.25rem 0.4rem;
  font-size: 0.8rem;
  line-height: 1.2;
}

.table thead {
  background-color: #e9ecef;
}

.table-sm th,
.table-sm td {
  padding: 0.2rem 0.3rem;
  font-size: 0.8rem;
}
