/* ==========================================================================
   help.aritma.com: the header, the "Produkter" and phone menus, the contact
   block and the footer of every help centre page.

   Loaded by help-header itself (require_css), so no page that has the header
   can miss it, and before help.css, so the page files keep the last word.
   The knowledge base cannot use the theme: it gets the same markup from the
   page /kb-shell-nb (/kb-shell-en, template kb-shell), whose #kb-shell
   carries a link to this file, and kb-site.css comes after it there.

   Also here, since the header needs them: the design tokens, the font, the
   container, the screen reader and skip link helpers and the button.

   Regular weight only, hierarchy from size and colour, 5 px controls and
   10 px cards, no tracked uppercase labels, left-border accents or arrows in
   buttons. Every selector starts with .kb- so nothing reaches main.css or
   other templates.
   ========================================================================== */

/* Same font file the knowledge base on help.aritma.com already serves. */
@font-face {
  font-family: 'Aritma Uten';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://help.aritma.com/hubfs/AritmaUten1.0-Regular.ttf')
    format('truetype');
}

.kb-page,
.kb-guide,
.kb-header,
.kb-help,
.kb-footer {
  --kb-indigo: #45095a;
  --kb-pink: #fb8caf;
  --kb-seashell: #f9f0ee;
  --kb-white: #ffffff;
  --kb-blue: #2549d2;
  --kb-indigo-70: #7d538b;
  --kb-text: #222222;
  --kb-border: rgba(69, 9, 90, 0.23);
  --kb-on-dark-line: rgba(249, 240, 238, 0.3);
  --kb-on-dark-muted: rgba(249, 240, 238, 0.78);
  --kb-card-alt: #fff7f5;
  --kb-measure: 760px;
  --kb-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --kb-radius-sm: 5px;
  --kb-radius-md: 10px;
  --kb-space-1: 4px;
  --kb-space-2: 8px;
  --kb-space-3: 16px;
  --kb-space-4: 24px;
  --kb-space-5: 32px;
  --kb-space-6: 48px;
  --kb-space-7: 64px;
  --kb-font: 'Aritma Uten', 'Aritma Uten 1.0', Inter, system-ui, -apple-system,
    'Segoe UI', sans-serif;
  font-family: var(--kb-font);
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}

.kb-header :is(p, ul, ol, li),
.kb-footer :is(h2, p, ul, ol, li) {
  margin: 0;
  padding: 0;
  font-weight: 400;
}

/* main.css sets its own font-family on every heading, so headings do not
   inherit the one set on the containers above. */
.kb-footer h2 {
  font-family: var(--kb-font);
  color: inherit;
}

.kb-header ul,
.kb-footer ul {
  list-style: none;
}

.kb-header a,
.kb-footer a {
  color: inherit;
}

.kb-header img,
.kb-footer img {
  display: block;
}

.kb-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--kb-space-6);
}

.kb-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.kb-skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 50;
  padding: 8px 16px;
  border-radius: 5px;
  background: #ffffff;
  color: #45095a;
}
.kb-skip:focus {
  top: 16px;
}

.kb-header :focus-visible,
.kb-footer :focus-visible {
  outline: 2px solid var(--kb-seashell);
  outline-offset: 2px;
}

/* Buttons: one shape. The label stands alone. */
.kb-button {
  display: inline-block;
  padding: var(--kb-space-3) var(--kb-space-4);
  border: 0;
  border-radius: var(--kb-radius-sm);
  font-family: inherit;
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.kb-button:hover {
  text-decoration: underline;
}
.kb-mobile .kb-button--dark {
  background-color: var(--kb-indigo);
  color: var(--kb-seashell);
}
.kb-header .kb-button--light {
  background-color: var(--kb-white);
  color: var(--kb-indigo);
}

/* ===== Header ===== */
.kb-header {
  position: relative;
  z-index: 20;
  padding: var(--kb-space-5) 0;
  background-color: var(--kb-indigo);
  color: var(--kb-seashell);
}
/* Straight into an indigo band below: the two read as one. */
.kb-header--joined {
  padding-bottom: var(--kb-space-4);
}
.kb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--kb-space-4);
}
.kb-header__start {
  display: flex;
  align-items: center;
  gap: var(--kb-space-5);
  min-width: 0;
}
.kb-header__brand {
  display: flex;
  align-items: center;
  gap: var(--kb-space-3);
  text-decoration: none;
}
.kb-header__brand span {
  font-size: 18px;
  line-height: 28px;
  white-space: nowrap;
}
.kb-header__nav {
  display: flex;
  align-items: center;
  gap: var(--kb-space-5);
  font-size: 14px;
  line-height: 20px;
}
.kb-header__nav > a {
  text-decoration: none;
  white-space: nowrap;
}
.kb-header__nav > a:hover,
.kb-header__nav > a[aria-current] {
  text-decoration: underline;
}
.kb-header__nav .kb-button {
  padding: var(--kb-space-2) var(--kb-space-3);
  font-size: 14px;
  line-height: 20px;
}
.kb-header__nav .kb-show-sm,
.kb-header__nav .kb-show-md {
  display: none;
}
/* The knowledge base search in the bar (help-search, view "header"). Same box
   and field as the knowledge base header snippet (kb-site.base.css), so the
   bar looks the same on theme pages and knowledge base pages. */
.kb-header__search {
  display: flex;
  align-items: center;
  width: 280px;
  margin: 0;
  padding: var(--kb-space-2) var(--kb-space-3);
  border: 1px solid var(--kb-on-dark-line);
  border-radius: var(--kb-radius-sm);
  color: var(--kb-seashell);
  font-size: 14px;
  line-height: 20px;
}
.kb-header__search:focus-within {
  outline: 2px solid var(--kb-seashell);
  outline-offset: 2px;
}
.kb-header .kb-header__search input[type='search'] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  color: inherit;
  font-family: var(--kb-font);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}
.kb-header .kb-header__search input[type='search']::placeholder {
  color: inherit;
  opacity: 1;
}
.kb-header
  .kb-header__search
  input[type='search']::-webkit-search-cancel-button {
  filter: invert(1);
}
.kb-header .kb-menu__panel :focus-visible,
.kb-header .kb-mobile :focus-visible {
  outline-color: var(--kb-blue);
}

/* kb-menu: "Produkter". A disclosure, not a hover menu: it opens on click and
   closes on a second click, Escape or a click outside. */
.kb-menu {
  position: relative;
}
.kb-header .kb-menu__button {
  display: inline-flex;
  align-items: center;
  gap: var(--kb-space-1);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}
.kb-header .kb-menu__button:hover,
.kb-header .kb-menu__button[aria-expanded='true'],
.kb-header .kb-menu__button[aria-current] {
  text-decoration: underline;
}
.kb-menu__button svg {
  width: 12px;
  height: 12px;
  transition: transform 0.15s;
}
.kb-menu__button[aria-expanded='true'] svg {
  transform: rotate(180deg);
}
.kb-menu__panel {
  position: absolute;
  top: calc(100% + var(--kb-space-4));
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  border-radius: var(--kb-radius-md);
  background-color: var(--kb-white);
  color: var(--kb-indigo);
  box-shadow: 0 16px 32px rgba(69, 9, 90, 0.16);
  overflow: hidden;
}
.kb-menu__panel[hidden],
.kb-mobile[hidden] {
  display: none;
}
.kb-menu__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--kb-space-4);
  padding: var(--kb-space-4);
}
.kb-menu__group > p {
  margin-bottom: var(--kb-space-2);
  padding: 0 var(--kb-space-3);
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-indigo-70);
}
.kb-menu__group a {
  display: block;
  padding: var(--kb-space-2) var(--kb-space-3);
  border-radius: var(--kb-radius-sm);
  text-decoration: none;
}
.kb-menu__group a:hover,
.kb-menu__group a[aria-current] {
  background-color: var(--kb-seashell);
}
.kb-menu__group a:hover .kb-menu__name {
  text-decoration: underline;
}
.kb-menu__name {
  display: block;
  font-size: 16px;
  line-height: 26px;
}
.kb-menu__desc {
  display: block;
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-text);
}
.kb-menu__more {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kb-space-2) var(--kb-space-5);
  padding: var(--kb-space-3) var(--kb-space-5);
  border-top: 1px solid var(--kb-border);
  background-color: var(--kb-card-alt);
  font-size: 14px;
  line-height: 20px;
}
.kb-menu__more a {
  text-decoration: none;
}
.kb-menu__more a:hover {
  text-decoration: underline;
}

/* "Meny": the whole nav under 640 px. */
.kb-header .kb-menu-toggle {
  display: none;
  margin: 0;
  padding: var(--kb-space-2) var(--kb-space-3);
  border: 1px solid var(--kb-on-dark-line);
  border-radius: var(--kb-radius-sm);
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}
.kb-mobile {
  display: none;
}

/* ===== Footer ===== */
.kb-footer {
  padding: var(--kb-space-6) 0 var(--kb-space-5);
  background-color: var(--kb-indigo);
  color: var(--kb-seashell);
}
.kb-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: var(--kb-space-5);
}
.kb-footer .kb-footer__address {
  max-width: 320px;
  margin-top: var(--kb-space-3);
  font-size: 14px;
  line-height: 20px;
}
.kb-footer h2 {
  margin-bottom: var(--kb-space-3);
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-pink);
}
.kb-footer li + li {
  margin-top: var(--kb-space-2);
}
.kb-footer a {
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}
.kb-footer a:hover {
  text-decoration: underline;
}
.kb-footer__bottom {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--kb-space-4);
  margin-top: var(--kb-space-6);
  padding-top: var(--kb-space-3);
  border-top: 1px solid var(--kb-on-dark-line);
  font-size: 14px;
  line-height: 20px;
}
.kb-footer__bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kb-space-2) var(--kb-space-4);
}
.kb-footer__bottom li + li {
  margin-top: 0;
}

/* ===== Contact block: "Fant du ikke svaret?" above the footer =====
   On the knowledge base pages, from the kb-shell page with the header and
   footer; the target of the old "Kontakt support" links (#kontakt). */
.kb-help {
  padding: 64px 0;
  background-color: var(--kb-seashell);
  color: var(--kb-indigo);
}
.kb-help :is(p, h2) {
  margin: 0;
  padding: 0;
  font-weight: 400;
  font-family: var(--kb-font);
}
.kb-help :focus-visible {
  outline: 2px solid var(--kb-blue);
  outline-offset: 2px;
}
.kb-help__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 48px;
  padding: 32px;
  border-radius: var(--kb-radius-md);
  background-color: var(--kb-white);
}
.kb-help h2 {
  font-size: 24px;
  line-height: 34px;
  color: var(--kb-indigo);
  text-wrap: balance;
}
.kb-help p {
  margin-top: 4px;
  color: var(--kb-text);
}
.kb-help__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.kb-help .kb-button--dark {
  background-color: var(--kb-indigo);
  color: var(--kb-seashell);
}

/* "Søk" under 1121 px (help-header's script; kb-site.js on the knowledge
   base): opens the bar's own field in a row under the bar, full width, with
   "Lukk" in it. The field's text is 16 px there so phones do not zoom in. */
.kb-header__search-close {
  display: none;
}

/* ===== Responsive ===== */
@media (max-width: 1280px) {
  .kb-header__nav .kb-hide-md {
    display: none;
  }
}

@media (max-width: 1100px) {
  .kb-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .kb-footer__grid > div:first-child {
    grid-column: 1 / -1;
  }
}

/* The header bar keeps Tema, Produkter, the language link and Kontakt support
   down to 641 px; to make room the search field becomes a Søk button, then the
   site name goes. */
@media (max-width: 1120px) {
  .kb-header__search {
    display: none;
  }
  .kb-header__nav .kb-show-md {
    display: inline-block;
  }
}

@media (max-width: 920px) {
  .kb-header__brand span {
    display: none;
  }
  .kb-header__nav {
    gap: var(--kb-space-4);
  }
}
@media (max-width: 1120px) {
  .kb-header.kb-header--search-open .kb-header__inner {
    flex-wrap: wrap;
    row-gap: var(--kb-space-3);
  }
  .kb-header.kb-header--search-open .kb-header__start {
    display: contents;
  }
  .kb-header.kb-header--search-open form.kb-header__search {
    box-sizing: border-box;
    display: flex;
    order: 3;
    flex: 1 0 100%;
    gap: var(--kb-space-3);
    width: 100%;
    min-height: 48px;
    padding: 4px 4px 4px var(--kb-space-3);
    border-color: var(--kb-seashell);
  }
  .kb-header.kb-header--search-open .kb-header__search input[type='search'] {
    height: 24px;
    font-size: 16px;
    line-height: 24px;
  }
  .kb-header.kb-header--search-open .kb-header__search-close {
    display: inline-flex;
    flex: none;
    align-items: center;
    min-height: 40px;
    margin: 0;
    padding: 0 var(--kb-space-2);
    border: 0;
    border-radius: var(--kb-radius-sm);
    background: none;
    color: var(--kb-seashell);
    font-family: var(--kb-font);
    font-size: 14px;
    line-height: 20px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
  }
  .kb-header .kb-header__search-close:focus-visible {
    outline: 2px solid var(--kb-seashell);
    outline-offset: -2px;
  }
  /* Open: the button steps back to an outline, the field below is the thing to use. */
  .kb-header .kb-header__nav .kb-show-md[aria-expanded='true'] {
    background-color: transparent;
    color: var(--kb-seashell);
    box-shadow: inset 0 0 0 1px var(--kb-seashell);
  }
}

@media (max-width: 640px) {
  .kb-container {
    padding-left: var(--kb-space-4);
    padding-right: var(--kb-space-4);
  }
  .kb-header {
    padding: var(--kb-space-4) 0;
  }
  .kb-header__nav {
    gap: var(--kb-space-2);
  }
  .kb-header__nav > a:not(.kb-button),
  .kb-header__nav .kb-hide-sm,
  .kb-header__nav .kb-menu,
  .kb-header__search,
  .kb-header__brand span {
    display: none;
  }
  .kb-header__nav .kb-show-sm,
  .kb-header .kb-menu-toggle {
    display: inline-block;
  }
  .kb-header__brand img {
    width: 112px;
    height: auto;
  }
  .kb-mobile:not([hidden]) {
    display: block;
    margin-top: var(--kb-space-4);
    padding: var(--kb-space-3) var(--kb-space-4) var(--kb-space-4);
    background: var(--kb-white);
    color: var(--kb-indigo);
  }
  .kb-mobile > ul > li > a {
    display: block;
    padding: var(--kb-space-3) 0;
    border-bottom: 1px solid var(--kb-border);
    font-size: 18px;
    line-height: 28px;
    text-decoration: none;
  }
  .kb-mobile .kb-menu__group {
    padding: var(--kb-space-3) 0;
    border-bottom: 1px solid var(--kb-border);
  }
  .kb-mobile .kb-menu__group > p {
    padding: 0;
  }
  .kb-mobile .kb-menu__group a {
    margin: 0 calc(-1 * var(--kb-space-2));
    padding: var(--kb-space-2);
  }
  .kb-mobile .kb-button {
    display: block;
    margin-top: var(--kb-space-4);
  }
  .kb-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .kb-help {
    padding: 48px 0;
  }
  .kb-help__row {
    padding: 24px;
  }
}
