/* ═══════════════════════════════════════════════════════════════════════════
   PRINT STYLES (Loaded via media="print")
   Key rule: @page { margin: 0 } is the ONLY way to suppress the browser's
   auto-generated date / title / URL / page-number header & footer text.
   ═══════════════════════════════════════════════════════════════════════════ */

@page {
  size: A4 portrait;
  margin: 0 !important;
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 210mm !important;
  height: 297mm !important;
  max-height: 297mm !important;
  overflow: hidden !important;
  background: #ffffff !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

body::before, body::after {
  display: none !important;
}

/* ── Hide EVERYTHING that is not <main> ───────────────────────────────── */
body > *:not(main) {
  display: none !important;
  visibility: hidden !important;
}

/* ALL iframes — Google renders consent dialogs & privacy links inside
   cross-origin iframes that CSS/JS cannot reach into. Hide the frame itself. */
iframe {
  display: none !important;
  visibility: hidden !important;
}

/* Standard page furniture */
header, footer, nav, aside, ins,
.adsbygoogle, .btn, button,
.tag-link, .no-print,
#post-print-engagement {
  display: none !important;
}

/* ── Reset <main>, article, card wrapper to normal block flow ─────────── */
main {
  display: block !important;
  width: 210mm !important;
  height: 297mm !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

article, .split-layout, .split-main, .glass-card {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Hide every card child except the drawing container or media layout */
.glass-card > *:not(.print-container):not(.media-layout) {
  display: none !important;
}

/* Reset media-layout and wrapper to normal block/flex flow */
.media-layout,
.print-container-interactive-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
}

/* ── The drawing container: occupies the full A4 canvas, centers the image
   with symmetric 1.5cm page margins on all sides ── */
.print-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 210mm !important;
  height: 297mm !important;
  margin: 0 auto !important;
  padding: 1.5cm !important;
  box-sizing: border-box !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  position: static !important;
}

/* ── The image: constrained to the 180mm x 267mm padded container, 100% centered ─────────── */
.print-container img,
.print-container-image {
  display: block !important;
  max-width: 180mm !important; /* 210mm A4 width - 30mm (1.5cm left + 1.5cm right) = 180mm */
  max-height: 267mm !important; /* 297mm A4 height - 30mm (1.5cm top + 1.5cm bottom) = 267mm */
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}


/* ── Hide Google AdSense / Consent privacy buttons and overlays ─────── */
.google-privacy-settings-button,
.google-privacy-settings-button-container,
#google-privacy-settings-button,
.ipr-container,
#google-anno-sa,
ins.adsbygoogle,
[class*="google-privacy"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
