/* The pages around the login in the app (platform/lib/pages.mjs): the login, a new account, the password pages and the
   page for an account that waits. In the design the products share with lookat.no and «Min konto» (October 2026): the dark
   navy profile, Jost in the headings and Inter in the text, pills as buttons. The Vipps button uses Vipps' orange, as
   their design guidelines ask. */

@font-face { font-family: Jost; src: url('/studio/brand/jost-300-normal-latin.woff2') format('woff2'); font-weight: 300 500; font-display: swap; }
@font-face { font-family: Inter; src: url('/studio/brand/inter-latin.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }

:root {
  --bg: #060c17;
  --panel: #0e1929;
  --felt: #060c17;
  --line: rgba(150, 180, 235, 0.16);
  --line-2: rgba(150, 180, 235, 0.3);
  --text: #edf2fa;
  --muted: #a6b5cb;
  --accent: #6aa5ff;
  --accent-over: #9cc3ff;
  --accent-flate: #1c68f5;
  --accent-svak: rgba(70, 135, 255, 0.14);
  --vipps: #ff5b24;
  --vipps-hover: #e84a14;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body.auth {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 Inter, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* stedet tegnet som punkter, som øverst på forsiden: bare til pynt, bak kortet */
body.auth::before {
  content: '';
  position: fixed;
  inset: 0 0 0 40%;
  background-image: radial-gradient(circle, rgba(106, 165, 255, 0.4) 1.2px, transparent 1.7px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 100%);
  mask-image: linear-gradient(100deg, transparent 20%, #000 100%);
  opacity: 0.4;
  pointer-events: none;
}

.auth__card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 34px 32px 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.auth__brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  margin-bottom: 14px;
  font: 400 25px/1 Jost, 'Segoe UI', system-ui, sans-serif;
  letter-spacing: 0.13em;
  text-decoration: none;
  color: var(--text) !important;
}

.auth__brand img {
  width: auto;
  height: 28px;
}

.auth h1 {
  margin: 0 0 8px;
  font: 300 34px/1.1 Jost, 'Segoe UI', system-ui, sans-serif;
  text-wrap: balance;
}

.auth p {
  margin: 0 0 14px;
  color: var(--muted);
}

.auth p b {
  color: var(--text);
  font-weight: 500;
}

.auth a {
  color: var(--accent);
  text-underline-offset: 4px;
}

.auth a:hover {
  color: var(--accent-over);
}

.auth :focus-visible {
  outline: 2px solid var(--accent-over);
  outline-offset: 2px;
}

.auth__nowrap {
  white-space: nowrap;
}

.auth__small {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

.auth__message {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
}

.auth p.auth__message--error {
  border-color: rgba(240, 138, 138, 0.45);
  background: rgba(240, 138, 138, 0.09);
  color: #f4a3a3;
}

.auth p.auth__message--info {
  border-color: rgba(106, 165, 255, 0.34);
  background: var(--accent-svak);
  color: var(--text);
}

.vipps-button,
.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.vipps-button {
  background: var(--vipps);
  color: #fff !important;
}

.vipps-button b {
  font-weight: 700;
}

.vipps-button:hover,
.vipps-button:focus-visible {
  background: var(--vipps-hover);
}

.google-button {
  background: #fff;
  color: #1f1f1f !important;
}

.google-button:hover {
  background: #e6ebf3;
}

.vipps-button:active,
.google-button:active,
.auth__button:active {
  transform: translateY(1px);
}

.auth__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 20px;
}

.auth__button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: none;
  color: var(--text) !important;
  font: 500 15px/1.2 Inter, 'Segoe UI', system-ui, sans-serif;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.auth__button:hover {
  border-color: var(--accent);
}

.auth__link {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* skjemaene for e-post og passord */
.auth__eller {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.auth__eller::before,
.auth__eller::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth__form {
  display: grid;
  gap: 14px;
  margin: 0 0 6px;
}

.auth__field {
  display: grid;
  gap: 6px;
}

.auth__field > span {
  color: var(--muted);
  font-size: 14px;
}

.auth__field small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth__input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--felt);
  color: var(--text);
  font: 400 16px/1.4 Inter, 'Segoe UI', system-ui, sans-serif;
  transition: border-color 0.15s ease;
}

.auth__input:hover {
  border-color: var(--accent);
}

.auth__button--full {
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  border-color: transparent;
  background: var(--accent-flate);
  color: #fff !important;
  cursor: pointer;
  font-size: 16px;
}

.auth__button--full:hover {
  border-color: transparent;
  background: #3a80fb;
}

@media (max-width: 480px) {
  .auth__card {
    padding: 26px 22px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* når Vipps eller Google står over skjemaet, er det hovedveien inn: da er «Logg inn» med e-post den rolige knappen */
.vipps-button ~ .auth__form .auth__button--full,
.google-button ~ .auth__form .auth__button--full {
  border-color: var(--line-2);
  background: none;
}

.vipps-button ~ .auth__form .auth__button--full:hover,
.google-button ~ .auth__form .auth__button--full:hover {
  border-color: var(--accent);
  background: none;
}
