/* ---------------------------------------------------------------------------
   Print stylesheet — Ireland Immigration Check
   ---------------------------------------------------------------------------
   Linked from index.html with media="print", so it is only fetched and applied
   when a visitor prints a page or saves it as a PDF from the browser. It is a
   first-class way to keep a checker result, not a fallback for the app's own
   PDF export.

   What it does:
     * strips the chrome (nav, floating buttons, cookie bar, CTAs) so the page
       starts at the content;
     * undoes the scroll-reveal animations, which otherwise leave most of a
       page invisible on paper;
     * flattens colour to ink-friendly values while keeping the red/amber/green
       verdict distinguishable without relying on colour alone;
     * prints the destination of meaningful links, since a printed link is
       useless otherwise;
     * keeps result cards and table rows from splitting across pages.
   --------------------------------------------------------------------------- */

@page {
  size: A4 portrait;
  margin: 16mm 14mm 18mm;
}

/* ------------------------------------------------------------------ base -- */

html,
body {
  background: #fff !important;
  color: #000 !important;
  overflow: visible !important;
  width: auto !important;
  max-width: none !important;
  font-size: 11pt;
}

body * {
  /* Shadows and heavy backgrounds waste toner and print as grey mud. */
  box-shadow: none !important;
  text-shadow: none !important;
}

.ci-root {
  background: #fff !important;
  color: #000 !important;
  min-height: 0 !important;
}

.ci-main {
  padding: 0 !important;
  margin: 0 !important;
}

/* ----------------------------------------------------------- page chrome -- */

/* Navigation, floating widgets and anything that exists only to be clicked. */
.ci-nav,
.ci-nav-inner,
.ci-burger,
.ci-mobile-menu,
.ci-dropdown,
.ci-mega,
.ci-nav-cta,
.ci-sticky-cta,
.ci-wa,
.ci-cookie,
.ci-back-chip,
.ci-bread-link,
.ci-cta-banner,
.ci-footer-social,
.ci-pagination,
.ci-qm-overlay,
.ci-qm-modal,
[role="dialog"],
[data-print="hide"],
.ci-wiz-nav,
.ci-wiz-next,
.ci-wiz-back,
.ci-wiz-review-edit,
.ci-chip,
.ci-btn,
video,
iframe,
noscript {
  display: none !important;
}

/* Answer toggles: keep the choice that was made, drop the ones that were not,
   and print the survivor as text rather than as a pill. */
.ci-toggle:not(.is-on) {
  display: none !important;
}

.ci-toggle.is-on {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  color: #000 !important;
  font-weight: 700 !important;
}

/* Form controls keep their values; only the interactive styling goes. */
input,
select,
textarea {
  background: #fff !important;
  color: #000 !important;
  border: 0.5pt solid #999 !important;
  -webkit-appearance: none;
  appearance: none;
}

/* Reserve nothing for the sticky header. */
.ci-nav + *,
.ci-main {
  margin-top: 0 !important;
}

/* --------------------------------------------------------- reveal / fade -- */

/* Content lifted in by IntersectionObserver (.ci-reveal) and the per-route
   page fade start at opacity 0. Print would otherwise capture blank space. */
.ci-reveal,
.ci-reveal--d1,
.ci-reveal--d2,
.ci-reveal--d3,
.ci-reveal--d4,
.ci-reveal--d5,
.ci-page-fade {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
  filter: none !important;
  visibility: visible !important;
}

/* --------------------------------------------------------------- layout -- */

/* Multi-column grids collapse to a single readable column on paper. */
.ci-final-grid,
.ci-final-grid--details,
.ci-cta-banner-cols,
.ci-footer-inner {
  display: block !important;
}

.ci-final-left,
.ci-final-right {
  width: auto !important;
  max-width: none !important;
}

/* The lead-capture form is interactive only; the result above it is the point. */
.ci-lead,
.ci-final-capture {
  display: none !important;
}

.ci-lead--done {
  display: block !important;
}

/* ---------------------------------------------------------------- typography */

h1,
h2,
h3,
h4 {
  color: #000 !important;
  page-break-after: avoid;
  break-after: avoid-page;
}

h1 {
  font-size: 20pt;
}
h2 {
  font-size: 15pt;
}
h3 {
  font-size: 12.5pt;
}

p,
li {
  orphans: 3;
  widows: 3;
}

.ci-sub,
.ci-muted,
.ci-eyebrow {
  color: #333 !important;
}

/* ----------------------------------------------------------------- cards -- */

.ci-card,
.ci-result,
.ci-legal-wrap,
article,
section {
  page-break-inside: avoid;
  break-inside: avoid;
  background: #fff !important;
}

.ci-card,
.ci-result {
  border: 1pt solid #666 !important;
  border-radius: 0 !important;
  padding: 8pt 10pt !important;
  margin: 0 0 10pt !important;
}

/* Long pages of cards (occupation lists, blogs) may break between items. */
.ci-legal-wrap,
.ci-occ-list,
main section {
  break-inside: auto;
}

/* ------------------------------------------------------- verdict emphasis -- */

/* Colour alone does not survive greyscale printing, so each verdict also gets a
   heavy left rule. print-color-adjust keeps the tint for visitors who have
   "print background graphics" switched on. */
.ci-result--green,
.ci-result--good,
.ci-result--amber,
.ci-result--ok,
.ci-result--red,
.ci-result--low,
.ci-result--info {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  border-left-width: 4pt !important;
}

.ci-result--green,
.ci-result--good {
  border-left-color: #1f7a3f !important;
}
.ci-result--amber,
.ci-result--ok {
  border-left-color: #8a6100 !important;
}
.ci-result--red,
.ci-result--low {
  border-left-color: #9b1c1c !important;
}
.ci-result--info {
  border-left-color: #1f4e79 !important;
}

.ci-result-eyebrow,
.ci-result-permit,
.ci-result-detail,
.ci-result-note,
.ci-result-reasons li,
.ci-result-notes li {
  color: #000 !important;
}

/* ---------------------------------------------------------------- tables -- */

table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 9.5pt;
}

thead {
  display: table-header-group; /* repeat headers on every printed page */
}

tr,
img {
  page-break-inside: avoid;
  break-inside: avoid;
}

th,
td {
  border: 0.5pt solid #999 !important;
  padding: 3pt 5pt !important;
  color: #000 !important;
  background: #fff !important;
}

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

/* ----------------------------------------------------------------- links -- */

a,
a:visited {
  color: #000 !important;
  text-decoration: underline;
}

/* Print the target of real links. In-page anchors, javascript handlers and
   links whose text already is the URL are skipped. */
main a[href^="http"]::after {
  content: " (" attr(href) ")";
  font-size: 8.5pt;
  color: #444;
  word-break: break-all;
}

main a[href^="mailto:"]::after,
main a[href^="tel:"]::after,
main a[href^="#"]::after,
main a[href^="/"]::after,
.ci-footer a::after,
a[data-print="bare"]::after {
  content: "";
}

/* ---------------------------------------------------------------- footer -- */

/* A trimmed footer becomes the print footer: who produced the page and where
   it came from. */
.ci-footer {
  background: #fff !important;
  color: #000 !important;
  border-top: 1pt solid #999 !important;
  padding: 8pt 0 0 !important;
  margin-top: 12pt !important;
  page-break-inside: avoid;
}

.ci-footer-col,
.ci-footer-list,
.ci-footer-heading {
  display: none !important;
}

.ci-footer-brand,
.ci-footer-tag,
.ci-footer-address,
.ci-footer-bottom {
  display: block !important;
  color: #000 !important;
  font-size: 9pt;
}

.ci-logo-img,
.ci-logo--footer {
  max-height: 34pt !important;
  width: auto !important;
}
