/* ==========================================================================
   Utskriftsstilar - Arqdesign
   Laddas enbart med media="print" (se functions.php).
   Mal: produktsidor ska bli rena datablad pa A4.
   ========================================================================== */

@page {
	size: A4 portrait;
	/* Extra marginal upptill/nedtill ger plats at det fasta sidhuvudet/sidfoten. */
	margin: 22mm 14mm 18mm 14mm;
}

/* --------------------------------------------------------------------------
   1. Dolj allt som bara fyller en funktion pa skarmen
   -------------------------------------------------------------------------- */
#top-header,
#main-header,
#et-secondary-menu,
#et-top-navigation,
#top-menu-nav,
#et_mobile_nav_menu,
#et-info,
.et_slide_in_menu_container,
#main-footer,
.et-l--footer,
#et_pb_back_to_top,
.et_pb_scroll_top,
.et-social-icons,
#wpadminbar,
.et_pb_button_module_wrapper,
.et_pb_button,
.save-as-pdf-pdfcrowd-button-wrap,
.arq-actions,
#cookie-law-info-bar,
#cookie-law-info-again,
#cliSettingsPopup,
.cli-modal,
.cli-modal-backdrop,
.cli-popupbar-overlay,
.cli-settings-overlay,
.cli-bar-container,
.mfp-bg,
.mfp-wrap,
.screen-reader-text,
.skip-link,
video,
.et_pb_section_video_bg {
	display: none !important;
}

/* Respektera de element ni redan markerat som "ska inte med i PDF".
   Samma urval galler nu aven for vanlig utskrift. */
.pdfcrowd-remove {
	display: none !important;
}

/* --------------------------------------------------------------------------
   2. Nollstall farg och bakgrund - spara blackt, oka lasbarheten
   -------------------------------------------------------------------------- */
html,
body,
#page-container,
#et-main-area,
#main-content,
.et-l,
.et-l--body,
.et_builder_inner_content,
.et_pb_section,
.et_pb_row,
.et_pb_column,
.et_pb_module,
.et_pb_text,
.et_pb_with_background {
	background: #fff !important;
	background-image: none !important;
	box-shadow: none !important;
	filter: none !important;
	opacity: 1 !important;
}

body,
p, li, td, th, span, div,
.et_pb_text_inner {
	color: #000 !important;
	text-shadow: none !important;
}

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

/* --------------------------------------------------------------------------
   3. Layout - anvand hela pappersbredden, ta bort skarmens luft
   -------------------------------------------------------------------------- */
#page-container {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

.et_pb_section {
	padding: 0 !important;
	margin: 0 0 5mm !important;
}

.et_pb_row {
	width: 100% !important;
	max-width: 100% !important;
	padding: 0 !important;
	margin: 0 auto 4mm !important;
}

.et_pb_column {
	margin-bottom: 3mm !important;
}

.et_pb_module {
	margin-bottom: 3mm !important;
}

/* --------------------------------------------------------------------------
   4. Typografi
   -------------------------------------------------------------------------- */
body {
	font-size: 10.5pt !important;
	line-height: 1.45 !important;
}

h1, h1.entry-title, .et_pb_text h1 {
	font-size: 21pt !important;
	line-height: 1.15 !important;
	margin: 0 0 1mm !important;
}

h2, .et_pb_text h2 {
	font-size: 13pt !important;
	line-height: 1.25 !important;
	margin: 0 0 2mm !important;
}

h3, .et_pb_text h3 {
	font-size: 11.5pt !important;
	margin: 0 0 1.5mm !important;
}

p {
	margin: 0 0 2.5mm !important;
	orphans: 3;
	widows: 3;
}

/* Rubriker ska aldrig bli ensamma sist pa en sida */
h1, h2, h3, h4 {
	break-after: avoid-page;
	page-break-after: avoid;
	break-inside: avoid;
	page-break-inside: avoid;
}

/* --------------------------------------------------------------------------
   5. Bilder och ritningar - far aldrig delas over ett sidbrott
   -------------------------------------------------------------------------- */
#main-content img,
.et_pb_image img,
figure img {
	max-width: 100% !important;
	/* Hojdtaket gor att en hog sektionsritning far plats pa en sida */
	max-height: 165mm !important;
	width: auto !important;
	height: auto !important;
	break-inside: avoid;
	page-break-inside: avoid;
}

.et_pb_image,
.et_pb_image_wrap,
figure,
.wp-caption {
	break-inside: avoid;
	page-break-inside: avoid;
	margin-left: 0 !important;
	text-align: left !important;
}

/* Lightbox-lankar ska inte se ut som lankar pa papper */
.et_pb_lightbox_image {
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   6. Tabeller (Ninja Tables / FooTable) - komponentlistor
   -------------------------------------------------------------------------- */
/* FooTable satter "footable-paging" och "footable-filtering" som
   tillstandsklasser pa SJALVA <table>, inte bara pa UI-raderna. Ett obundet
   .footable-paging doljer darfor hela tabellen. Scopa alltid till raden. */
#main-content tr.footable-paging,
#main-content tr.footable-filtering,
#main-content .footable-pagination,
#main-content .pagination-wrapper,
#main-content ul.pagination,
#main-content .footable-filtering-external,
#main-content .ninja_footable_nav,
#main-content .foo-table-search,
#main-content .footable-toggle,
#main-content .footable-sort-indicator,
#main-content .fooicon {
	display: none !important;
}

/* Pagineringen doljer rader pa skarmen - pa papper ska alla med. */
#main-content tbody tr {
	display: table-row !important;
}

/* ...utom FooTables utfallbara detaljrader, som bara dubblerar innehallet. */
#main-content tbody tr.footable-detail-row {
	display: none !important;
}

/* FooTable doljer kolumner vid smala bredder - papperet ar smalt,
   men alla kolumner ska anda med. */
table.footable th,
table.footable td,
table[id^="footable_"] th,
table[id^="footable_"] td {
	display: table-cell !important;
}

#main-content table {
	width: 100% !important;
	border-collapse: collapse !important;
	margin: 0 0 4mm !important;
	font-size: 9.5pt !important;
	/* Komponentlistor ar korta och saknar rubrikrad att upprepa - de ska
	   halla ihop. Ryms tabellen inte pa en sida bryter webblasaren anda,
	   och da tar table-header-group nedan over. */
	break-inside: avoid;
	page-break-inside: avoid;
}

#main-content .footable_parent,
#main-content .ninja_table_wrapper {
	break-inside: avoid;
	page-break-inside: avoid;
}

/* Tabellhuvudet upprepas om tabellen delas over flera sidor */
#main-content thead {
	display: table-header-group !important;
}

#main-content tr {
	break-inside: avoid;
	page-break-inside: avoid;
}

#main-content th,
#main-content td {
	border: 0.4pt solid #8a8a8a !important;
	padding: 1.4mm 2mm !important;
	background: #fff !important;
	color: #000 !important;
	text-align: left !important;
	vertical-align: top !important;
}

#main-content th {
	font-weight: 700 !important;
	border-bottom-width: 0.8pt !important;
}

/* --------------------------------------------------------------------------
   7. Databladshuvud och avslutande rad

   OBS: sidhuvudet ligger i flodet hogst upp i <body> (wp_body_open), inte
   position:fixed. Chrome klipper bort fasta element som placeras i
   sidmarginalen, sa ett huvud som upprepas pa varje ark gar inte att gora
   tillforlitligt. Sidnumrering satts i stallet av webblasarens egen
   sidhuvud/sidfot-instalning i utskriftsdialogen.
   -------------------------------------------------------------------------- */
.arq-print-header,
.arq-print-footer {
	display: flex !important;
	align-items: flex-end;
	justify-content: space-between;
	gap: 6mm;
	width: 100%;
	background: #fff !important;
	color: #000 !important;
	break-inside: avoid;
	page-break-inside: avoid;
}

.arq-print-header {
	margin: 0 0 6mm !important;
	padding-bottom: 2.5mm;
	border-bottom: 0.8pt solid #001721;
	break-after: avoid;
	page-break-after: avoid;
}

.arq-print-footer {
	margin: 9mm 0 0 !important;
	padding-top: 2mm;
	border-top: 0.5pt solid #b0b0b0;
	align-items: baseline;
	font-size: 7.5pt !important;
	line-height: 1.3;
}

/* WebP-pluginet gor om <img> till <picture> - bada behover begransas,
   annars skrivs loggan ut i sin fulla naturliga storlek. */
.arq-print-logo,
.arq-print-logo img {
	display: block !important;
	height: 9mm !important;
	max-height: 9mm !important;
	width: auto !important;
	max-width: 55mm !important;
	flex: none;
}

.arq-print-title {
	font-size: 10pt !important;
	font-weight: 700;
	text-align: right;
	line-height: 1.3;
}

.arq-print-footer span {
	color: #555 !important;
}

.arq-print-footer span:nth-child(2) {
	flex: 1 1 auto;
	text-align: center;
	word-break: break-all;
}

.arq-print-footer span:last-child {
	white-space: nowrap;
	text-align: right;
}
