/* Print-only overrides. Load after the screen and enhancement stylesheets.
   The print dialog owns the paper choice: test A4 portrait by default and
   allow Letter without shrinking a forced A4 page. */
@page {
  size: auto;
  margin: 18mm;
}

@media print {
  html,
  body {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    color: #000 !important;
  }

  body {
    font: 11pt/1.45 Arial, Helvetica, sans-serif !important;
  }

  main *,
  .footer-bottom * {
    color: #000 !important;
  }

  :focus {
    outline: none !important;
  }

  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .shell,
  .reading,
  .page-body,
  .page-hero,
  .hero,
  .section,
  .content-section {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .shell,
  .page-body {
    margin: 0 !important;
    padding: 0 !important;
  }

  .page-body,
  .hero,
  .service-split,
  .document-list,
  .step-grid,
  .about-split,
  .faq-layout,
  .page-index,
  .contact-grid {
    display: block !important;
    min-height: 0 !important;
    gap: 0 !important;
  }

  .page-hero,
  .hero,
  .section,
  .content-section {
    margin: 0 0 6mm !important;
    padding: 0 !important;
    border: 0 !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  .topline,
  .nav,
  .nav-toggle,
  .skip-link,
  .breadcrumb,
  .page-toc,
  .article-aside,
  .closing,
  .actions,
  .hero-photo,
  button {
    display: none !important;
  }

  /* Keep the already-approved site name; omit the navigation and personal data. */
  .header {
    display: block !important;
    position: static !important;
    margin: 0 0 6mm !important;
    padding: 0 0 4mm !important;
    border: 0 !important;
    border-bottom: 0.3mm solid #555 !important;
    background: none !important;
    break-inside: avoid;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .header-inner {
    display: block !important;
    min-height: 0 !important;
  }

  .header .brand {
    display: inline-flex !important;
    align-items: center;
    gap: 3mm;
    color: #000 !important;
    text-decoration: none !important;
  }

  .header .brand-symbol {
    width: 9mm;
    height: 11mm;
    border-color: #333 !important;
    color: #000 !important;
    font-size: 23pt !important;
  }

  .header .brand-name {
    color: #000 !important;
    font: 18pt/1.2 Georgia, 'Times New Roman', serif !important;
    letter-spacing: 0 !important;
  }

  .header .brand-name small {
    margin-top: 1mm;
    color: #000 !important;
    font: 10pt/1.3 Arial, Helvetica, sans-serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  summary,
  caption {
    color: #000 !important;
    letter-spacing: 0 !important;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  h1 {
    max-width: none !important;
    margin: 0 0 4mm !important;
    font: 24pt/1.15 Georgia, 'Times New Roman', serif !important;
  }

  h2 {
    margin: 0 0 3mm !important;
    font: 17pt/1.2 Georgia, 'Times New Roman', serif !important;
  }

  h3,
  h4,
  h5,
  h6 {
    margin: 3mm 0 2mm !important;
    font: bold 12pt/1.3 Arial, Helvetica, sans-serif !important;
  }

  p,
  li,
  dt,
  dd,
  label,
  summary,
  .answer,
  .check-item,
  .check-progress,
  .service-status,
  .intro {
    max-width: none !important;
    color: #000 !important;
    font-size: 11pt !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere;
    orphans: 3;
    widows: 3;
  }

  p {
    margin: 0 0 3mm !important;
  }

  ul,
  ol {
    margin-top: 0;
    margin-bottom: 3mm;
    padding-left: 6mm !important;
  }

  .updated,
  .subnote,
  .eyebrow,
  .example-label,
  .tool-note,
  .source-list p,
  .source-list li,
  .source-list a,
  .service .number {
    color: #000 !important;
    font-size: 10pt !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
  }

  .eyebrow {
    margin-bottom: 2mm !important;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .section-head {
    display: block !important;
    margin: 0 0 4mm !important;
  }

  .section-head > p {
    margin-top: 2mm !important;
  }

  .service,
  .page-index > a,
  .contact-card,
  .about-panel,
  .step {
    margin: 0 0 4mm !important;
    padding: 3mm !important;
    min-height: 0 !important;
    background: none !important;
    border: 0.2mm solid #999 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .about-panel::before,
  .text-link::after,
  .document-link .arrow,
  .doc-icon {
    display: none !important;
  }

  .about-panel blockquote {
    color: #000 !important;
    font: 14pt/1.35 Georgia, 'Times New Roman', serif !important;
    letter-spacing: 0 !important;
  }

  .about-panel span,
  .trust-strip,
  .trust-strip span,
  .trust-strip b {
    color: #000 !important;
    font-size: 10pt !important;
    letter-spacing: 0 !important;
  }

  .trust-strip {
    display: block !important;
    margin-bottom: 5mm !important;
    padding: 3mm 0 !important;
  }

  .document-link,
  .related-links a,
  .text-link {
    color: #000 !important;
    font: 11pt/1.45 Arial, Helvetica, sans-serif !important;
  }

  .document-link {
    display: block !important;
    padding: 2mm 0 !important;
    break-inside: avoid;
  }

  .status-badge,
  .service-status {
    color: #000 !important;
    background: none !important;
    border-color: #555 !important;
  }

  .status-badge {
    max-width: 100%;
    padding: 1mm 2mm !important;
    font: bold 10pt/1.3 Arial, Helvetica, sans-serif !important;
    white-space: normal !important;
  }

  /* Native details are opened by print.js; this also helps modern engines
     that implement the details-content pseudo-element without JavaScript. */
  details,
  details > summary,
  details > .answer {
    display: block !important;
  }

  details::details-content {
    display: block !important;
    content-visibility: visible !important;
    height: auto !important;
  }

  .faq-item {
    padding: 2mm 0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .faq-item summary {
    padding: 0 0 2mm !important;
    font-weight: bold !important;
    list-style: none !important;
  }

  .faq-item summary::after,
  .faq-item summary::marker {
    content: none !important;
    display: none !important;
  }

  .faq-item .answer {
    padding: 0 0 2mm !important;
  }

  /* Keep only a result that the visitor actually generated. */
  .route-section {
    display: none !important;
  }

  .route-section.print-has-result,
  .route-section:has([data-route-output]:not([hidden])) {
    display: block !important;
    margin: 0 0 5mm !important;
    padding: 3mm !important;
    color: #000 !important;
    background: none !important;
    border: 0.3mm solid #777;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .route-panel,
  .route-form {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .route-panel > div,
  .route-form > :not([data-route-output]) {
    display: none !important;
  }

  [data-route-output] {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  [data-route-output][hidden] {
    display: none !important;
  }

  [data-route-output]::before {
    content: 'Your route guidance';
    display: block;
    margin-bottom: 2mm;
    color: #000;
    font: bold 12pt/1.3 Arial, Helvetica, sans-serif;
  }

  .check-item {
    gap: 3mm !important;
    padding: 2mm 0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .check-item input[type='checkbox'] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    flex: 0 0 4.5mm;
    width: 4.5mm !important;
    height: 4.5mm !important;
    margin: 0.5mm 0 0 !important;
    accent-color: #000 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    margin: 3mm 0 !important;
    border: 0 !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  table {
    width: 100% !important;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 10pt !important;
    background: none !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  caption {
    padding: 0 0 2mm !important;
    font: bold 11pt/1.35 Arial, Helvetica, sans-serif !important;
  }

  thead {
    display: table-header-group !important;
  }

  tfoot {
    display: table-footer-group !important;
  }

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

  th,
  td {
    width: auto !important;
    min-width: 0 !important;
    padding: 2mm !important;
    color: #000 !important;
    background: none !important;
    border: 0.2mm solid #888 !important;
    vertical-align: top;
    font-size: 10pt !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  a,
  .route-output a,
  .source-list a {
    color: #000 !important;
    text-decoration: underline;
    overflow-wrap: anywhere;
  }

  a[href^='https://']:not([href^='https://eapostille.pro/']):not([href='https://eapostille.pro'])::after,
  a[href^='http://']:not([href^='http://eapostille.pro/']):not([href='http://eapostille.pro'])::after {
    content: ' (' attr(href) ')';
    display: inline !important;
    color: #000 !important;
    font: normal 10pt/1.4 Arial, Helvetica, sans-serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .source-list {
    margin-top: 5mm !important;
    padding-top: 3mm !important;
    border-top: 0.2mm solid #888 !important;
    break-inside: auto;
  }

  .source-list h2 {
    font: bold 11pt/1.35 Arial, Helvetica, sans-serif !important;
    text-transform: none !important;
  }

  /* Only the existing general-information limitations and copyright remain. */
  .footer {
    display: block !important;
    position: static !important;
    margin: 5mm 0 0 !important;
    padding: 0 !important;
    color: #000 !important;
    background: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
    break-after: auto !important;
    page-break-after: auto !important;
  }

  .footer-top {
    display: none !important;
  }

  .footer-bottom {
    display: block !important;
    padding: 3mm 0 0 !important;
    border-top: 0.2mm solid #888 !important;
  }

  .footer-bottom p,
  .footer-bottom > span {
    display: block;
    max-width: none !important;
    margin: 0 0 2mm !important;
    color: #000 !important;
    font: 10pt/1.4 Arial, Helvetica, sans-serif !important;
  }

  main > :last-child,
  .reading > :last-child,
  .footer-bottom > :last-child {
    margin-bottom: 0 !important;
    break-after: auto !important;
    page-break-after: auto !important;
  }

  img,
  svg,
  figure {
    max-width: 100% !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
