*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  --tooltip-width: 45vw;
  --visibility: hidden;
  --opacity: 0;
}

body {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    avenir next,
    avenir,
    helvetica neue,
    helvetica,
    ubuntu,
    roboto,
    noto,
    segoe ui,
    arial,
    sans-serif;
  line-height: 1.5;
  font-size: 16px;
  color: #111;
  background: #eee;
}

h1 {
  font-size: 2.25rem;
  font-weight: bold;
  margin: 0.67em 0;
  padding: 0 1rem;
}

@media screen and (min-width: 40em) {
  h1 {
    padding: 0 0 0.5rem 0;
  }
}

a {
  color: #357edd;
}

a:hover {
  text-decoration: none;
}

form {
  display: flex;
  margin: 0 auto;
  max-width: 40em;
  padding: 1rem 1rem 0 1rem;
}

@media screen and (min-width: 40em) {
  form {
    padding: 2rem 0;
  }
}

form input,
form button {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.main input {
  box-shadow: inset 0 1px 3px #ddd;
  vertical-align: middle;
  line-height: 1.5;
  margin: 0;
  margin-right: 0.5em;
  height: 2.8em;
  padding: 0.6em 0.8em;
  border: 1px solid #ccc;
  background-color: #fff;
  border-radius: 4px;
  width: 100%;
  font-size: 1rem;
}

input:focus {
  outline: 0;
  border-color: #129fea;
}

button {
  background: #2f6fc3;
  border-radius: 4px;
  border: 1px solid transparent;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  height: 2.8em;
  padding: 0.75em 1.6em;
  text-decoration: none;
  vertical-align: middle;
}

button:hover,
button:focus {
  filter: alpha(opacity=90);
  background-image: -webkit-linear-gradient(
    transparent,
    rgba(0, 0, 0, 0.05) 40%,
    rgba(0, 0, 0, 0.1)
  );
  background-image: linear-gradient(
    transparent,
    rgba(0, 0, 0, 0.05) 40%,
    rgba(0, 0, 0, 0.1)
  );
}

button:active {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.15) inset,
    0 0 6px rgba(0, 0, 0, 0.2) inset;
  border-color: #000;
}

button:focus-visible {
  outline: 2px solid #2f6fc3;
  outline-offset: 2px;
}

.icon {
  /* match font size */
  width: 1em;
  height: 1em;
  /* match text color */
  fill: currentColor;
}

.dn {
  display: none;
}

.main {
  width: 100%;
  max-width: 40em;
  margin: 0 auto;
}

@media screen and (min-width: 40em) {
  .main {
    padding: 0 1em;
  }
}

.content {
  background: white;
}

/* avoid double border in search field */
.ml-minus {
  margin-left: -1px;
}

/* pure CSS tabs */
.content > div {
  display: none;
}

label:hover,
input:checked + label {
  color: #333;
  background-color: white;
}

#tab1:checked ~ .content #content1,
#tab2:checked ~ .content #content2,
#tab3:checked ~ .content #content3,
#tab4:checked ~ .content #content4,
#tab5:checked ~ .content #content5 {
  display: block;
}

.tab {
  display: inline-block;
  font-size: 1.5rem;
  padding: 1rem;
  padding-bottom: 0.2rem;
  color: #357edd;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
  cursor: pointer;
  margin-right: 4px;
}

.tab:first-of-type {
  margin-left: 1rem;
}

@media screen and (min-width: 40em) {
  .tab:first-of-type {
    margin-left: 0;
  }
}

.tab-content {
  padding: 1em;
}

/* make tabs slimmer on smallest screens */
@media screen and (max-width: 330px) {
  label.pa3 {
    padding-right: 0.95rem;
    padding-left: 0.95rem;
  }
}

/* hide from header */
h1 .vokalparentes {
  display: none;
}

#resultatliste {
  padding: 1em;
}

.resultatliste {
  margin-bottom: 1em;
}

.resultatliste:last-of-type {
  margin-bottom: 0;
}

.resultatliste_linje1 {
  font-size: 1.2em;
}

.artikkeloppslagsord,
.resultatliste_homografnummer,
.resultatliste_oppslagsord {
  font-weight: bold;
}

/* indent */
.hpmaalfoereheimfestingliste,
.resultatliste_linje2 {
  margin-left: 1em;
}

/* make them look like headings */
.hputtalerHead,
.hpetymslisteHead,
.hpaltskriftformarHead,
.hpeldrekjelderHead,
.hpmaalfoereformgruppeinnleiing {
  font-size: 110%;
  font-weight: bold;
  margin-bottom: 0.5em;
}

/* header styles */
h1 > ul {
  margin: 0;
  padding-left: 0;
  font-size: 50%;
  font-weight: normal;
}

h1 > ul > span {
  font-size: 180%;
  font-weight: bold;
}

/* group styles */
.tydingsbolk {
  padding: 0.5em;
}

span > .tydingsbolk,
.tydingVariantInter > .tydingsbolk {
  padding: 0;
}

span > .tydingsbolk > .tydingVariantfri {
  padding: 0.5em;
}

.tydingVariant,
.tydingVariantfri,
.tydingVariantRot {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  margin: 0.5em;
}

.tydingVariant > span,
.tydingVariantRot > span,
.tydingVariantInter > .tydingdefnr,
div.tydingVariantInter > svg {
  margin-left: 0.5em;
}

.tydingTopp,
.tydingToppFull {
  padding: 0.5em 1em;
  background: #eee;
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
}

.tydingBunn,
.tydingVariantfriRot,
.samansettingsrekkjeliste,
.tydingToppFull {
  padding: 0.5em 1em;
}

/* Tooltip */
.tooltip {
  border-bottom: 1px dotted #357edd;
  text-decoration: none;
  color: inherit;
  cursor: help;
  white-space: nowrap;
}

[data-tooltip] {
  position: relative;
  z-index: 10;
}

/* Positioning and visibility settings of the tooltip */
[data-tooltip]:before,
[data-tooltip]:after {
  position: absolute;
  visibility: hidden;
  opacity: 0;
  bottom: calc(100% + 5px);
  pointer-events: none;
}

/* The actual tooltip with a dynamic width */
[data-tooltip]:before {
  content: attr(data-tooltip);
  padding: 10px 18px;
  min-width: 100px;
  /* css variable (with fallback) so the pseudo element can be styled with javascript */
  max-width: 45vw;
  max-width: var(--tooltip-width);
  width: max-content;
  width: -moz-max-content;
  border-radius: 6px;
  font-size: 14px;
  background-color: rgba(59, 72, 80, 0.9);
  background-image: linear-gradient(
    30deg,
    rgba(59, 72, 80, 0.44),
    rgba(59, 68, 75, 0.44),
    rgba(60, 82, 88, 0.44)
  );
  box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.2);
  color: #fff;
  text-align: center;
  white-space: pre-wrap;
}

[data-tooltip].right:before {
  right: 0;
}

/* Tooltip becomes visible at hover */
[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
  visibility: visible;
  opacity: 1;
  /* if variables is supported, wait until text is loaded before showing the tooltip */
  visibility: var(--visibility);
  opacity: var(--opacity);
}
