/*
 * Lagerboks – beregnerne (2.21.0): antall lagerbokser på Lagerstørrelser, og plassberegneren for minilager.
 *
 * Bygger på minilager.css og sider.css (farger, knapper og tilbudsmerket). Skjermbildet tegnes av
 * assets/js/beregner.js i .lgbx-bg, og tegningene av assets/js/pakker.js. Hver regel har to klasser, så
 * reglene i grunn.css for button, input, p og a ikke slår gjennom. Linja nederst på mobil (.lgbx-bg-linje)
 * ligger rett i <body>, utenfor .lgbx-ml, og har derfor fargene sine skrevet ut.
 *
 * Oppsett: tinglista til venstre og svaret til høyre på pc, der svaret følger med når lista rulles.
 * Under 1000 px står svaret under lista, og linja nederst viser svaret mens kunden blar.
 */

.lgbx-ml .lgbx-bg {
    --bg-felt: #cfd8e3;
    position: relative;
    color: var(--ml-ink);
    font-size: 16px;
    line-height: 1.5;
}

.lgbx-ml .lgbx-bg button,
.lgbx-ml .lgbx-bg input {
    margin: 0;
    color: inherit;
    font: inherit;
    letter-spacing: normal;
    text-shadow: none;
    text-transform: none;
}

.lgbx-ml .lgbx-bg button {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    line-height: inherit;
}

.lgbx-ml .lgbx-bg :focus-visible {
    outline: 3px solid var(--ml-cyan);
    outline-offset: 2px;
}

body .lgbx-ml .lgbx-bg p,
.lgbx-ml .lgbx-bg ul,
.lgbx-ml .lgbx-bg li,
.lgbx-ml .lgbx-bg dl,
.lgbx-ml .lgbx-bg dd,
.lgbx-ml .lgbx-bg figure {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lgbx-ml .lgbx-bg__rute {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    /* Plass til skjermbildet før skriptet har tegnet det, så siden ikke hopper. */
    min-height: 560px;
}

.lgbx-ml .lgbx-bg--klar .lgbx-bg__rute {
    min-height: 0;
}

.lgbx-ml .lgbx-bg__valg,
.lgbx-ml .lgbx-bg__svar {
    padding: 26px 26px 24px;
    border: 1px solid var(--ml-line);
    border-radius: var(--ml-radius);
    background: #fff;
    box-shadow: var(--ml-shadow);
}

.lgbx-ml .lgbx-bg__valg:empty,
.lgbx-ml .lgbx-bg__svar:empty {
    min-height: 560px;
}

.lgbx-ml .lgbx-bg__svar {
    position: sticky;
    top: 96px;
}

body .lgbx-ml .lgbx-bg p.lgbx-bg__uten {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--ml-blue-soft);
    color: var(--ml-navy);
}

.lgbx-ml .lgbx-bg svg.lgbx-bg__ik {
    flex: none;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

/* ── Valgene: forslag, faner og tinglista ───────────────────────────────── */

body .lgbx-ml .lgbx-bg p.lgbx-bg__ledetekst {
    margin-bottom: 12px;
    color: var(--ml-navy);
    font-size: 16px;
    font-weight: 600;
}

.lgbx-ml .lgbx-bg__forvalg,
.lgbx-ml .lgbx-bg__faner,
.lgbx-ml .lgbx-bg__avd {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lgbx-ml .lgbx-bg__start {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ml-line);
}

.lgbx-ml .lgbx-bg__faner {
    margin: 20px 0 14px;
}

.lgbx-ml .lgbx-bg button.lgbx-bg__chip,
.lgbx-ml .lgbx-bg button.lgbx-bg__fane {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 16px;
    border: 1.5px solid var(--ml-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ml-navy);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.lgbx-ml .lgbx-bg button.lgbx-bg__chip {
    border-color: var(--ml-blue);
    color: var(--ml-blue);
}

.lgbx-ml .lgbx-bg button.lgbx-bg__chip:hover {
    background: var(--ml-blue-soft);
    color: var(--ml-blue-dark);
}

.lgbx-ml .lgbx-bg button.lgbx-bg__fane:hover {
    border-color: var(--ml-navy);
}

.lgbx-ml .lgbx-bg button.lgbx-bg__fane[aria-pressed="true"] {
    border-color: var(--ml-navy);
    background: var(--ml-navy);
    color: #fff;
}

.lgbx-ml .lgbx-bg__fane-tall {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--ml-blue);
    color: #fff;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.lgbx-ml .lgbx-bg ul.lgbx-bg__liste {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--ml-line);
}

.lgbx-ml .lgbx-bg li.lgbx-bg__rad {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 62px;
    padding: 8px 6px 8px 8px;
    border-bottom: 1px solid var(--ml-line);
    transition: background-color 0.15s ease;
}

.lgbx-ml .lgbx-bg li.lgbx-bg__rad--valgt {
    background: #f5fafd;
}

.lgbx-ml .lgbx-bg li.lgbx-bg__tom {
    padding: 22px 8px;
    border-bottom: 1px solid var(--ml-line);
    color: var(--ml-muted);
    font-size: 16px;
}

.lgbx-ml .lgbx-bg__prikk {
    display: inline-block;
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.lgbx-ml .lgbx-bg__navn {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: var(--ml-navy);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.lgbx-ml .lgbx-bg__navn small {
    color: var(--ml-muted);
    font-size: 14px;
    font-weight: 400;
}

.lgbx-ml .lgbx-bg__teller {
    display: inline-flex;
    flex: none;
    align-items: center;
    overflow: hidden;
    border: 1.5px solid var(--bg-felt);
    border-radius: 12px;
    background: #fff;
}

.lgbx-ml .lgbx-bg .lgbx-bg__teller button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--ml-blue);
    font-size: 22px;
    line-height: 1;
}

.lgbx-ml .lgbx-bg .lgbx-bg__teller button:hover:not(:disabled) {
    background: var(--ml-blue-soft);
}

.lgbx-ml .lgbx-bg .lgbx-bg__teller button:disabled {
    color: #c3cad3;
    cursor: default;
}

.lgbx-ml .lgbx-bg .lgbx-bg__teller output {
    min-width: 34px;
    color: var(--ml-navy);
    font-size: 17px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: center;
}

.lgbx-ml .lgbx-bg__egen {
    margin-top: 16px;
}

.lgbx-ml .lgbx-bg__bunn {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
    justify-content: flex-end;
    min-height: 44px;
    margin-top: 6px;
}

.lgbx-ml .lgbx-bg button.lgbx-bg__lenke {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ml-blue);
    font-size: 15.5px;
    font-weight: 600;
    text-align: left;
}

.lgbx-ml .lgbx-bg button.lgbx-bg__lenke:hover {
    color: var(--ml-blue-dark);
    text-decoration: underline;
}

.lgbx-ml .lgbx-bg form.lgbx-bg__egen-skjema {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 18px;
    border-radius: 12px;
    background: var(--ml-bg);
}

body .lgbx-ml .lgbx-bg p.lgbx-bg__liten-tittel {
    color: var(--ml-navy);
    font-size: 16px;
    font-weight: 700;
}

.lgbx-ml .lgbx-bg__egen-skjema .lgbx-bg__liten-tittel,
.lgbx-ml .lgbx-bg__egen-skjema .lgbx-bg__feil,
.lgbx-ml .lgbx-bg__egen-skjema .lgbx-bg__egen-knapper,
.lgbx-ml .lgbx-bg label.lgbx-bg__felt--bred {
    grid-column: 1 / -1;
}

.lgbx-ml .lgbx-bg label.lgbx-bg__felt {
    display: grid;
    gap: 5px;
    margin: 0;
    color: var(--ml-navy);
    font-size: 14.5px;
    font-weight: 600;
}

.lgbx-ml .lgbx-bg .lgbx-bg__felt input {
    width: 100%;
    min-height: 48px;
    padding: 0 12px;
    border: 1.5px solid var(--bg-felt);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    color: var(--ml-ink);
    font-size: 16px;
    font-weight: 400;
}

body .lgbx-ml .lgbx-bg p.lgbx-bg__feil {
    color: #b42318;
    font-size: 15px;
    font-weight: 600;
}

.lgbx-ml .lgbx-bg__egen-knapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lgbx-ml .lgbx-bg button.lgbx-bg__knapp {
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--ml-blue);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.lgbx-ml .lgbx-bg button.lgbx-bg__knapp:hover {
    background: var(--ml-blue-dark);
}

/* ── Svaret ─────────────────────────────────────────────────────────────── */

body .lgbx-ml .lgbx-bg p.lgbx-bg__merke {
    color: var(--ml-blue);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body .lgbx-ml .lgbx-bg p.lgbx-bg__tall {
    margin: 2px 0 8px;
    color: var(--ml-navy);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.lgbx-ml .lgbx-bg__tall b {
    margin-right: 6px;
    font-size: 58px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: -0.03em;
}

body .lgbx-ml .lgbx-bg p.lgbx-bg__under {
    color: var(--ml-muted);
    font-size: 16px;
}

body .lgbx-ml .lgbx-bg p.lgbx-bg__note {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--ml-blue-soft);
    color: var(--ml-navy);
    font-size: 15.5px;
}

body .lgbx-ml .lgbx-bg p.lgbx-bg__note--advarsel {
    background: #fff4d6;
    color: #6b4500;
}

.lgbx-ml .lgbx-bg__tegninger {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    margin: 20px 0 14px;
    padding: 16px 14px 12px;
    border-radius: 14px;
    background: var(--ml-bg);
}

.lgbx-ml .lgbx-bg__tegninger--1 {
    grid-template-columns: minmax(0, 330px);
    justify-content: center;
}

.lgbx-ml .lgbx-bg__tegninger--2,
.lgbx-ml .lgbx-bg__tegninger--4 {
    grid-template-columns: repeat(2, minmax(0, 250px));
    justify-content: center;
}

.lgbx-ml .lgbx-bg--rom .lgbx-bg__tegninger--1 {
    grid-template-columns: minmax(0, 440px);
}

.lgbx-ml .lgbx-bg svg.lgbx-bg-tegning {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.lgbx-ml .lgbx-bg figcaption {
    margin-top: 6px;
    color: var(--ml-muted);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.lgbx-ml .lgbx-bg .lgbx-bg-ting {
    cursor: pointer;
}

.lgbx-ml .lgbx-bg .lgbx-bg-ting:hover polygon {
    filter: brightness(1.12) saturate(1.1);
}

.lgbx-ml .lgbx-bg .lgbx-bg-ting--merket polygon,
.lgbx-ml .lgbx-bg .lgbx-bg-ting--pekt polygon {
    stroke: var(--ml-navy);
    stroke-width: 1.5;
    filter: brightness(1.14) saturate(1.15);
}

.lgbx-ml .lgbx-bg__maaler {
    display: block;
    height: 6px;
    margin: 6px auto 0;
    overflow: hidden;
    border-radius: 999px;
    background: #dde3ea;
}

.lgbx-ml .lgbx-bg__maaler span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--ml-blue);
    transition: width 0.3s ease;
}

/* En ny ting faller på plass. Bare tingene som er nye siden forrige tegning, har klassen. */
.lgbx-ml .lgbx-bg .lgbx-bg-ting--ny {
    animation: lgbx-bg-ned 0.34s ease-out both;
}

@keyframes lgbx-bg-ned {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lgbx-ml .lgbx-bg ul.lgbx-bg__forklaring {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    justify-content: center;
}

.lgbx-ml .lgbx-bg ul.lgbx-bg__forklaring li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ml-muted);
    font-size: 14px;
}

body .lgbx-ml .lgbx-bg p.lgbx-bg__merket {
    min-height: 22px;
    margin-top: 10px;
    color: var(--ml-muted);
    font-size: 14.5px;
    text-align: center;
}

.lgbx-ml .lgbx-bg__merket b {
    color: var(--ml-navy);
}

.lgbx-ml .lgbx-bg__pris {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--ml-line);
}

.lgbx-ml .lgbx-bg__pris dl > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
}

.lgbx-ml .lgbx-bg__pris dt {
    color: var(--ml-muted);
    font-size: 16px;
    font-weight: 500;
}

.lgbx-ml .lgbx-bg__pris dd {
    color: var(--ml-muted);
    font-size: 14.5px;
    white-space: nowrap;
}

.lgbx-ml .lgbx-bg__pris dd strong {
    color: var(--ml-navy);
    font-size: 24px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: -0.01em;
}

body .lgbx-ml .lgbx-bg p.lgbx-bg__tilbud {
    margin-top: 14px;
}

.lgbx-ml .lgbx-bg__tilbud .lgbx-ml__tilbudsmerke {
    display: flex;
}

.lgbx-ml .lgbx-bg a.lgbx-bg__videre {
    display: flex;
    width: 100%;
    margin-top: 18px;
}

body .lgbx-ml .lgbx-bg p.lgbx-bg__trygg {
    margin-top: 10px;
    color: var(--ml-muted);
    font-size: 14.5px;
    text-align: center;
}

.lgbx-ml .lgbx-bg details.lgbx-bg__slik {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--ml-line);
}

.lgbx-ml .lgbx-bg .lgbx-bg__slik summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: var(--ml-blue);
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
}

body .lgbx-ml .lgbx-bg .lgbx-bg__slik p {
    padding-bottom: 6px;
    color: var(--ml-muted);
    font-size: 15.5px;
}

.lgbx-ml .lgbx-bg a.lgbx-bg__andre {
    display: flex;
    min-height: 44px;
    margin-top: 8px;
}

/* ── Plassberegneren: avdeling, gangplass og ledige rom ─────────────────── */

.lgbx-ml .lgbx-bg__avd {
    margin: 12px 0 14px;
}

.lgbx-ml .lgbx-bg .lgbx-bg__svar > p.lgbx-bg__liten-tittel {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--ml-line);
}

.lgbx-ml .lgbx-bg label.lgbx-bg__gang {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 44px;
    margin: 14px 0 0;
    padding: 10px 0;
    color: var(--ml-navy);
    font-size: 15.5px;
    font-weight: 500;
    cursor: pointer;
}

.lgbx-ml .lgbx-bg .lgbx-bg__gang input {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    accent-color: var(--ml-blue);
}

.lgbx-ml .lgbx-bg ul.lgbx-bg__romliste {
    display: grid;
    gap: 10px;
}

.lgbx-ml .lgbx-bg li.lgbx-bg__romsvar {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr) auto;
    gap: 6px 16px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--ml-line);
    border-radius: 12px;
    background: #fff;
}

.lgbx-ml .lgbx-bg li.lgbx-bg__romsvar--tom {
    background: var(--ml-bg);
}

.lgbx-ml .lgbx-bg__romsvar-sted,
.lgbx-ml .lgbx-bg__romsvar-rom {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: var(--ml-muted);
    font-size: 15px;
    line-height: 1.35;
}

/* Bare navnet på avdelingen og rommet: tilbudsmerket i linja har sin egen b. */
.lgbx-ml .lgbx-bg__romsvar-sted > b,
.lgbx-ml .lgbx-bg__romsvar-rom > b {
    color: var(--ml-navy);
    font-size: 17px;
    font-weight: 700;
}

.lgbx-ml .lgbx-bg__romsvar small {
    color: var(--ml-muted);
    font-size: 14px;
}

.lgbx-ml .lgbx-bg a.lgbx-bg__velg {
    min-height: 46px;
    padding: 0 18px;
    box-shadow: none;
    font-size: 16px;
    white-space: nowrap;
}

/* ── Oversikten over alle størrelser under plassberegneren ───────────────
   Skrives av views/sider/plassberegner.php, så den står der uten JavaScript. Beregneren merker rommene:
   for lite, stort nok, eller anbefalt (det minste ledige som er stort nok). */

.lgbx-ml .lgbx-bg__avdelinger {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.lgbx-ml .lgbx-bg__avdeling {
    padding: 24px 22px 22px;
    border: 1px solid var(--ml-line);
    border-radius: var(--ml-radius);
    background: #fff;
    box-shadow: var(--ml-shadow);
}

.lgbx-ml .lgbx-bg__avdeling .lgbx-ml__h3 {
    font-size: 22px !important;
}

.lgbx-ml .lgbx-bg__avdeling .lgbx-ml__h3 span {
    margin-left: 8px;
    color: var(--ml-muted);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
}

body .lgbx-ml .lgbx-bg__avdeling p.lgbx-bg__avdeling-tilbud {
    margin: 10px 0 0;
}

.lgbx-ml ul.lgbx-bg__stige {
    display: grid;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.lgbx-ml ul.lgbx-bg__stige li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lgbx-ml a.lgbx-bg__trinn {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    align-items: center;
    min-height: 58px;
    padding: 9px 14px;
    border: 1.5px solid var(--ml-line);
    border-radius: 12px;
    background: #fff;
    color: var(--ml-muted);
    font-size: 14.5px;
    line-height: 1.35;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.lgbx-ml a.lgbx-bg__trinn:hover {
    border-color: var(--ml-blue);
}

.lgbx-ml .lgbx-bg__trinn b {
    color: var(--ml-navy);
    font-size: 17px;
    font-weight: 700;
}

.lgbx-ml .lgbx-bg__trinn-pris {
    grid-column: 1;
}

.lgbx-ml .lgbx-bg__trinn-status {
    grid-row: 1 / span 2;
    grid-column: 2;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    color: #14532d;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.lgbx-ml .lgbx-bg__trinn-merke:empty {
    display: none;
}

.lgbx-ml .lgbx-bg__trinn-merke {
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--ml-bg);
    color: var(--ml-muted);
    font-size: 14px;
    font-weight: 700;
}

.lgbx-ml a.lgbx-bg__trinn--utleid {
    background: var(--ml-bg);
}

.lgbx-ml a.lgbx-bg__trinn--utleid .lgbx-bg__trinn-status {
    color: var(--ml-muted);
    font-weight: 600;
}

.lgbx-ml a.lgbx-bg__trinn--liten {
    opacity: 0.55;
}

.lgbx-ml a.lgbx-bg__trinn--anbefalt {
    border-color: var(--ml-green);
    background: var(--ml-green-soft);
    opacity: 1;
}

.lgbx-ml a.lgbx-bg__trinn--anbefalt .lgbx-bg__trinn-merke {
    background: var(--ml-green);
    color: #fff;
}

/* Navnet på tingen ved pekeren. Ligger rett i <body>, som linja nederst. */
.lgbx-bg-tips {
    position: fixed;
    z-index: 995;
    max-width: 240px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #0b2239;
    box-shadow: 0 6px 18px rgba(11, 34, 57, 0.25);
    color: #fff;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    pointer-events: none;
}

.lgbx-bg-tips[hidden] {
    display: none;
}

/* ── Linja nederst (mobil og nettbrett) ─────────────────────────────────── */

.lgbx-bg-linje {
    display: none;
}

@media (max-width: 1000px) {
    .lgbx-ml .lgbx-bg__rute {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .lgbx-ml .lgbx-bg__svar {
        position: static;
        scroll-margin-top: 84px;
    }

    .lgbx-ml .lgbx-bg__avdelinger {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .lgbx-bg-linje {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 990;
        display: flex;
        align-items: center;
        gap: 12px;
        /* Knappen for cookie-valg står nederst til venstre (44 px), så teksten begynner til høyre for den. */
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)) 72px;
        border-top: 1px solid #e3e8ef;
        background: #fff;
        box-shadow: 0 -8px 24px rgba(11, 34, 57, 0.1);
        color: #0b2239;
        font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.3;
        transition: transform 0.2s ease;
    }

    .lgbx-bg-linje--borte {
        transform: translateY(110%);
    }

    .lgbx-bg-linje__tekst {
        flex: 1;
        min-width: 0;
    }

    .lgbx-bg-linje__tekst b {
        margin-right: 5px;
        font-size: 22px;
        font-variant-numeric: tabular-nums;
        font-weight: 800;
    }

    .lgbx-bg-linje button.lgbx-bg-linje__knapp {
        -webkit-appearance: none;
        appearance: none;
        flex: none;
        min-height: 48px;
        margin: 0;
        padding: 0 20px;
        border: 0;
        border-radius: 10px;
        background: #0077b6;
        color: #fff;
        font: inherit;
        letter-spacing: normal;
        text-transform: none;
        cursor: pointer;
    }
}

@media (max-width: 760px) {
    .lgbx-ml .lgbx-bg__valg,
    .lgbx-ml .lgbx-bg__svar {
        padding: 20px 16px 18px;
    }

    /* Fanene i én rad som kan rulles sidelengs, så lista kommer høyt på skjermen. */
    .lgbx-ml .lgbx-bg__faner {
        flex-wrap: nowrap;
        margin-right: -16px;
        margin-left: -16px;
        padding: 0 16px 4px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .lgbx-ml .lgbx-bg__faner::-webkit-scrollbar {
        display: none;
    }

    .lgbx-ml .lgbx-bg__tall b {
        font-size: 48px;
    }

    .lgbx-ml .lgbx-bg form.lgbx-bg__egen-skjema {
        padding: 14px;
    }

    .lgbx-ml .lgbx-bg__tegninger--3,
    .lgbx-ml .lgbx-bg__tegninger--5,
    .lgbx-ml .lgbx-bg__tegninger--6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lgbx-ml .lgbx-bg li.lgbx-bg__romsvar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .lgbx-ml .lgbx-bg__romsvar-rom {
        grid-row: 2;
        grid-column: 1 / -1;
    }

    .lgbx-ml .lgbx-bg li.lgbx-bg__romsvar > a {
        grid-row: 1;
        grid-column: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lgbx-ml .lgbx-bg .lgbx-bg-ting--ny {
        animation: none;
    }

    .lgbx-bg-linje {
        transition: none;
    }
}
