/* Den ytre rammen følger brødteksten. Selve boksen kan være smalere. */
.lks-factbox {
  --lks-fact-width: 400px;
  box-sizing: border-box;
  width: 100%;
  max-width: 792px;
  margin: 32px auto;
  text-align: left;
}
.lks-factbox--narrow { --lks-fact-width: 400px; }
.lks-factbox--medium { --lks-fact-width: 560px; }
.lks-factbox--full { --lks-fact-width: 792px; }
/* Kolonner styrer avstanden når boksen står ved siden av andre blokker. */
.wp-block-column .lks-factbox { margin-block: 0; }
.lks-factbox .lks-factbox__box {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--lks-fact-width);
  margin: 0 auto 0 0;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 16px;
  background: var(--lks-fact-bg, #fddaca);
  color: var(--lks-fact-text, #000);
  overflow-wrap: anywhere;
  text-align: left;
}
.lks-factbox--center .lks-factbox__box { margin-inline: auto; }
.lks-factbox .lks-factbox__title {
  margin: 0 0 16px;
  padding: 0;
  color: inherit;
  font: inherit;
  font-size: 1.35em;
  font-weight: 700;
  line-height: 1.2;
}
.lks-factbox .lks-factbox__content { margin: 0; padding: 0; color: inherit; }
.lks-factbox .lks-factbox__content ul {
  list-style: disc outside;
  margin: 0;
  padding: 0 0 0 1.25em;
  font-size: inherit;
  line-height: 1.6;
}
.lks-factbox .lks-factbox__content li { margin: 0; padding: 0 0 0 .2em; }
/* Vanlige punkter følger temaet. Valgt WordPress-størrelse arves fra listen. */
.lks-factbox .lks-factbox__content ul[class*="-font-size"] li,
.lks-factbox .lks-factbox__content ul[style*="font-size"] li { font-size: inherit; line-height: inherit; }
.lks-factbox .lks-factbox__content li + li { margin-top: 4px; }
.lks-factbox .lks-factbox__content ul ul { margin-top: 4px; }
.lks-factbox .lks-factbox__content a { color: inherit; text-decoration: underline; }
@media (max-width: 600px) {
  .lks-factbox { margin-block: 24px; }
  .lks-factbox .lks-factbox__box { padding: 24px; border-radius: 12px; }
  .lks-factbox--mobile-left .lks-factbox__box { margin-inline: 0 auto; }
  .lks-factbox--mobile-center .lks-factbox__box { margin-inline: auto; }
}

/* Utfellbare punkter følger uttrykket til Praktisk info, med native details. */
.lks-factbox .wp-block-details { margin: 16px 0 0; padding: 0; color: inherit; }
.lks-factbox .wp-block-details:first-child { margin-top: 0; }
.lks-factbox .wp-block-details + .wp-block-details { margin-top: 0; }
.lks-factbox .wp-block-details[open] + .wp-block-details { margin-top: 8px; }
.lks-factbox .wp-block-details > summary {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding-block: 10px;
  border-top: 1px solid currentColor;
  list-style: none;
  color: inherit;
  font-family: inherit;
  font-size: max(1rem, 1em);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
.lks-factbox .wp-block-details > summary::-webkit-details-marker { display: none; }
.lks-factbox .wp-block-details > summary::marker { content: ''; }
.lks-factbox .wp-block-details > summary::after {
  content: '';
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
}
.lks-factbox .wp-block-details[open] > summary::after {
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}
.lks-factbox .wp-block-details > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.lks-factbox .wp-block-details p { margin: 8px 0 0; color: inherit; }
.lks-factbox .wp-block-details + ul { margin-top: 16px; }
/* Et valgt WordPress-tekstformat skal også gjelde innholdet i utfellbare punkter. */
.lks-factbox .wp-block-details[class*="-font-size"] :is(p, li),
.lks-factbox .wp-block-details[style*="font-size"] :is(p, li) { font-size: inherit; line-height: inherit; }

.lks-factbox .wp-block-details[class*="-font-size"] > summary,
.lks-factbox .wp-block-details[style*="font-size"] > summary { font-size: inherit; }
