/* Proffkjøp opplasting. Lyst uttrykk, Raleway fra egen flate, svart tekst på Proffkjøp-oransje. */

@font-face { font-family: "Raleway"; src: url("/fonts/raleway-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("/fonts/raleway-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("/fonts/raleway-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bunn: #F6F4EF;
  --kort: #FFFFFF;
  --tekst: #1D1A14;
  --dempet: #5B554C;
  --linje: #DDD8CE;
  --linje-lys: #EEEAE2;
  --oransje: #F05223;
  --oransje-lys: #F36A40;
  --navy: #141C2E; /* målt i logofila, så logoen går i ett med flata */
  --platina: #C0CDD8;
  --feil: #B3261E;
  --ok: #1E6B3A;
  --ut: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bunn);
  color: var(--tekst);
  font: 400 16px/1.6 Raleway, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Raleway har gammeldagse sifre som standard. */
  font-variant-numeric: lining-nums tabular-nums;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: var(--tekst); text-underline-offset: 3px; }
h1, h2 { line-height: 1.25; }
:focus-visible { outline: 3px solid var(--tekst); outline-offset: 2px; }

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

.knapp {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: var(--oransje);
  color: #000;
  font: 700 1rem/1.2 Raleway, system-ui, sans-serif;
  padding: 14px 22px;
  cursor: pointer;
  transition: background-color 150ms var(--ut), transform 100ms var(--ut);
}
@media (hover: hover) and (pointer: fine) {
  .knapp:not(:disabled):hover { background: var(--oransje-lys); }
}
.knapp:not(:disabled):active { transform: scale(0.97); }
.knapp:disabled { background: #E6E2D9; color: #6A645A; cursor: not-allowed; }

.lenke {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 2px;
  font: inherit;
  color: var(--tekst);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.lenke:disabled { color: var(--dempet); cursor: default; }

/* ---------- innlogging ---------- */

.innlogging { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; padding-bottom: 40px; }
.band {
  width: 100%;
  background: var(--navy);
  display: flex;
  justify-content: center;
  padding: clamp(40px, 9vh, 96px) 20px clamp(130px, 22vh, 210px);
}
.merker { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 3vw, 44px); }
.m-proff { width: clamp(220px, 32vw, 420px); height: auto; }
.m-tufte { width: clamp(240px, 36vw, 480px); height: auto; }
.kryss { color: var(--platina); font: 400 clamp(30px, 4vw, 50px)/1 Raleway, system-ui, sans-serif; }

.boks {
  position: relative;
  width: calc(100% - 32px);
  max-width: 400px;
  margin-top: calc(-1 * clamp(90px, 16vh, 160px));
  background: var(--kort);
  border-radius: 16px;
  padding: 30px 28px 28px;
  box-shadow: 0 1px 2px rgba(29, 26, 20, 0.08), 0 16px 48px rgba(23, 28, 47, 0.18);
}
.boks h1 { font-size: 1.45rem; font-weight: 700; margin: 0 0 18px; }
.boks label { display: block; font-weight: 600; font-size: 0.95rem; margin: 14px 0 6px; }
.boks input {
  width: 100%;
  font: 400 1rem/1.4 Raleway, system-ui, sans-serif;
  padding: 12px 14px;
  border: 1px solid #B9B2A4;
  border-radius: 10px;
  background: #fff;
  color: var(--tekst);
}
.boks input:focus-visible { outline: 3px solid var(--tekst); outline-offset: 1px; }
.boks .knapp { width: 100%; margin-top: 22px; }
.feil { color: var(--feil); font-weight: 600; font-size: 0.95rem; margin: 14px 0 0; }

.passord-felt { position: relative; }
.passord-felt input { padding-right: 48px; }
.vis-passord {
  appearance: none;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--dempet);
  cursor: pointer;
}
.vis-passord:focus-visible { outline: 3px solid var(--tekst); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .vis-passord:hover { color: var(--tekst); }
}
.vis-passord:active { transform: translateY(-50%) scale(0.94); }

@media (max-width: 720px) {
  .merker { flex-direction: column; gap: 12px; }
  .m-proff { width: min(74vw, 320px); }
  .m-tufte { width: min(80vw, 340px); }
  .kryss { font-size: 30px; }
  .band { padding: 36px 20px 120px; }
  .boks { margin-top: -84px; padding: 26px 22px 24px; }
}

/* ---------- hovedsiden ---------- */

.hoved { max-width: 780px; margin: 0 auto; padding: 28px 20px 40px; }
.topp { text-align: center; margin-bottom: 22px; }
.logoer { display: flex; align-items: center; justify-content: center; gap: 16px; }
.logoer .lp { height: 28px; width: auto; }
.logoer .lt { height: 62px; width: auto; border-radius: 8px; }
.logoer .x { font-size: 1.4rem; color: var(--dempet); line-height: 1; }
.intro { margin: 0 0 22px; }

.slipp {
  background: var(--kort);
  border: 2px dashed #B3AB9C;
  border-radius: 16px;
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms var(--ut), background-color 150ms var(--ut);
}
.slipp.over { border-color: var(--oransje); background: #FFF5F0; }
@media (hover: hover) and (pointer: fine) {
  .slipp:hover { border-color: var(--oransje); background: #FFF5F0; }
}
.slipp h2 { margin: 0 0 6px; font-size: 1.55rem; font-weight: 700; }
.slipp p { margin: 0; }
.slipp .liten { color: var(--dempet); font-size: 0.95rem; margin-top: 6px; }

.liste { margin-top: 20px; background: var(--kort); border: 1px solid var(--linje); border-radius: 16px; padding: 18px 18px 10px; }
.liste h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; }

.knapp2 {
  appearance: none;
  border: 1px solid var(--tekst);
  border-radius: 10px;
  background: #fff;
  color: var(--tekst);
  font: 600 0.95rem/1.2 Raleway, system-ui, sans-serif;
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.knapp2:not(:disabled):active { transform: scale(0.97); }
.knapp2.fare { border-color: var(--feil); color: var(--feil); }
.knapp2:disabled { border-color: var(--linje); color: var(--dempet); cursor: not-allowed; }

.velg-boks {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -12px -12px -12px -14px;
  flex: none;
}
.velg-boks input { width: 20px; height: 20px; margin: 0; }

.rad-velg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}
.rad-velg input { width: 20px; height: 20px; margin: 0; }

.verktoy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 4px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--linje-lys);
}
.velg-alle-etikett { display: flex; align-items: center; gap: 4px; font-weight: 600; cursor: pointer; }
.verktoy-knapper { display: flex; flex-wrap: wrap; gap: 10px; }

.bekreft {
  margin: 4px 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--feil);
  border-radius: 12px;
  background: #FFF6F5;
}
.bekreft p { margin: 0 0 12px; font-weight: 600; }
.bekreft-knapper { display: flex; flex-wrap: wrap; gap: 10px; }

.tom { color: var(--dempet); margin: 4px 0 10px; }
.nye { list-style: none; margin: 0; padding: 0; max-height: 440px; overflow-y: auto; }
.rad {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 2px 14px;
  align-items: center;
  padding: 8px 2px;
  border-top: 1px solid var(--linje-lys);
  font-size: 0.95rem;
}
.rad .navn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rad .str, .rad .status { color: var(--dempet); white-space: nowrap; }
.rad[data-status="lastet"] .status { color: var(--ok); font-weight: 600; }
.rad[data-status="feilet"] .status, .rad[data-status="forstor"] .status { color: var(--feil); font-weight: 600; }
.handling { display: flex; gap: 10px; align-items: center; justify-content: flex-end; min-width: 3.2em; }
.lite-knapp {
  appearance: none;
  border: 1px solid var(--tekst);
  border-radius: 8px;
  background: #fff;
  color: var(--tekst);
  font: 600 0.9rem/1.2 Raleway, system-ui, sans-serif;
  padding: 4px 10px;
  cursor: pointer;
}
.lite-knapp:active { transform: scale(0.97); }

.gruppe { border-top: 1px solid var(--linje-lys); padding: 10px 2px; }
.gruppe summary { cursor: pointer; font-weight: 600; }
.gruppe ul { list-style: none; margin: 8px 0 0; padding: 0 0 0 20px; max-height: 300px; overflow-y: auto; color: var(--dempet); font-size: 0.9rem; }
.gruppe li { display: flex; justify-content: space-between; gap: 14px; padding: 2px 0; }
.gruppe li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.send { display: block; width: 100%; max-width: 360px; margin: 22px auto 0; font-size: 1.1rem; padding: 16px 22px; }
.kvittering { text-align: center; font-weight: 600; margin: 14px auto 0; max-width: 560px; }
.bunn { text-align: center; margin-top: 44px; }
.bunn .lenke { font-size: 0.9rem; color: var(--dempet); }

@media (max-width: 560px) {
  .hoved { padding: 20px 16px 32px; }
  .logoer { gap: 10px; }
  .logoer .lp { height: 17px; }
  .logoer .lt { height: 44px; border-radius: 6px; }
  .logoer .x { font-size: 1.1rem; }
  .slipp { padding: 32px 16px; }
  .rad { grid-template-columns: auto minmax(0, 1fr) auto auto; row-gap: 4px; }
  .rad .rad-velg { grid-row: 1; grid-column: 1; }
  .rad .navn { grid-row: 1; grid-column: 2 / -1; }
  .rad .str { grid-row: 2; grid-column: 2; }
  .rad .status { grid-row: 2; grid-column: 3; }
  .rad .handling { grid-row: 2; grid-column: 4; }
  .liste { padding: 16px 14px 8px; }
  .verktoy { justify-content: flex-start; }
}

/* ---------- les mer ---------- */

.les h1 { font-size: 1.6rem; margin: 8px 0 4px; }
.les .les-meta { color: var(--dempet); font-size: 0.95rem; margin: 0 0 22px; }
.les h2 { font-size: 1.1rem; margin: 24px 0 4px; }
.les p { margin: 0; line-height: 1.75; }
.les .tilbake { margin-top: 32px; }

.uten-js { text-align: center; padding: 40px 20px; }

/* ---------- testflata ---------- */

.flate-merke {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 9;
  transform: translateX(-50%);
  background: #1D1A14;
  color: var(--oransje);
  font: 700 11px/16px Raleway, system-ui, sans-serif;
  letter-spacing: 0.14em;
  padding: 0 8px;
  border-radius: 0 0 7px 7px;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .knapp, .slipp { transition: none; }
}
