/*
fagbok css
*/

/*
layout general
fagbok - fagbok blokk
FB
template - header-med-bilde
FB - navigeringsmeny
fagbok - lydknapp
Print version
*/

/*layout general*/
#primary {
    width: 100%;
}

.post-template-fagbok .header-text,
#breadcrumbs {
    margin: 1em 0;
}

.post-template-fagbok .entry-title{
	margin: 5rem 0;
}

/*enable sticky*/
/* Språkpanelet skal ikke legge seg over boksidene, men plassen det tar må holdes av.
   Med display:none forsvant panelet ut av flyten samtidig som .sticky + .container la på
   120px (se style.css). Da hoppet hele sida ca. 69px nedover i det rullinga startet, og
   "Les"-knappen landet med en glipe på toppen av første side. */
.post-template-fagbok .available-lang.sticky {
    position: static;
    width: auto;
    visibility: hidden;
}

.post-template-fagbok .available-lang.sticky + .container {
    padding-top: 0;
}

/*bøker og fagbok - fagbok-blokk*/
@media (min-width: 1076px){
	.fagbok-knapper figure{
		clear: both;
		margin: 0 auto 1.5em auto;
		width: 35rem;
	}
}

html:lang(nb-NO) .fagbok-blokk .fagbok-morsmal,
html:lang(nn-NO) .fagbok-blokk .fagbok-morsmal{
    display: none;
}

.fagbok-knapper a:hover {
    outline: 1px solid orange !important;
    background: transparent !important;
    box-shadow: none !important;
}

.fagbok-knapper a::after {
    content: '' !important;
}

h1.entry-title span{
    display: block !important;
}

h1.entry-title span.norsk-sprak {
    direction: ltr !important;
}

.rtl h1.entry-title span.norsk-sprak {
    text-align: right;
}

.single .fagbok-blokk {
    height: 100vh;              /* was: min-height: 100vh */
    /* padding-top: 50px; */
    margin-bottom: 0.2em;
    box-shadow: 12px 0px 20px 1px #ccc;
    overflow: hidden;          /* add this so long pages clip instead of spilling */
}
/*
.fagbok-blokk .wp-block-media-text__content{
	height:90%;
}

.fagbok-blokk .wp-block-media-text__content .fagbok-tekstwrapper{
	height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
*/
.fagbok-blokk img.liggende {
    width: 100%;
    height: auto;
}

.fagbok-blokk img.staende {
    width: 70%;
    height: auto;
}

.fagbok-blokk figure.wp-block-media-text__media {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 1em;
}

.fagbok-blokk .wp-block-media-text>.wp-block-media-text__content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fagbok-blokk.gjem-frontend{
	display: none;
}

/*font size on frontend*/
.fagbok-blokk .fagbok-tekst *{
    font-size: 2.5rem;
    line-height: 2.5 !important;
    margin-bottom: 1rem;
}

html[dir="rtl"] .fagbok-blokk .fagbok-tekst:first-child *{
	font-size: 1.1em;
}

html:lang(ur) .fagbok-blokk .fagbok-tekst:first-child *{
	line-height: 2.5 !important;
}

html[dir="rtl"] .fagbok-blokk .fagbok-tekst.fagbok-morsmal *{
	direction: rtl;
}

.rtl .fagbok-blokk ul,
.rtl .fagbok-blokk ol{
    padding-right: 1.8em;
}

.rtl .fagbok-printsection .fagbok-tekst ul,
.rtl .fagbok-printsection .fagbok-tekst ol{
    padding-right: 1.8em;
}

.fagbok-control{
    margin: 2rem 0;
}

.fagbok-control *{
    margin: 0 !important;
    line-height: 0;
}

@media (max-width: 600px) {
    .fagbok-control figure.wp-block-audio{
        text-align: center;
    }
}

.fagbok-control .forrige svg,
.fagbok-control .neste svg{
    width: 5rem;
    height: 5rem;
    stroke-width: 1.2;
}

.fagbok-control .forrige:hover, 
.fagbok-control .neste:hover {
    outline: 1px solid #62707c;
    cursor: pointer;
}

.fagbok-control .forrige:focus, 
.fagbok-control .neste:focus {
    outline: 1px solid orange;
}

/*title font for ltr - we put it first to skip-to-content because this is visibility hidden and font will be loaded*/
#skip-to-content{
	font-family: 'Caveat' !important;
}

body:not(.rtl) .fagbok-printsection .print-forside h1{
	font-family: 'Arial';
}

.single article[class*="category-fagboker"] .printPage-div{
	display: none;
}

/*FB*/
.fbvisning .postsprakliste {
    font-size: 0.7em;
	padding: 5px;
	background: #f2f9ff;
}

.fbvisning button.fbtoggle-button {
	font-size: 0.7em;
    font-weight: normal;
    padding: 0.3em;
    background-color: #eceff8 !important;
    color: #383838 !important;
    border-radius: 0 0 5px 5px;
}

.fbvisning article {
    height: 100%;
}

.fbvisning article a {
    height: 12em;
}

.fbvisning header{
	height: 4em;
}

.fbvisning img {
    aspect-ratio: 3 / 2;
	object-fit: cover;
}

.fbvisning .velgsprak{
    line-height: 0;
}

.fbvisning .velgsprak .fbtoggle-button {
    width: 100%;
    border: 0;
}

.fbvisning .velgsprak ul{
	padding: 0;
    column-count: 2;
    line-height: 2;
}

/*template - header-med-bilde*/
.header-med-bilde {
    min-height: 270px;
}

@media (min-width: 1001px) {
    .site-header .site-identity {
        padding: 20px 0;
    }
}

.header-med-bilde h1.entry-title span {
    display: block;
}

.header-med-bilde .tittel-utdrag{
	max-width: 785px;
}

.post-template-fagbok .printPage-div {
    display: none;
}

/*fb - navigeringsmeny*/
.morsmal-meny-punkter.fb-meny {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    max-width: none;
}

.fb-meny a{
	font-family: 'muli' !important;
	cursor: pointer;
}
.fb-meny ul.m-button-list {
    justify-content: center;
}

.fb-meny ul.m-button-list li {
    width: 30%;
}

.fb-meny li button{
	font-family: 'muli' !important;
	width: 99%;
}

.fb-meny .buttonContainer {
    position: absolute;
    width: 30%;
	z-index: 100;
}

.fb-meny span.lenke-ekstern,
.fb-meny span.lenke-intern{
	display: none;
}

@media (max-width: 640px) {
	.fb-meny .buttonContainer {
		width: 95%;
	}
}

.fb-meny .buttonContainer button {
	font-size: 1em;
    width: 100%;
    background: #eceff8;
    color: black;
    border: 1px solid #ffffff;
    text-align: left;
}

.fb-meny .buttonContainer button:hover {
	color: #ffffff !important;
    background: #99002b !important;
}

.fb-meny a.hover-effect,
.fb-meny button.hover-effect {
	color: #ffffff !important;
    background: #99002b !important;
}

.fb-meny nav.menuList{
	margin-bottom: 1em;
}

.fagbok-header .om-popup {
  display: none; /* Initially hidden */
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin: 1.5em;
}

.fb-meny .om-popup p{
	margin-bottom: 1em;
}

/*fb - knapperad: kompakte knapper øverst til høyre i headeren, over tittelen*/
.fagbok-header{
	margin-bottom: 2em !important;
}

.fagbok-header .morsmal-meny-punkter.fb-meny {
	width: auto;
	margin-left: 0;
	margin-bottom: 0.5em;
	display: flex;
    justify-content: space-between;
}

.fagbok-header .fb-meny nav.menuList:first-child {
	grid-column: 2;
}

.fagbok-header .fb-meny nav.menuList:first-child ul.m-button-list {
	justify-content: center;
}

.fagbok-header .fb-meny nav.menuList:last-child {
	grid-column: 3;
	justify-self: end;
}

.fagbok-header .fb-meny nav.menuList {
	margin: 0;
}

.fagbok-header .fb-meny ul.m-button-list {
	justify-content: flex-end;
	gap: 0.5em;
}

.fagbok-header .fb-meny ul.m-button-list li {
	position: relative;
	width: auto;
	margin: 0;
}

/*samme kompakte knappestil som Skriv ut/Kopier ellers på nettstedet*/
.fagbok-header .fb-meny li a.a-arrow,
.fagbok-header .fb-meny li button.a-arrow {
	gap: 0.4em;
	width: auto;
	height: auto;
	padding: 12px 18px !important;
	border: 2px solid #e5e5e5;
	border-radius: 5px;
	background: #eee;
	font-size: 0.8em;
	font-weight: 700;
	line-height: 1;
}

.fagbok-header .fb-meny nav.menuList ul li a.a-arrow.fa.fa-angle-right::after, 
.fagbok-header .fb-meny nav.menuList ul li button.a-arrow.fa.fa-angle-right::after {
    font-size: large;
    padding-left: 0.5rem;
	font-weight: 700;
	display: none;
}

/*knapper med ikon foran teksten ("Les boka": pil ned i ring, lenkeknappene: dokument)*/
.fagbok-header .fb-meny li .a-arrow.fagbok-ikonknapp {
	justify-content: flex-start;
	gap: 0.5em;
}

.fagbok-header .fb-meny li .fagbok-ikonknapp svg {
	flex-shrink: 0;
}

/*nedtrekket for utskrift er bredere enn knappen og legger seg langs høyre kant*/
.fagbok-header .fb-meny .buttonContainer {
	right: 0;
	left: auto;
	width: 16em;
	max-width: 90vw;
}

/*"om fagboka"-boksen ligger i menyen og trenger egen bredde*/
.fagbok-header .fb-meny .om-popup {
	max-width: 100%;
	margin: 1em auto;
	text-align: left;
}

/*lydknappen står midtstilt under tittelen*/
.fagbok-header .fagbok-tittellyd {
	margin-top: 0.5em;
}

/*liten skjerm: menyene stables, og knappene legger seg i et ryddig rutenett med to kolonner*/
@media (max-width: 640px) {
	.fagbok-header .morsmal-meny-punkter.fb-meny {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0.5em;
	}

	.fagbok-header .fb-meny nav.menuList,
	.fagbok-header .fb-meny .o-frontpage-component {
		width: 100%;
		margin: 0;
		padding: 0;
	}

	.fagbok-header .fb-meny ul.m-button-list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.5em;
		width: 100%;
		margin: 0;
		padding: 0;
	}

	.fagbok-header .fb-meny ul.m-button-list li {
		width: auto !important;
		min-width: 0;
		margin: 0;
	}

	/*knappene fyller cellen: tekst til venstre, ikon/pil til høyre*/
	.fagbok-header .fb-meny li a.a-arrow,
	.fagbok-header .fb-meny li button.a-arrow {
		display: flex;
		align-items: center;
		justify-content: space-between;
		box-sizing: border-box;
		width: 100%;
		min-height: 2.75em;
		padding: 0.6em 0.75em !important;
		font-size: 0.8em;
		text-align: left;
		white-space: nowrap;
	}

	.fagbok-header .fb-meny li button.a-arrow svg {
		flex-shrink: 0;
	}

	/*utskriftsvalgene åpnes i full bredde under knappen*/
	.fagbok-header .fb-meny .buttonContainer {
		left: 0;
		right: auto;
		width: calc(200% + 0.5em);
		max-width: calc(100vw - 32px);
	}
}


/*fagbok-blokk*/
.fagbok-printsection{
	display: none;
	margin: 0;
	padding: 0;
}

.fagbok-printsection .fagbok-print{
	display: block;
	height: 297mm;
	width: 209.9mm;
	box-sizing: border-box;
    page-break-after: always;
	margin: 0pt;
	border: 1pt solid transparent;
}

.fagbok-printsection hr.ny-side{
	break-before: unset;
}

.fagbok-printsection .print-forside{
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fagbok-printsection .print-forside h1{
    position: absolute;
    top: 15pt;
    font-size: 40pt;
    padding: 10pt 40pt;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fagbok-printsection:not(.fagbok-norsk) span.fagbok-norsk-tittel,
.fagbok-printsection:not(.fagbok-norsk) span.fagbok-nynorsk-tittel {
	color: #006d42;
    font-family: serif;
    font-weight: 100;
    font-size: 25pt;
}

.fagbok-printsection span.fagbok-morsmal-tittel,
.fagbok-printsection.fagbok-norsk span.fagbok-norsk-tittel,
.fagbok-printsection.fagbok-norsk span.fagbok-nynorsk-tittel{
    color: #006d42;
}

/* keep each title on one line; fitTheTitle() in fb-script.js shrinks the font size until it fits the page width */
.fagbok-printsection .print-forside h1 span.fagbok-norsk-tittel,
.fagbok-printsection .print-forside h1 span.fagbok-nynorsk-tittel,
.fagbok-printsection .print-forside h1 span.fagbok-morsmal-tittel{
    white-space: nowrap;
}

.fagbok-printsection .print-forside .sprak{
	font-size: 10pt;
	line-height: 1;
	/* background: beige; */
	position: absolute;
    bottom: 30pt;
    right: 30pt;
    padding: 5pt;
    /* border: 1pt solid grey; */
    border-radius: 5pt;
}

.fagbok-printsection .print-forside .sprak span {
    font-size: 10pt;
}

.fagbok-printsection .bilde-forside {
    margin: 10pt;
    /* border: 5pt solid beige; */
    border-radius: 10pt;
}

/*ansa og bansa*/
.trid-16994 .print-forside .sprak {
    color: #ffffff;
}

.fagbok-printsection .fagbok-print>img{
	height: 100%;
	width: 100%;
	margin: 0pt;
}

.fagbok-printsection .fagbok-print img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
	margin: 0pt;
}

.fagbok-printsection .fagbok-print:last-child{
    page-break-after: auto;
}

.fagbok-printsection:not(.fagbok-norsk) .fagbok-print .fagbok-tekst:first-child{
	margin-bottom: 10pt;
}

.fagbok-printsection .fagbok-print.fagbok-tekst{
	position: relative;
	padding: 50pt;
}

.fagbok-printsection .fagbok-print.fagbok-tekst *{
	color: inherit;
}

:lang(nb-NO) .fagbok-printsection .fagbok-print.fagbok-tekst .wp-block-group.fagbok-tekst,
:lang(nn-NO) .fagbok-printsection .fagbok-print.fagbok-tekst .wp-block-group.fagbok-tekst{
	margin-bottom: 0;
}

.fagbok-printsection .fagbok-print.fagbok-tekst>div:first-child{
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
}

/* keep text blocks at their natural height, so fixTheTextHeight() measures real text height */
.fagbok-printsection .fagbok-print.fagbok-tekst>div:first-child>*{
	flex-shrink: 0;
}

.fagbok-printsection .fagbok-blokk,
.fagbok-printsection .fagbok-control{
	display: none !important;
}

.fagbok-printsection .print-forfatter {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    padding: 50pt;
}

.fagbok-printsection .print-forfatter figure {
    width: 40%;
}

.fagbok-printsection .print-forfatter .wp-block-media-text__content {
    width: 60%;
}

.fagbok-printsection .print-bakside {
	padding: 30pt 60pt;
	direction: ltr;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.fagbok-printsection .print-bakside p img {
    height: 25pt;
}

.fagbok-printsection .fagbok-sidetall {
    font-family: 'muli' !important;
    font-size: 12pt !important;
    position: absolute;
    bottom: 20pt;
    left: 20pt;
}

/*generell font*/
/*.fagbok-printsection p{*/
.fagbok-printsection .fagbok-tekst *{
	font-size: 25pt;
	line-height: 1.5;
	margin-bottom: 2pt;
}

/* Paragraph gap larger than the line gap, so each sentence reads as one unit */
.fagbok-printsection .fagbok-tekst p{
	margin-bottom: 0.6em;
}

/*language font urdu*/
:lang(ur) .fagbok-printsection,
:lang(ur) .fagbok-printsection *{ 
	font-family: "NotoNastaliqUrdu";
	font-size: 25pt;
	line-height: 2.5;
}

:lang(ur) .fagbok-printsection h1{ 
	font-size: 25pt;
}

/*language font dari, pashto, farsi, sorani*/
:lang(fa-AF) .fagbok-printsection,
:lang(prs) .fagbok-printsection,
:lang(ku-ckb) .fagbok-printsection,
:lang(ckb) .fagbok-printsection,
:lang(fa-IR) .fagbok-printsection,
:lang(ps) .fagbok-printsection,
:lang(fa-AF) .fagbok-printsection *,
:lang(prs) .fagbok-printsection *,
:lang(ku-ckb) .fagbok-printsection *,
:lang(ckb) .fagbok-printsection *,
:lang(fa-IR) .fagbok-printsection *,
:lang(ps) .fagbok-printsection *{ 
	font-family: "Calibri";
	font-size: 25pt;
}

[dir="rtl"] .fagbok-printsection h1 .fagbok-morsmal-tittel{
    font-size: 50pt;
}

/*language font arabic*/
:lang(ar) .fagbok-printsection,
:lang(ar) .fagbok-printsection *{ 
	font-family: "Arial";
	font-size: 25pt;
}

/* RTL scripts (ar, ur, fa, prs, ps, ckb ...) look smaller than Latin at the same size, so enlarge only the
   morsmal text. Norwegian text on the same page keeps 25pt. fixTheTextHeight() shrinks both proportionally if needed. */
html[dir="rtl"] .fagbok-printsection .fagbok-tekst .fagbok-morsmal *{
	font-size: 35pt;
}

.fagbok-printsection.fagbok-norsk .fagbok-morsmal{
    display:none;
}

.fagbok-printsection:not(.fagbok-norsk) .bokmal-tekst:before,
.fagbok-printsection:not(.fagbok-norsk) .nynorsk-tekst:before{
    /* thin centred rule marking the switch between languages */
    content: "";
    display: block;
    width: 10%;
    margin: 14pt auto 18pt;
    border-top: 1.5pt solid #bbb;
    font-size: 0;
    line-height: 0;
}

.fagbok-printsection .print-forside .sprak.morsmal-norsk {
    font-size: 14pt;
}

.fagbok-printsection+footer{
	display: none;
}

.fagbok-printsection .fagbok-cc {
    width: 100%;
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
	margin: 10pt 0 0 0;
}

.fagbok-printsection .fagbok-cc p{
    font-size: 7pt !important;
}

.fagbok-printsection .fagbok-print.print-kolofon {
    padding: 50pt;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
	direction: ltr;
}

.fagbok-printsection .print-kolofon .fagbok-kreditering *,
.fagbok-printsection .print-kolofon .fagbok-lisens *{
    margin-bottom: 1px;
    line-height: 1.5;
    font-size: 10pt !important;
}

.fagbok-printsection .print-kolofon .fagbok-lisens img{
	display: none;
}

.fagbok-printsection .print-kolofon .fagbok-lisens br:first-of-type {
    display: none;
}

.fagbok-printsection .print-kolofon .fagbok-isbn,
.fagbok-printsection .print-kolofon .fagbok-isbn + .wp-block-spacer,
.fagbok-printsection .fagbok-tekst .wp-block-spacer{
	display: none;
}

.fagbok-printsection a.glossaryLink {
    border-bottom: none;
}

/*forsidelyden under tittelen - samme spiller i en enkel utgave: bare spill av/pause og tid, uten tidslinje og lyd av/på.
  Pilleformen er bare så bred som innholdet.*/
.fagbok-lydspiller.fagbok-lydspiller-enkel {
	display: inline-flex;
	width: auto;
	max-width: none;
	gap: 0.625rem;
	padding-right: 1rem;
}

.wp-block-audio.har-lydknapp {
	margin: 0;
}

/*spilleren tilpasser seg plassen den faktisk har (container queries nederst), ikke skjermbredden -
  i mobilraden står den klemt mellom forrige- og neste-pilene*/
.wp-block-audio.har-lydknapp {
	container-type: inline-size;
	container-name: lydspiller;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
}

/*containeren har ingen egen innholdsbredde - i tekstboksen (kadence-kolonnen) og andre bokser som
  krymper rundt innholdet ville lyden ellers klappet sammen og bare vist knappene*/
.fagbok-blokk .wp-block-kadence-column .wp-block-audio.har-lydknapp {
	flex: 1 1 100%;
	align-self: stretch;
}

/*fagbok - lydspiller (all lyd utenom forsidelyden): spill av/pause, tid, tidslinje og lyd av/på i en pilleform*/
.fagbok-lydspiller {
	--lydspiller-farge: #006d42;
	--lydspiller-farge-mork: #00522f;
	--lydspiller-spor: #d6dee4;
	--lydspiller-lastet: #b3c1cb;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	max-width: 25rem;
	margin: 0;
	padding: 0.375rem 0.5rem 0.375rem 0.375rem;
	border: 1px solid #d5dde3;
	border-radius: 999px;
	background: #f5f8fa;
	color: #2f3b45;
	font-family: 'muli';
	font-size: 1rem;
	line-height: 1;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.fagbok-lydspiller:hover,
.fagbok-lydspiller.spiller {
	border-color: #cfd8df;
	box-shadow: 0 1px 4px rgba(20, 40, 55, 0.08);
}

/*knappene i spilleren nullstiller temaets knappestil*/
.fagbok-lydspiller button {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, transform 0.1s;
}

.fagbok-lydspiller button:focus-visible {
	outline: 2px solid var(--lydspiller-farge) !important;
	outline-offset: 2px;
}

.fagbok-lydspiller button svg {
	display: block;
}

/*spill av/pause - rund, fylt knapp i fagbokgrønt*/
.fagbok-lydspiller .fagbok-lydspiller-spill {
	width: 34px;
	height: 34px;
	background: var(--lydspiller-farge) !important;
	color: #ffffff !important;
}

.fagbok-lydspiller .fagbok-lydspiller-spill:hover {
	background: var(--lydspiller-farge-mork) !important;
}

.fagbok-lydspiller .fagbok-lydspiller-spill:active {
	transform: scale(0.94);
}

.fagbok-lydspiller .fagbok-lydspiller-spill .fagbok-lydknapp-ikon,
.fagbok-lydspiller .fagbok-lydspiller-spill svg {
	display: block;
	width: 16px;
	height: 16px;
}

/*fast bredde på sifrene, slik at tidslinjen ikke hopper under avspilling*/
.fagbok-lydspiller .fagbok-lydspiller-tid,
.fagbok-lydspiller .fagbok-lydspiller-tid * {
	line-height: 1;
}

.fagbok-lydspiller .fagbok-lydspiller-tid {
	flex: none;
	font-size: 0.875rem;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	color: #4e5a63;
}

/*lyd av/på - diskret ikonknapp*/
.fagbok-lydspiller .fagbok-lydspiller-demp {
	width: 36px;
	height: 36px;
	background: transparent !important;
	color: #4e5a63 !important;
}

.fagbok-lydspiller .fagbok-lydspiller-demp:hover {
	background: #e3e9ee !important;
	color: #1f2a33 !important;
}

.fagbok-lydspiller .fagbok-lydspiller-demp svg {
	width: 20px;
	height: 20px;
}

/*tidslinjen - spilt del i grønt, lastet del lysere grå. Prosentene settes av fb-script.js*/
.fagbok-lydspiller .fagbok-lydspiller-spor {
	--fremdrift: 0%;
	--lastet: 0%;
	-webkit-appearance: none;
	appearance: none;
	flex: 1 1 0;
	width: auto;
	min-width: 2rem;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.fagbok-lydspiller .fagbok-lydspiller-spor:disabled {
	cursor: default;
}

.fagbok-lydspiller .fagbok-lydspiller-spor:focus {
	outline: none;
}

.fagbok-lydspiller .fagbok-lydspiller-spor::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: 3px;
	background: linear-gradient(to right,
		var(--lydspiller-farge) var(--fremdrift),
		var(--lydspiller-lastet) var(--fremdrift),
		var(--lydspiller-lastet) var(--lastet),
		var(--lydspiller-spor) var(--lastet));
}

.fagbok-lydspiller .fagbok-lydspiller-spor::-moz-range-track {
	height: 6px;
	border-radius: 3px;
	background: linear-gradient(to right,
		var(--lydspiller-farge) var(--fremdrift),
		var(--lydspiller-lastet) var(--fremdrift),
		var(--lydspiller-lastet) var(--lastet),
		var(--lydspiller-spor) var(--lastet));
}

.fagbok-lydspiller .fagbok-lydspiller-spor::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	margin-top: -5px;
	border: 2px solid #ffffff;
	border-radius: 50%;
	background: var(--lydspiller-farge);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s;
}

.fagbok-lydspiller .fagbok-lydspiller-spor::-moz-range-thumb {
	box-sizing: border-box;
	width: 16px;
	height: 16px;
	border: 2px solid #ffffff;
	border-radius: 50%;
	background: var(--lydspiller-farge);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s;
}

.fagbok-lydspiller .fagbok-lydspiller-spor:hover::-webkit-slider-thumb,
.fagbok-lydspiller .fagbok-lydspiller-spor:active::-webkit-slider-thumb {
	transform: scale(1.2);
}

.fagbok-lydspiller .fagbok-lydspiller-spor:hover::-moz-range-thumb,
.fagbok-lydspiller .fagbok-lydspiller-spor:active::-moz-range-thumb {
	transform: scale(1.2);
}

/*tastaturfokus på tidslinjen markeres på håndtaket*/
.fagbok-lydspiller .fagbok-lydspiller-spor:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px var(--lydspiller-farge);
}

.fagbok-lydspiller .fagbok-lydspiller-spor:focus-visible::-moz-range-thumb {
	box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px var(--lydspiller-farge);
}

/*ingen håndtak før lengden er kjent*/
.fagbok-lydspiller .fagbok-lydspiller-spor:disabled::-webkit-slider-thumb {
	visibility: hidden;
}

.fagbok-lydspiller .fagbok-lydspiller-spor:disabled::-moz-range-thumb {
	visibility: hidden;
}

/*lyd av/på vises alltid - de andre delene viker plass når spilleren blir smal*/

/*smal spiller: tettere avstand, mindre knapper og tekst*/
@container lydspiller (max-width: 320px) {
	.fagbok-lydspiller {
		gap: 0.375rem;
		padding: 0.25rem 0.25rem 0.25rem 0.25rem;
	}

	.fagbok-lydspiller .fagbok-lydspiller-demp {
		width: 32px;
		height: 32px;
	}

	.fagbok-lydspiller .fagbok-lydspiller-demp svg {
		width: 18px;
		height: 18px;
	}

	.fagbok-lydspiller .fagbok-lydspiller-tid {
		font-size: 0.8125rem !important;
	}
}

/*smalere: bare spilletiden vises, lengden tas bort*/
@container lydspiller (max-width: 260px) {
	.fagbok-lydspiller .fagbok-lydspiller-lengde {
		display: none;
	}
}

/*svært smal: tiden tas bort - spill av, tidslinje og lyd av/på står igjen*/
@container lydspiller (max-width: 190px) {
	.fagbok-lydspiller .fagbok-lydspiller-tid {
		display: none;
	}
}

/*for smal til tidslinje: bare spill av/pause og lyd av/på, uten pilleform rundt*/
@container lydspiller (max-width: 120px) {
	.fagbok-lydspiller {
		width: auto;
		padding: 0;
		border: 0;
		background: transparent;
		box-shadow: none !important;
	}

	.fagbok-lydspiller .fagbok-lydspiller-spor {
		display: none;
	}
}

/*forsidelyden under boktittelen*/
.fagbok-tittellyd {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5em;
	margin-top: 0.5em;
}

/*boktittelen står over brødteksten på første side og følger tekstspalta, ikke midtstillingen i headeren*/
.fagbok-blokk .fagbok-tekst .entry-title {
	margin: 0 0 1rem 0;
}

/*boktittelen (h1) i fagbok-blokka - egen skala, uavhengig av brødteksten (2.5rem).
  Tittelen er ca. 1.6-1.8 ganger brødteksten, med tett linjeavstand, slik at den leses som overskrift.
  Tilpasningen av tekststørrelse i fb-script.js hopper over h1, så størrelsen er fast mellom sidene.
  !important trengs for å slå .fagbok-tekst * og språkreglene i style.css (f.eks. :lang(ar) .morsmal-sprak).*/
.fagbok-blokk .fagbok-tekst h1.entry-title,
.fagbok-blokk .fagbok-tekst h1.entry-title * {
	font-size: clamp(2.75rem, 1.75rem + 2.5vw, 4.5rem) !important;
	font-weight: 700;
	line-height: 1.2 !important;
	margin-bottom: 0;
	color: #006d42;
	margin-top: 0.1em;
}

/*norsk bokmål og nynorsk - bare én tittel, den står alene og får full størrelse*/
.fagbok-blokk .fagbok-tekst h1.entry-title span.norsk-sprak-single {
	font-size: clamp(2.75rem, 1.75rem + 2.5vw, 4.5rem) !important;
}

/*tospråklig tittel - morsmålet er hovedtittelen, den norske står over som en mindre undertittel*/
.fagbok-blokk .fagbok-tekst h1.entry-title span.morsmal-sprak,
.fagbok-blokk .fagbok-tekst h1.entry-title span.morsmal-sprak * {
	font-size: clamp(2.75rem, 1.75rem + 2.5vw, 4.5rem) !important;
}

.fagbok-blokk .fagbok-tekst h1.entry-title span.norsk-sprak,
.fagbok-blokk .fagbok-tekst h1.entry-title span.norsk-sprak * {
	font-size: clamp(1.75rem, 1.25rem + 1.25vw, 2rem) !important;
	font-weight: 100;
	color: #4e5a63;
}

.fagbok-blokk .fagbok-tekst h1.entry-title span.norsk-sprak {
	margin-bottom: 0.5rem;
}

/*urdu (Nastaliq) har høye bokstavformer og trenger mer linjeavstand*/
html:lang(ur) .fagbok-blokk .fagbok-tekst h1.entry-title span.morsmal-sprak,
html:lang(ur) .fagbok-blokk .fagbok-tekst h1.entry-title span.morsmal-sprak * {
	line-height: 2 !important;
}

/*lyden som hører til brødteksten og lyden som hører til tekstboksen i fagbok-blokka*/
.fagbok-blokk .fagbok-tekst-lyd,
.fagbok-blokk .fagbok-tekstboks-lyd {
	margin: 0.5em 0 0 0;
}

/*teksten i blokka er satt i 2.5rem - knappen beholder sin egen størrelse*/
.fagbok-blokk .fagbok-tekst .fagbok-tekst-lyd,
.fagbok-blokk .fagbok-tekst .fagbok-tekst-lyd *,
.fagbok-blokk .fagbok-tekst .fagbok-tekstboks-lyd,
.fagbok-blokk .fagbok-tekst .fagbok-tekstboks-lyd *,
.fagbok-blokk .fagbok-tekst .fagbok-tittellyd-i-tekst,
.fagbok-blokk .fagbok-tekst .fagbok-tittellyd-i-tekst * {
	font-size: 1rem !important;
	line-height: 1 !important;
	margin-bottom: 0;
}

/*forsidelyden står rett under tittelen og følger tekstspalta i stedet for den midtstilte raden i headeren*/
.fagbok-blokk .fagbok-tekst .fagbok-tittellyd-i-tekst {
	justify-content: flex-start;
	gap: 0;
	margin: 0 0 1rem 0;
}

/*lydfilene kan ikke printes*/
.fagbok-printsection .wp-block-audio {
	display: none !important;
}

@media (max-width: 600px) {
    .single .fagbok-blokk figure.wp-block-media-text__media { margin: 0.5em 1em; }
    .single .fagbok-blokk img.staende { width: auto; max-height: 25vh; }
    .fagbok-control { margin: 1.5rem 0; }

    /*mobil: forrige, lydknapp og neste på én rad - i stedet for to stablede kolonner.
      Fit-skriptet i fb-script.js måler høyden på .fagbok-control, så plassen som spares går til teksten.
      Kjernestilen for kolonner tvinger flex-wrap og flex-basis:100% med !important under 782px.*/
    .fagbok-blokk .fagbok-control.wp-block-columns {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin: 0.75rem 0;
    }

    /*lydkolonnen står i midten og tar ledig bredde*/
    .fagbok-blokk .fagbok-control.wp-block-columns > .wp-block-column:first-child {
        flex: 1 1 auto !important;
        order: 2;
        min-width: 0;
    }

    /*pilkolonnen og ikonbeholderen løses opp, slik at forrige og neste blir egne elementer i raden.*/
    .fagbok-control > .wp-block-column:nth-child(2),
    .fagbok-control .kt-svg-icons {
        display: contents;
    }

    .fagbok-control .forrige { order: 1; }
    .fagbok-control .neste   { order: 3; }

    /*48px - fortsatt over minste anbefalte trykkflate (44px)*/
    .fagbok-control .forrige svg,
    .fagbok-control .neste svg {
        width: 3rem;
        height: 3rem;
    }

    /*mobil: spilleren deler raden med forrige/neste og fyller plassen mellom dem.
      Hva som vises i spilleren styres av bredden den får (container queries ved .fagbok-lydspiller).*/
    .fagbok-control .wp-block-audio.har-lydknapp {
        width: 100%;
    }

    .fagbok-control .fagbok-lydspiller {
        max-width: none;
    }
}

html { scroll-snap-type: y mandatory; }
.single .fagbok-blokk { scroll-snap-align: start; }

/* make the header, title area and footer reachable stops too */
.site-header,
.entry-header,
.entry-content .vilkar-for-gjenbruk,
.meta-list { scroll-snap-align: start; }

@media print {

.fagbok-printsection{
	display: block;
}

}
