/* ==========================================================================
   open-adr-m365: Custom & High-Fidelity DIN A4 Print Stylesheet
   ========================================================================== */

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.25s ease-out forwards;
}

/* ==========================================================================
   HIGH-CONTRAST DIN A4 PRINT STYLES
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 12mm 12mm 12mm;
  }

  /* Force light-mode color-scheme in print */
  html.dark, html, body {
    color-scheme: light !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-size: 9.5pt !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .no-print {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  /* Universal print-card light mode styling */
  .print-card {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .print-card * {
    color: #0f172a !important;
    text-shadow: none !important;
  }

  /* Force all container backgrounds to white or light gray */
  .print-card div, .print-card section, .print-card article {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
  }

  /* Light crisp background for boxes and callouts */
  .print-card [class*="bg-slate"], 
  .print-card [class*="bg-surface"] {
    background-color: #f8fafc !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    color: #0f172a !important;
  }

  .print-card [class*="bg-brand"] {
    background-color: #f0f7ff !important;
    background: #f0f7ff !important;
    border: 1px solid #93c5fd !important;
    border-radius: 6px !important;
  }

  .print-card [class*="bg-amber"] {
    background-color: #fffbeb !important;
    background: #fffbeb !important;
    border: 1px solid #fcd34d !important;
    border-radius: 6px !important;
  }

  .print-card [class*="bg-purple"] {
    background-color: #faf5ff !important;
    background: #faf5ff !important;
    border: 1px solid #d8b4fe !important;
    border-radius: 6px !important;
  }

  .print-card [class*="bg-emerald"] {
    background-color: #f0fdf4 !important;
    background: #f0fdf4 !important;
    border: 1px solid #86efac !important;
    border-radius: 6px !important;
  }

  /* Headings */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  .print-card .text-brand-400, .print-card .text-indigo-400 {
    color: #1d4ed8 !important;
    font-weight: 700 !important;
  }

  .print-card .text-amber-400 {
    color: #b45309 !important;
    font-weight: 700 !important;
  }

  .print-card .text-emerald-400 {
    color: #047857 !important;
    font-weight: 700 !important;
  }

  .print-card .text-purple-400, .print-card .text-purple-300 {
    color: #7e22ce !important;
    font-weight: 700 !important;
  }

  .print-card .text-slate-400, .print-card .text-slate-500 {
    color: #475569 !important;
  }

  .print-card a {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
  }

  /* Avoid page breaks inside important cards */
  .print-page-break {
    page-break-before: always;
  }

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

  /* Preserve background graphics when printing */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
