/* tiny sin css */

/*
 Alignment using classes rather than inline styles
 check out the "formats" option
*/

:root{
  --image-aside: calc((1200px - var(--max-width-text)) / 2 + 2 *  var(--spacing-l));
  --image-aside-compact: calc((100vw - var(--max-width-text)) / 2 + 2 *  var(--spacing-l));
}

body#tinymce  {
  background-color: unset;
}

.hero {
  height: var(--spacing-5xl);
}

main > div:nth-child(n) {
  max-width: var(--max-width-text);
}






/* bilder */

.ukWordWrapper img {
  border-radius: var(--border-radius-m);  
}

.figureWrapper, p > img {
  margin: var(--spacing-xl) auto;
  height:max-content;
}

.figureWrapper:has(img.img_aside) {
  margin: 0 auto -1em;
}


.img_hotpink {
  background-color: hotpink;
  padding: 10px;
}

.img_sickomode {
  filter: invert(100%) contrast(180%) hue-rotate(180deg) drop-shadow(8px 8px 10px green) ;
}


img.align-left {
  float: left;
}


img.align-right {
  float: right;
}


/* bildetekst */



figcaption {
  font-size: var(--T3);
  line-height: 1rem;
}


.figureWrapper, p > img {
  display: flex;
  justify-content: center;
}

.figureWrapper figure.image {
  max-width: 100%;
  display: inline-block;
  margin: 0 auto;
}


figure.image figcaption {
  text-align: center;
  width: 100%;
}


figure.image img {
  margin: 0;
}

figure.image img, p > img {
  max-width: 100%;
  height: auto;
}






/* sidestilte bilder */

@media screen and (min-width: 1024px) {

  p:has(.img_aside), span:has(.img_aside){
    position: relative;
  }

  p .img_aside, figure.image:has(.img_aside) {
    position: absolute;
  }

}

@media screen and (min-width: 1024px) and (max-width: 1200px) {

  html:has(.img_aside) .content {
    margin-right: var(--image-aside-compact);
  }
  
 
  p .img_aside, figure.image:has(.img_aside) {
    width: var(--image-aside-compact);
    left:calc(var(--max-width-text) + var(--spacing-xl));
  }
  

  figure.image .img_aside {
    width: var(--image-aside-compact);
  }
}



/* forstørr whitespace på stor skjerm */

@media screen and (min-width: 1200px) {

  html:has(.img_aside) .content {
    margin-right: var(--image-aside);
  }
  
  p .img_aside, figure.image:has(.img_aside){
    width: var(--image-aside); 
    left: calc(var(--max-width-text) + var(--spacing-xxl));
  }
  
  figure .img_aside {
    width: var(--image-aside); 
  }
}







/* For å unngå rar styling inne i editoren */

#tinymce .img_aside, #tinymce figure:has(.img_aside) {
  position: initial;
  height: auto;
  width: auto;
}


.ungKlimaTextWrapper ul {
  padding: 0px 0px 0px var(--spacing-m);
}




/*
* Premium Plugins CSS
*/

/* The Table of Contents Plugin */

.mce-toc {
  border: 1px solid gray;
}

.mce-toc h2 {
  margin: 4px;
}

.mce-toc li {
  list-style-type: none;
}





/* The Checklist Plugin */

.tox-checklist > li:not(.tox-checklist--hidden) {
  list-style: none;
  margin: 0.25em 0;
  position: relative;
}
.tox-checklist > li:not(.tox-checklist--hidden)::before {
  content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
  cursor: pointer;
  height: 1em;
  margin-left: -1.5em;
  margin-top: 0.125em;
  position: absolute;
  width: 1em;
}
.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before {
  content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
}







/* The Page Embed plugin */

.tiny-pageembed--21by9,
.tiny-pageembed--16by9,
.tiny-pageembed--4by3,
.tiny-pageembed--1by1 {
  display: block;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.tiny-pageembed--21by9 {
  padding-top: 42.857143%;
}

.tiny-pageembed--16by9 {
  padding-top: 56.25%;
}

.tiny-pageembed--4by3 {
  padding-top: 75%;
}

.tiny-pageembed--1by1 {
  padding-top: 100%;
}

.tiny-pageembed--21by9 iframe,
.tiny-pageembed--16by9 iframe,
.tiny-pageembed--4by3 iframe,
.tiny-pageembed--1by1 iframe {
  border: 0;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}








/* The Media Embed plugin */

.ephox-summary-card {
  border: 1px solid #AAA;
  box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
  padding: 10px;
  overflow: hidden;
  margin-bottom: 1em;
}

.ephox-summary-card a {
  text-decoration: none;
  color: inherit;
}

.ephox-summary-card a:visited {
  color: inherit;
}

.ephox-summary-card-title {
  font-size: 1.2em;
  display: block;
}

.ephox-summary-card-author {
  color: #999;
  display: block;
  margin-top: 0.5em;
}

.ephox-summary-card-website {
  color: #999;
  display: block;
  margin-top: 0.5em;
}

.ephox-summary-card-thumbnail {
  max-width: 180px;
  max-height: 180px;
  margin-left: 2em;
  float: right;
}

.ephox-summary-card-description {
  margin-top: 0.5em;
  display: block;
}







/* The Footnotes plugin */

div.mce-footnotes hr {
  margin-inline-end: auto;
  margin-inline-start: 0;
  width: 25%;
}

div.mce-footnotes li > a.mce-footnotes-backlink {
  text-decoration: none;
}

@media print {
  sup.mce-footnote a {
    color: black;
    text-decoration: none;
  }
  div.mce-footnotes {
    break-inside: avoid;
    width: 100%;
  }
  div.mce-footnotes li > a.mce-footnotes-backlink {
    display: none;
  }
}








/* test styling av tiny sin accordion */

.mce-accordion {
  width: 100%;
  flex: 1;
  margin-bottom: 5px;
}

.mce-accordion li {
  margin-left: var(--spacing-m);

}


.mce-accordion summary {
  background-color: var(--btn-default);
  cursor: pointer;
  /* width: 100%; */
  border: none;
  text-align: left;
  outline: none;
  font-size: var(--T1);
  font-weight: bold;;
  font-family: Atkinson Hyperlegible;
  border-radius: 16px;
  padding: var(--spacing-l);
}




.mce-accordion summary:focus-visible{
  outline: var(--dotted);
}

.mce-accordion[open]:has(summary:focus-visible) {
  outline: var(--dotted);
  border-radius: var(--border-radius-m);
}

.mce-accordion[open]:has(summary:focus-visible) {
  outline:none;
}

.mce-accordion[open] summary {
  border-radius: 16px 16px 0 0;
  background-color: var(--bg-light);
}



.mce-accordion summary::marker {
  content: '';
}

.mce-accordion summary:after {
  font-family: "Font Awesome 5 Free";
  content: "";
  float: right;
  margin-left: 5px;
  transition: 100ms;
}



.mce-accordion[open] summary:after {
  transform: rotate(90deg);
}

.open, .mce-accordion summary:hover {
  border: none;
}


.mce-accordion > * {
  padding: var(--spacing-s) var(--spacing-l);
  /*display: none;*/
  overflow: hidden;
  background-color: var(--bg-light);
  overflow: unset !important;
  border-radius: 0;
  margin: 0;
}


.mce-accordion ul {
  padding: var(--spacing-l);
}

.mce-accordion > p:first-child {
  padding-top: 0;
}

.mce-accordion ol:first-child {
  margin-top: 0;
}

.mce-accordion > *:last-child {
 border-radius: 0 0 16px 16px ;
}








/* expandables */

.expandable {
  padding: var(--spacing-l);
  border-radius: var(--border-radius-m, var(--spacing-m));
  background: var(--bg-light);

}

.expandable .expandableHeader {
  margin: 0;
  font-weight: bold;
  font-size: var(--T1);
  line-height: var(--lineheight-H4);
}

.expandable > div:is(:first-of-type, :last-of-type) {
  margin: var(--spacing-s) 0;
}


.expandable > div {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ukWordWrapper > div > .expandable > div:not(:first-of-type) {
  display: none;
}

.expanded div {
  white-space: unset;
  overflow: unset;
  text-overflow: unset;
}

.ukWordWrapper > div > .expanded > div:not(:first-of-type) {
  display: block;
}



/*   math */


#tinymce .mathExpression {
  margin-bottom: 1px;
  font-style: italic;
  outline: dashed 1px;
}

#tinymce .mathPreview {
  margin-left: var(--spacing-xxs);
  background-color: var(--form-placeholder);
  display: inline;
}


#tinymce lottie-player {
  outline: var(--dotted);
  outline-offset: 8px;
}



lottie-player {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;

}


#tinymce > ul, #tinymce > ol {
  /*Kun fikse skriftstørrelse (til samme som <p>) på lister som er i teksten, ikke i expandables.*/
  font-size: var(--T1);
}