/* KI-Adventkalender 2026 - Zertifikat (WP1): Bildschirmdarstellung und Druck (A4 quer).
   js/certificate.js rendert in den uebergebenen Container ein <div class="ak-cert"> mit dem Inline-SVG.
   Drucken: Certificate.print() markiert den Pfad zum Zertifikat (.ak-print-path), blendet alles
   uebrige aus (.ak-print-hide) und setzt .ak-print-target; hier steht nur das Layout dazu. */

.ak-cert {
  width: 100%; max-width: 1200px; margin: 0 auto;
  background: #FBF6EA; border-radius: 10px; overflow: hidden;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35);
  line-height: 0;
}
.ak-cert-svg { display: block; width: 100%; height: auto; }
.ak-cert-svg .cert-ball title { pointer-events: none; }
#certActions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 16px auto; }

@page { size: A4 landscape; margin: 0; }

@media print {
  html, body {
    margin: 0 !important; padding: 0 !important; background: #FFFFFF !important;
    width: 297mm !important; height: auto !important; min-height: 0 !important; overflow: visible !important;
  }
  .ak-print-hide, #certActions, #hdr, #village, #doorTip, dialog, dialog[open] { display: none !important; }
  .ak-print-path {
    display: block !important; position: static !important; float: none !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important;
    width: auto !important; max-width: none !important; height: auto !important; min-height: 0 !important;
    overflow: visible !important; box-shadow: none !important; transform: none !important; filter: none !important;
  }
  .ak-cert {
    width: 297mm !important; max-width: none !important; height: 209mm !important;
    margin: 0 !important; border-radius: 0 !important; box-shadow: none !important;
    page-break-inside: avoid; break-inside: avoid; page-break-after: avoid;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .ak-cert-svg { width: 100% !important; height: 100% !important; }
  /* Fallback ohne JS-Markierung: nur das Zertifikat drucken */
  #certificate:not(.ak-print-path) #certMount ~ * { display: none !important; }
}
