/* Enhanced Print Styles for MyCarChecklist */
@page {
  size: A4;
  margin: 12mm;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    background: white !important;
    color: #000 !important;
    font: 11px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  }

  /* Hide non-printable elements */
  .hero,
  .trust-strip,
  .search-section,
  .action-buttons,
  .status-message,
  .lookup-button,
  .demo-plates,
  .footer,
  .btn {
    display: none !important;
  }

  /* Results section */
  .results-section {
    display: block !important;
    background: white !important;
    padding: 0 !important;
    min-height: auto !important;
  }

  .container {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Cards */
  .card {
    background: white !important;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    padding: 12px !important;
    margin: 0 0 10px !important;
    page-break-inside: avoid;
  }

  .card-header {
    border-bottom: 1px solid #ddd !important;
    margin-bottom: 8px !important;
    padding-bottom: 6px !important;
  }

  .card-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 0 !important;
  }

  /* Badges */
  .badge {
    display: inline-block !important;
    padding: 2px 6px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    border: 1px solid #ccc !important;
  }

  .badge.success {
    background: #e6f9ec !important;
    color: #136c2e !important;
    border-color: #b8eac7 !important;
  }

  .badge.warning {
    background: #fff6e6 !important;
    color: #7a4b00 !important;
    border-color: #ffe1ad !important;
  }

  .badge.danger {
    background: #ffeaea !important;
    color: #9b1c1c !important;
    border-color: #ffcccc !important;
  }

  .badge.info {
    background: #eef6ff !important;
    color: #174ea6 !important;
    border-color: #cfe3ff !important;
  }

  /* Vehicle grid */
  .vehicle-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .vehicle-detail {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    padding: 6px !important;
  }

  .vehicle-label {
    font-size: 9px !important;
    font-weight: 500 !important;
    color: #666 !important;
    margin-bottom: 2px !important;
  }

  .vehicle-value {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #000 !important;
  }

  /* Confidence meter */
  .confidence-meter {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 8px !important;
    margin: 8px 0 !important;
  }

  .confidence-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 6px !important;
  }

  .confidence-label,
  .confidence-value {
    font-size: 11px !important;
    font-weight: 600 !important;
  }

  .confidence-bar {
    height: 8px !important;
    background: #e2e8f0 !important;
    border-radius: 4px !important;
    border: 1px solid #cbd5e1 !important;
    overflow: hidden !important;
  }

  .confidence-fill {
    height: 100% !important;
    background: #2563eb !important;
  }

  .confidence-description {
    font-size: 9px !important;
    color: #666 !important;
    margin-top: 4px !important;
  }

  /* Summary content */
  .summary-content ul,
  .ai-content ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .summary-content li,
  .ai-content li {
    padding: 3px 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
  }

  .summary-content li:last-child,
  .ai-content li:last-child {
    border-bottom: none !important;
  }

  /* Timeline */
  .timeline-list {
    display: block !important;
  }

  .timeline-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    padding: 6px !important;
    margin: 4px 0 !important;
    page-break-inside: avoid;
  }

  .timeline-item strong {
    font-size: 11px !important;
  }

  .timeline-item div {
    font-size: 9px !important;
    color: #666 !important;
  }

  /* Details elements */
  details {
    margin-top: 4px !important;
  }

  summary {
    font-size: 9px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
  }

  details ul {
    margin: 4px 0 0 10px !important;
    padding: 0 !important;
  }

  details li {
    font-size: 8px !important;
    line-height: 1.2 !important;
    margin: 2px 0 !important;
  }

  /* Badge container */
  .badge-container {
    display: flex !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
    margin-top: 6px !important;
  }

  /* Print header */
  body::before {
    content: "MyCarChecklist Report - Generated " attr(data-print-date);
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #000;
  }

  /* Print footer */
  body::after {
    content: "Report generated by MyCarChecklist • MOT data from DVSA • For guidance only - verify details before purchase";
    display: block;
    margin-top: 15px;
    padding-top: 6px;
    border-top: 1px solid #ccc;
    font-size: 8px;
    color: #666;
    text-align: center;
    page-break-inside: avoid;
  }

  /* Page breaks */
  .card {
    page-break-inside: avoid;
  }

  .timeline-item {
    page-break-inside: avoid;
  }

  /* Links */
  a {
    color: #000 !important;
    text-decoration: none !important;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8px;
    color: #666;
  }
}