/*
 * Printing any page of the site (enqueue.php loads this sheet for print only). Before it a printout came out
 * half empty or crooked:
 * - in the dark theme the text is light and the browser does not print backgrounds: light grey on white paper.
 *   Paper always gets the light theme's colours;
 * - blocks that appear as the page is scrolled (AOS, data-aos) stay transparent until scrolled to: printed
 *   right after opening the page they were blank. On paper they are always shown;
 * - the navy blocks carry white text, and without their background it is white on white: backgrounds print
 *   as they are on the screen;
 * - the site's header and footer, the chat, the calendar, the accessibility and «to top» buttons, the search and
 *   the skip link were printed on top of the text, some of them on every sheet.
 * A page with a print of its own (the partners' catalog, GAIDeT) adds to this in its own sheet.
 */

@page {
  margin: 15mm 15mm 18mm;
}

html,
html[data-theme="dark"] {
  color-scheme: light;
    --color-bg-primary: #ffffff;
    --color-bg-primary--rgb: 255, 255, 255;
    --color-bg-secondary: #f8f8f8;
    --color-bg-tertiary: #f0f0f0;
    --color-surface-card: #ffffff;
    --color-surface-overlay: rgba(0, 0, 0, 0.5);
    --color-text-primary: #000000;
    --color-text-secondary: #626570;
    --color-text-muted: #707070;
    --color-text-heading: #16295b;
    --color-link: #265aa6;
    --color-link-hover: #347ce9;
    --color-accent: #265aa6;
    --color-focus: #347ce9;
    --color-danger: #e30327;
    --color-danger-bg: rgba(227, 3, 39, 0.06);
    --color-border: #d9d9d9;
    --color-border-strong: #16295b;
    --color-ink--rgb: 0, 0, 0;
    --color-tint--rgb: 22, 41, 91;
    --logo-plate-filter: none;
    --color-blue-200: #16295b;
    --color-blue-200--rgb: 22, 41, 91;
    --color-blue-100: #265aa6;
    --color-blue-100--rgb: 38, 90, 166;
}

html {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  background: #fff !important;
}

/* What only works on the screen. */
.header,
.footer,
.skip-link,
.to-top,
#scrollIndicator,
.cw-widget-wrapper,
#cw-window,
#cw-widget-overlay,
.calendar-widget-btn,
.calendar-widget-overlay,
.calendar-side-panel,
#accessibility-widget-container,
#accessibility-panel,
#accessibility-reading-line,
#live-search-results,
.search-modal,
.wp-block-search,
input[type="search"],
.ptn-hub-search,
video,
iframe {
  display: none !important;
}

/* Blocks that appear on scrolling are there at once. */
[data-aos],
[data-aos].aos-animate {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* The light theme's logo and pictures, not their dark twins. */
.logo-link__img--dark {
  display: none !important;
}

.logo-link__img--light {
  display: inline !important;
}

/* Lines, pictures, tables and headings are not cut between two sheets, nor is a heading left alone at the
   bottom of one. */
img,
figure,
table,
tr,
blockquote,
pre {
  break-inside: avoid;
}

h1,
h2,
h3,
h4 {
  break-after: avoid;
  break-inside: avoid;
}

img {
  max-width: 100% !important;
  height: auto;
}

a {
  color: inherit;
}
