/* //
// socialnet
//
// Angaben für den Ausdruck von Seiten
// 
// @copyright       Copyright 2020, socialnet GmbH Bonn
// @link            https://www.socialnet.de
// @lastmodified    2024-07-10
// */

@media print {
  /* target all pages */
  @page {
    margin: 1, 5cm;
  }

  /* //
	// @section basic layout preparation
	//

	// (en) change font size unit to [pt] - avoids problems with [px] in Gecko based browsers  	
	// (de) Wechsel der der Schriftgrößen-Maßheinheit zu [pt] - Probleme mit [px] in Gecko-Browsern vermeiden  */
  body {
    font: 10pt Cambria, Georgia, "Times New Roman", serif;
    padding: 0 5px;
    background: none;
  }

  .wrapper {
    display: block;
  }

  .sn-logo-print {
    display: block;
  }

  /* 	// (en) Hide unneeded container of the screenlayout in print layout 
	// (de) Für den Druck nicht benötigte Container des Layouts abschalten  */
  nav,
  header,
  aside,
  footer,
  #headerbanner,
  #headerbanner.mobil {
    display: none;
  }

  .contentbox {
    border: none;
  }
  /* 	//------------------------------------------------------------------------------------------------------//

	// (en) Avoid page breaks right after headings 
	// (de) Vermeidung von Seitenumbrüchen direkt nach einer Überschrift  */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    page-break-after: avoid;
  }

  /* //------------------------------------------------------------------------------------------------------//

	// (en) optional output of acronyms and abbreviations
	// (de) optionale Ausgabe von Auszeichnung von Abkürzungen  */

  /*
	abbr[title]:after,
	acronym[title]:after {
		content:'(' attr(title) ')';
	}
	*/

  /* //------------------------------------------------------------------------------------------------------// 

	// (en) optional URL output of hyperlinks in print layout 
	// (de) optionale Ausgabe der URLs von Hyperlinks */

  a[href^="http://"]:after, a[href^="https://"]:after, a[href^="mailto:"]:after
  {
    content: " <URL:" attr(href) ">";
    color: #444;
    background: inherit;
    font-style: italic;
  }

  /* // Elements with the CSS class .noprint will not be printed, but are visible on any other media type (e.g. screen) */

  .noprint {
    display: none !important;
  }

  img {
    max-width: 12cm;
  }

  blockquote {
    margin-left: 1cm;
  }

  /* //------------------------------------------------------------------------------------------------------// */
  /* Preistabellen */

  /* komplexe Tabellen im Lexikon */

  .lextable-container {
    /* Alle Container-Beschränkungen aufheben */
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
    border: none !important;
  }

  .lextable-container .lextable {
    /* Normale Tabellendarstellung */
    border: 1px solid #dddbd9 !important;
    width: auto !important;
    min-width: auto !important;
    max-width: 100% !important;
    table-layout: auto !important;
  }

  .lextable-container .lextable th,
  .lextable-container .lextable td {
    /* Optimierte Darstellung für Druck */
    padding: 0.3em 0.2em !important;
    white-space: normal !important; /* Textumbruch erlauben */
    min-width: auto !important;
    font-size: 0.8em !important; /* Etwas kleinere Schrift für bessere Platznutzung */
    line-height: 1.2 !important;

    /* Seitenumbruch in Zellen vermeiden */
    page-break-inside: avoid;
  }

  .lextable-container .lextable thead th {
    position: static !important;
    background: #f1efed !important; /* Hellgrauer Hintergrund für Druck */
    font-weight: bold !important;

    /* Header auf jeder Seite wiederholen */
    display: table-header-group;
  }

  .lextable-container .lextable tbody {
    display: table-row-group;
  }

  /* Seitenumbruch in Tabellenzeilen vermeiden wenn möglich */
  .lextable-container .lextable tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  /* Scrollbalken komplett ausblenden */
  .lextable-container::-webkit-scrollbar {
    display: none !important;
  }

  .lextable-container {
    scrollbar-width: none !important;
  }

  /* Caption-Optimierung für Druck */
  .lextable-container .lextable caption {
    font-weight: bold;
    margin-bottom: 0.5em;
    text-align: left;
    caption-side: top;
    page-break-after: avoid;
  }
}
