/* Mobile Feinkorrekturen fuer die Verfahrensseite. */
body.rc-subpage.rc-editorial--verfahren .rc-page-hero .heading---h1 > span {
  display: block;
  white-space: nowrap;
}

/* Die hochformatigen A4-Musterberichtseiten vollstaendig zeigen. Der
   allgemeine 4:3-Medienrahmen darf Kopf und Fuss nicht abschneiden. */
body.rc-subpage.rc-editorial--verfahren
  .rc-figure
  .rc-report-page {
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
  background: #fff;
}

body.rc-subpage.rc-editorial--verfahren
  .rc-figure:has(.rc-report-page) {
  overflow: visible !important;
}

body.rc-subpage.rc-editorial--verfahren
  .rc-figure
  .rc-report-page
  .image-fill {
  /* .image-fill ist global position:absolute; da der Wrapper hier auf
     height:auto steht, muss das Bild statisch im Fluss stehen, sonst
     bestimmt es die Containerhoehe nicht und bleibt schmal. */
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  aspect-ratio: 210 / 297 !important;
  object-fit: contain !important;
  object-position: center top !important;
  transform: none !important;
}

body.rc-subpage.rc-editorial--verfahren
  .rc-figure:has(.rc-report-page):hover
  .image-fill {
  transform: none !important;
}

@media screen and (max-width: 767px) {
  /* Die Hero-Ueberschrift erhaelt einen kontrollierten Umbruch in zwei Zeilen. */
  body.rc-subpage.rc-editorial--verfahren .rc-page-hero .heading---h1 {
    width: 100%;
    max-width: none !important;
    font-size: clamp(27px, 8.7vw, 34px);
    letter-spacing: -0.025em;
  }

  /* Der erklaerende Text nutzt die komplette verfuegbare Inhaltsbreite. */
  body.rc-subpage.rc-editorial--verfahren .rc-page-hero__lead {
    width: 100% !important;
    max-width: none !important;
  }

  /* Die Grenzwerttabelle rueckt naeher an den zugehoerigen Erklaertext,
     statt mittig zwischen den Abschnitten zu haengen. */
  body.rc-subpage.rc-editorial--verfahren .rc-split__media:has(.rc-limits) {
    padding-top: 0 !important;
    margin-top: -28px !important;
  }

  /* Die A4-Musterberichtseiten ziehen mobil wirklich ueber die volle
     Viewportbreite. Die Zentrierung ueber 50%/50vw funktioniert unabhaengig
     vom jeweiligen Padding und der Maximalbreite des main-container. */
  body.rc-subpage.rc-editorial--verfahren .rc-split__media:has(.rc-report-page) {
    box-sizing: border-box;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-top: 32px !important;
    margin-right: 0 !important;
    margin-left: calc(50% - 50vw) !important;
  }

  body.rc-subpage.rc-editorial--verfahren .rc-figure:has(.rc-report-page),
  body.rc-subpage.rc-editorial--verfahren
    .rc-figure:has(.rc-report-page)
    .rc-report-page,
  body.rc-subpage.rc-editorial--verfahren
    .rc-figure:has(.rc-report-page)
    .image-fill {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Unterschrift dicht an der Berichtsseite, dafuer klare Trennung
     zwischen den beiden Musterberichten. */
  body.rc-subpage.rc-editorial--verfahren .rc-figure:has(.rc-report-page) {
    gap: 3px !important;
  }

  body.rc-subpage.rc-editorial--verfahren .rc-split__media:has(.rc-report-page) {
    gap: 64px !important;
  }

  /* Bildunterschriften des Berichts wieder auf den Textrand einruecken. */
  body.rc-subpage.rc-editorial--verfahren
    .rc-figure:has(.rc-report-page)
    .rc-figure__caption {
    margin-top: 0 !important;
    padding-left: calc(var(--_grid---grid-window-gutter, 24px) + 18px) !important;
    padding-right: var(--_grid---grid-window-gutter, 24px) !important;
    overflow: visible !important;
  }

  /* Bildunterschriften folgen mobil der linken Bildkante. */
  body.rc-subpage.rc-editorial--verfahren .rc-figure__caption,
  body.rc-subpage.rc-editorial--verfahren figcaption {
    width: 100%;
    display: block;
    text-align: left !important;
    justify-content: flex-start !important;
  }
}

/* Dokumentationsseiten nutzen dasselbe 5/7-Raster wie das grosse Bild im
   vorherigen Abschnitt und werden in ihrer natuerlichen Vollhoehe ausgegeben. */
body.rc-subpage.rc-editorial--verfahren
  .rc-report-page {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
  background: #fff;
}

body.rc-subpage.rc-editorial--verfahren
  .rc-report-page
  .image-fill {
  position: static !important;
  inset: auto !important;
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin-right: auto;
  margin-left: auto;
  aspect-ratio: 210 / 297 !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}

@media screen and (min-width: 992px) {
  body.rc-subpage.rc-editorial--verfahren
    .rc-procedure-accordion__answer-inner:has(.rc-report-page) {
    grid-template-columns: minmax(0, var(--_grid---grid-3-column)) minmax(0, var(--_grid---grid-7-column));
  }
}

/* Tabellen und Diagramme ohne Beschnitt in ihrem echten Seitenverhaeltnis. */
body.rc-subpage.rc-editorial--verfahren .rc-procedure-table {
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
  background: #fff;
}

body.rc-subpage.rc-editorial--verfahren
  .rc-procedure-table
  .image-fill {
  position: static !important;
  inset: auto !important;
  display: block;
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: left top !important;
  transform: none !important;
}

/* Alle Bilduntertitel beginnen an der linken Bildkante. */
body.rc-subpage.rc-editorial--verfahren .rc-figure__caption,
body.rc-subpage.rc-editorial--verfahren figcaption {
  width: 100%;
  align-self: stretch;
  display: block;
  text-align: left !important;
  justify-content: flex-start !important;
}

body.rc-subpage.rc-editorial--verfahren
  .rc-figure:has(.rc-report-page)
  > .rc-figure__caption {
  box-sizing: border-box;
  padding-left: 14.67%;
}

body.rc-subpage.rc-editorial--verfahren .rc-lightbox.is-report {
  box-sizing: border-box;
  padding: 20px;
}

body.rc-subpage.rc-editorial--verfahren
  .rc-lightbox.is-report
  .rc-lightbox__figure {
  width: min(
    calc(100vw - 40px),
    calc(70.707vh - 52.32px)
  );
  width: min(
    calc(100vw - 40px),
    calc(70.707dvh - 52.32px)
  );
  max-width: none;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  margin-right: auto;
  margin-left: auto;
}

body.rc-subpage.rc-editorial--verfahren
  .rc-lightbox.is-report
  .rc-lightbox__image {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 74px);
  max-height: calc(100dvh - 74px);
  margin-right: auto;
  margin-left: auto;
  aspect-ratio: 210 / 297;
  object-fit: contain;
  object-position: center;
}

body.rc-subpage.rc-editorial--verfahren
  .rc-lightbox.is-report
  .rc-lightbox__caption {
  box-sizing: border-box;
  width: 100%;
  padding-left: 14.67%;
}
