/*
 * Print view (TASKS.md section 30, design.md 5.7). Loaded by the site set with media="print", the screen never sees it.
 *
 * Rebuilt from the 6.2 print styles (THEME/Public/css/print.css + the Bootstrap print rules): everything black on
 * white, no backgrounds and shadows; navigation, the Wegweiser forms, the figures of the tiles and boxes and the
 * toolbar of the result pages left out; the choice of a result page as text ("Arzt > Belgien"); the address after a
 * link. Added, as design.md 5.7 asks: skip link, language menu, mobile menu, footer with its links and logos,
 * feedback tab, success stories slider (start page) and the tab bar of the story page left out. Addresses only
 * after external links (6.2/Bootstrap printed every href, also "/beratung/#als_wien"), e-mail addresses are the link
 * text already. The logo stays as the sender of the print-out.
 * Logical properties only, Arabic and Dari print right to left like the screen.
 */

@page {
  margin: 1.5cm 1.5cm 2cm;
}

/* Black on white (Bootstrap print rules): no backgrounds, shadows or colours. Backgrounds would not be printed
   anyway by default, and white text on the petrol box would then be invisible. */
*,
*::before,
*::after {
  color: #000 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

li::marker {
  color: #000 !important;
}

/* The red line above the h1 (content.css) in black as well */
h1,
.h1 {
  border-color: #000 !important;
}

/* Not printed: skip link, language menu, mobile menu, main and sub bar, footer (doormat links and logos), toolbar
   ("Zurück", "Drucken") and decorative symbol of the result box, feedback tab, the Wegweiser box with the form (start
   page, page 51; the result box stays), info banner, slider on the start page, tab bar and arrows of the story
   page, the figures of tiles and boxes (6.2: figure and .teaser img) */
.skip-link,
.language-menu,
.mobile-nav,
.site-navbar,
.site-footer,
.result-tools,
.result-box__symbol,
.feedback-link,
.wegweiser:not(.result-box),
.infobanner,
.stories,
.story-slides-nav,
.teaser-card .ce-gallery,
.frame a:is(.ext_link, .ext-link)::before {
  display: none !important;
}

/* One column over the whole page width: no centred containers, no grids, no sticky or fixed parts */
.container {
  max-width: none;
  padding-inline: 0;
}

.grid,
.grid--content {
  display: block;
}

.maincontainer {
  padding-block: 1rem 0;
}

.process-result {
  padding-block-start: 0;
}

.site-header__top {
  padding-block: 0 1rem;
}

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

/* Tiles and boxes: text only, with a thin frame */
.teaser-card {
  border-color: #000;
}

.teaser-card .ce-textpic {
  display: block !important;
}

/* Links black and underlined; after external links their address in brackets (Bootstrap: a[href]:after) */
a,
a:visited {
  text-decoration: underline;
}

main a[href^="http"]::after,
main .teaser-card :is(h1, h2, h3, h4, h5, h6) a[href^="http"]::after {
  position: static;
  content: " (" attr(href) ")";
  font-size: 0.875em;
  font-weight: 400;
  overflow-wrap: anywhere;
}

/* The card link is stretched over the tile with an empty ::after on the screen (teaser-cards.css) */
main .teaser-card :is(h1, h2, h3, h4, h5, h6) a:not([href^="http"])::after {
  content: none;
}

/* No page break inside an address box, an advice centre, a tile or a figure, none right after a heading */
.contact_spot,
.advicespot,
.teaser-card,
figure,
img,
tr {
  break-inside: avoid;
}

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

/* Result box (result.css, wegweiser.css): the petrol box becomes a block of text with a line below; the column of
   the old Bootstrap grid and the white lines are left out */
.result-box {
  padding-block: 0 1rem;
  border-block-end: 1px solid #000;
}

.wegweiser__container > *,
.result-box .result-box__chips {
  margin-inline-start: 0;
}

.wegweiser .wegweiser__title {
  margin-block: 0 0.5rem;
}

.result-box .result-box__answers {
  min-height: 0;
  margin-block-end: 0;
  padding-block: 0.5rem 0;
  border-block: 0;
}

/* The choice as text: "Meine Auswahl: Arzt/Ärztin › Syrien" (6.2: .secondhead with ">" after it). The label, only for
   screen readers on the screen, is printed; the hidden comma gives way to the arrow, which is a character now
   instead of a white mask. "›" mirrors by itself in right-to-left text (Unicode bidi mirroring), hence no
   transform. */
.result-box .result-box__chips {
  display: block;
  margin-block-end: 0.5rem;
}

.result-box__chips > .visually-hidden:first-child {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
}

.result-box__chips > .visually-hidden:not(:first-child) {
  display: none !important;
}

.wegweiser__chip {
  display: inline;
  padding: 0;
}

.wegweiser__chip--next {
  margin-inline-start: 0;
}

.wegweiser .wegweiser__chip--next::before,
[dir] .wegweiser .wegweiser__chip--next::before {
  position: static;
  width: auto;
  height: auto;
  content: " › ";
  -webkit-mask: none;
  mask: none;
  transform: none;
}

/* Address boxes of the authorities: a thin frame instead of the grey surface */
.content-teaser {
  border: 1px solid #000;
}

/* Feedback form (follow-up 51): printed as on the screen, black on white; the button framed instead of red (the
   background is not printed), the thanks box framed like the address boxes. The hint arrows of the messages are
   backgrounds and drop out, the messages stay as text. */
.frame-type-form_formframework .btn,
.frame-type-form_formframework .form-confirmation {
  border: 1px solid #000 !important;
}

/* Section 90: the spam check of Cloudflare Turnstile is of no use on paper (and its frame would print as a white
   box): left out with its label and message. */
.frame-type-form_formframework .form-element-turnstile {
  display: none !important;
}
