/* ==========================================================================
   Nettlegevakt – designet fra 2026 lagt over eksisterende sider
   Lastes etter app.css og v2.css på sider med body.v2-legacy: skjemasteg,
   oversiktssider, infosider, tema, kontakt, 404 m.m. Endrer bare utseende –
   markup, Foundation-validering og jQuery-logikk er urørt.
   ========================================================================== */

/* Grunnlag ---------------------------------------------------------------- */
.v2-legacy {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}
.v2-legacy main, .v2-legacy #innhold { display: block; }
.v2-legacy #skip a { position: absolute; left: -9999px; }
.v2-legacy #skip a:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }

/* app.css setter Public Sans mange steder med høy spesifisitet – Sofia Pro overalt */
.v2-legacy :is(p, li, a, span, div, label, legend, input, select, textarea, button, td, th, strong, b, small, h1, h2, h3, h4, h5, h6) {
  font-family: var(--font) !important;
}
.v2-legacy p, .v2-legacy li { font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.v2-legacy h1, .v2-legacy h2, .v2-legacy h3, .v2-legacy h4 {
  font-family: var(--font); font-weight: 700; color: var(--ink); letter-spacing: -.02em; line-height: 1.15;
}
.v2-legacy h1, .v2-legacy h2, .v2-legacy h3 { overflow-wrap: break-word; }
.v2-legacy h1 { font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -.03em; color: var(--plum-800); }
.v2-legacy h2 { font-size: clamp(24px, 2.6vw, 30px); margin-top: 1.4em; margin-bottom: .5em; }
.v2-legacy h3 { font-size: 21px; }
.v2-legacy .lead { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--ink-2); font-weight: 400; }
.v2-legacy strong, .v2-legacy b { color: var(--ink); }

/* Lenker i tekst: understreking i stedet for app.css' border-bottom */
.v2-legacy a { color: var(--plum); }
.v2-legacy p a, .v2-legacy li a, .v2-legacy .link a, .v2-legacy a.link, .v2-legacy .link-style {
  color: var(--plum); border-bottom: 0; padding-bottom: 0; font-weight: inherit;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.v2-legacy p a:hover, .v2-legacy li a:hover, .v2-legacy a.link:hover { color: var(--plum-800); border-bottom: 0; text-decoration-thickness: 2px; }
.v2-legacy a.link { cursor: pointer; display: inline-flex; align-items: center; min-height: 52px; }

/* Foundation-rader får samme bredde som resten av designet */
.v2-legacy .row { max-width: var(--wrap); }

/* Ny meny og footer på gamle sider: nøytraliser app.css' element-regler */
.v2-legacy .topbar a, .v2-legacy .footer a { border-bottom: 0; padding-bottom: 0; font-weight: inherit; text-decoration: none; }
.v2-legacy .topbar .nav a { color: var(--ink-2); font-weight: 400; }
.v2-legacy .topbar .nav a.btn { color: var(--plum-800); font-weight: 700; }
.v2-legacy .topbar .logo, .v2-legacy .footer .logo { font-weight: 700; }
.v2-legacy .topbar .logo { color: var(--plum); }
.v2-legacy .footer { margin-top: clamp(48px, 7vw, 96px); text-align: left; }
.v2-legacy .footer a { color: rgba(255, 255, 255, .78); }
.v2-legacy .footer a:hover { color: #fff; text-decoration: underline; }
.v2-legacy .footer .footer-bottom a { text-decoration: underline; }
.v2-legacy .footer p, .v2-legacy .footer li, .v2-legacy .footer span { font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .78); }
.v2-legacy .footer h2 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 16px; }
.v2-legacy .footer .logo span { font-size: 21px; color: #fff; }
.v2-legacy .footer-bottom span { color: rgba(255, 255, 255, .6); font-size: 14px; }
.v2-legacy .footer .apps img { width: auto; }

/* Knapper ----------------------------------------------------------------- */
.v2-legacy .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 0;
  font: 700 17px/1.2 var(--font); text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .2s, box-shadow .2s, transform .2s;
}
.v2-legacy .btn-green, .v2-legacy p a.btn-green {
  background: var(--green); color: var(--plum-800); box-shadow: 0 6px 18px -6px rgba(19, 184, 103, .55); text-decoration: none;
}
.v2-legacy .btn-green:hover, .v2-legacy .btn-green:focus { background: var(--green-600); color: var(--plum-800); transform: translateY(-1px); }
.v2-legacy .btn-red {
  background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line);
}
.v2-legacy .btn-red:hover, .v2-legacy .btn-red:focus { color: #a3121e; box-shadow: inset 0 0 0 1.5px #e4a3a9; background: #fff6f6; }
.v2-legacy .btn-white { background: var(--plum-50); color: var(--plum); box-shadow: none; }
.v2-legacy .btn-violet { background: var(--plum); color: #fff; box-shadow: none; }
.v2-legacy .btn-violet:hover { background: var(--plum-800); color: #fff; }
.v2-legacy .btn-disabled, .v2-legacy .btn-disabled:hover { background: var(--line); color: var(--muted); box-shadow: none; cursor: not-allowed; transform: none; }
.v2-legacy .btn .btn__info { font-size: 14px; font-weight: 400; }
@media (max-width: 640px) {
  .v2-legacy .behandling-skjema .btn, .v2-legacy .artikkel .btn, .v2-legacy .behandling-artikkel .btn { display: flex; width: 100%; }
}

/* Oversiktssider (kvinnehelse, vaksiner …) ------------------------------- */
.v2-legacy .hero { background: var(--sand); padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 56px); margin-bottom: clamp(28px, 4vw, 48px); }
.v2-legacy .hero .hero__title h1 { color: var(--plum-800); font-weight: 700; font-size: clamp(36px, 5vw, 58px); line-height: 1.08; letter-spacing: -.035em; }
.v2-legacy .hero .hero__title h1:after { display: none; }
.v2-legacy .hero .hero__title p { margin-top: 16px; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: var(--ink-2); }
.v2-legacy .btn-shortcut, .v2-legacy .btn-shortcut-grey {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  height: auto; min-height: 76px; margin: 0 0 14px; padding: 18px 64px 18px 22px;
  background: #fff; border: 0 !important; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 15px; line-height: 1.4;
  transition: box-shadow .2s, transform .2s;
}
.v2-legacy .btn-shortcut::after {
  content: ''; position: absolute; right: 18px; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c1f41' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 18px no-repeat;
  transition: transform .2s;
}
.v2-legacy a:hover .btn-shortcut { transform: translateY(-2px); box-shadow: var(--shadow), inset 0 0 0 1px var(--plum-100); }
.v2-legacy a:hover .btn-shortcut::after { transform: translateX(3px); }
.v2-legacy .btn-shortcut h3 { font-family: var(--font); font-size: 19px; font-weight: 700; color: var(--ink); margin: 0; }
.v2-legacy a:has(> .btn-shortcut) { text-decoration: none; border: 0; }

/* Artikler, tema og enkle tekstsider -------------------------------------- */
.v2-legacy .artikkel, .v2-legacy .behandling-artikkel { margin-top: clamp(32px, 5vw, 64px); }
.v2-legacy .artikkel h1, .v2-legacy .behandling-artikkel h1 { text-align: left; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -.035em; color: var(--plum-800); margin: 8px 0 18px; }
.v2-legacy .artikkel .lead, .v2-legacy .behandling-artikkel .lead { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--ink-2); margin-bottom: 28px; font-weight: 400; }
.v2-legacy .artikkel p, .v2-legacy .artikkel li, .v2-legacy .behandling-artikkel p, .v2-legacy .behandling-artikkel li { font-size: 18px; line-height: 1.7; }
.v2-legacy .artikkel h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 1.6em 0 .5em; }
.v2-legacy .artikkel h3, .v2-legacy .artikkel h3.h3 { font-size: 22px; margin: 1.4em 0 .4em; font-family: var(--font); }
.v2-legacy .artikkel img { border-radius: var(--radius); }
.v2-legacy .artikkel ul { margin-left: 1.2em; }
.v2-legacy .artikkel li::marker { color: var(--green-600); }
.v2-legacy .artikkel table { border-collapse: collapse; width: 100%; font-size: 16px; }
.v2-legacy .artikkel th, .v2-legacy .artikkel td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.v2-legacy .artikkel blockquote { margin: 1.5em 0; padding: 18px 22px; border-left: 0; border-radius: var(--radius); background: var(--plum-50); color: var(--ink-2); }
.v2-legacy .breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.v2-legacy .breadcrumb a { color: var(--muted); font-weight: 400; text-decoration: none; }
.v2-legacy .breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
/* [cta]-bokser fra DatoCMS har inline-stil – gi dem designets uttrykk */
.v2-legacy .artikkel div[style*="background-color: rgb(249, 249, 242)"] {
  background: var(--green-50) !important; border-radius: var(--radius-l) !important; padding: 28px !important; text-align: left !important;
}
.v2-legacy .artikkel div[style*="background-color: rgb(249, 249, 242)"] p:first-child { font-size: 22px !important; }
/* Tema-lister: én artikkel per rad med tydelig tittel */
.v2-legacy .artikkel ul:has(> li > strong > a) { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); }
.v2-legacy .artikkel ul:has(> li > strong > a) > li { margin: 0; padding: 18px 0 8px; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--muted); }
.v2-legacy .artikkel ul:has(> li > strong > a) > li > strong > a { font-size: 19px; text-decoration: none; color: var(--ink); }
.v2-legacy .artikkel ul:has(> li > strong > a) > li > strong > a:hover { color: var(--plum); text-decoration: underline; }
.v2-legacy .artikkel ul:has(> li > strong > a) > li > br:last-child,
.v2-legacy .artikkel ul:has(> li > strong > a) > li > br + br { display: none; }

/* Skjemasteg -------------------------------------------------------------- */
.v2-legacy .behandling-skjema { margin-top: clamp(28px, 4vw, 56px); margin-bottom: clamp(32px, 5vw, 72px); min-height: 0; }
/* Behandlingsnavnet over skjemaet blir en liten etikett */
.v2-legacy .behandling-skjema h1 {
  font-size: 13px; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; color: var(--plum-600); font-weight: 700; margin: 0 0 8px;
}
.v2-legacy .behandling-skjema h2 { font-size: clamp(28px, 3.2vw, 36px); letter-spacing: -.03em; color: var(--plum-800); margin: 28px 0 8px; }
.v2-legacy .behandling-skjema .lead { font-size: 19px; font-weight: 400; }
.v2-legacy .behandling-skjema p { margin-bottom: 10px; }
.v2-legacy .behandling-skjema #personligeopplysninger p, .v2-legacy .behandling-skjema .box p { margin-top: 0; }

/* Fremdrift: tynne avrundede segmenter med små tall */
.v2-legacy .progress { margin: 16px -4px 8px; padding: 0; height: auto; border-radius: 0; background: none; font-size: 14px; line-height: 1; color: var(--muted); }
.v2-legacy .progress .step, .v2-legacy .progress .current { background: none; }
.v2-legacy .progress .step, .v2-legacy .progress .current {
  position: relative; border-bottom: 0; padding: 0 4px 16px; font-weight: 700;
}
.v2-legacy .progress .step::after {
  content: ''; position: absolute; left: 4px; right: 4px; bottom: 0; height: 6px; border-radius: 3px; background: var(--line);
}
.v2-legacy .progress .current { color: var(--plum-800); }
.v2-legacy .progress .current::after { background: var(--green); }
.v2-legacy .progress .step:has(~ .current)::after { background: var(--green-600); opacity: .45; }
.v2-legacy .progress .step span::before { content: 'Steg '; font-weight: 400; color: var(--muted); }
@media (max-width: 480px) { .v2-legacy .progress .step span::before { content: ''; } }

/* Kontrollspørsmål («1/10 – Jeg er kvinne …») */
.v2-legacy .qualify { min-height: 0; margin-top: 8px; }
.v2-legacy .qualify .count {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; margin-bottom: 12px; border-radius: 999px;
  background: var(--green-50); color: #0b6b3d; font-size: 14px; font-weight: 700;
}
.v2-legacy .qualify .box {
  border: 0; border-radius: var(--radius-l); background: var(--plum-50); padding: clamp(24px, 4vw, 40px);
}
.v2-legacy .qualify .box p { text-align: left; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35; font-weight: 700; color: var(--plum-800); margin: 0; letter-spacing: -.01em; }
.v2-legacy .qualify ~ .row .btn, .v2-legacy .qualify + * .btn { margin-right: 10px; }

/* Felter */
.v2-legacy .behandling-skjema label, .v2-legacy label { font-size: 16px; line-height: 1.4; color: var(--ink); font-weight: 700; }
.v2-legacy [type='text'], .v2-legacy [type='email'], .v2-legacy [type='tel'], .v2-legacy [type='number'], .v2-legacy [type='date'], .v2-legacy [type='password'], .v2-legacy [type='search'],
.v2-legacy .behandling-skjema input:not([type='radio']):not([type='checkbox']):not([type='hidden']):not([type='file']),
.v2-legacy select, .v2-legacy .behandling-skjema select, .v2-legacy textarea, .v2-legacy .behandling-skjema textarea {
  height: 52px; padding: 0 16px; margin: 6px 0 18px; border: 1.5px solid #cfc8da; border-radius: 12px; background-color: #fff;
  font-size: 17px; font-weight: 400; color: var(--ink); box-shadow: none; transition: border-color .15s, box-shadow .15s;
  min-width: calc(12ch + 36px); max-width: 100%;
}
.v2-legacy textarea, .v2-legacy .behandling-skjema textarea { height: auto; min-height: 120px; padding: 14px 16px; line-height: 1.5; }
.v2-legacy select, .v2-legacy .behandling-skjema select { padding-right: 44px; background-position: right 14px center; }
.v2-legacy input:focus, .v2-legacy select:focus, .v2-legacy textarea:focus,
.v2-legacy .behandling-skjema input:focus, .v2-legacy .behandling-skjema select:focus, .v2-legacy .behandling-skjema textarea:focus {
  outline: 0; border: 1.5px solid var(--green-600); box-shadow: 0 0 0 4px rgba(33, 211, 126, .18); color: var(--ink);
}
.v2-legacy ::placeholder, .v2-legacy .behandling-skjema input::placeholder, .v2-legacy .behandling-skjema textarea::placeholder { color: #8a8399; }
.v2-legacy .help-text { font-size: 14px; line-height: 1.45; color: var(--muted); font-style: normal; margin-top: -10px; margin-bottom: 14px; }
.v2-legacy .behandling-skjema #personligeopplysninger .help-text { margin-top: -10px; }
.v2-legacy .fieldgroup, .v2-legacy .behandling-skjema .fieldgroup { background: var(--plum-50); border: 0; border-radius: var(--radius); padding: 20px; }

/* Feil og ugyldige felter */
.v2-legacy .form-error { font-size: 15px; line-height: 1.45; font-weight: 700; color: #b3121f; }
.v2-legacy .form-error.is-visible { display: block; }
.v2-legacy span.form-error[style*="inline-block"], .v2-legacy span.form-error.is-visible {
  display: block !important; margin: 4px 0 12px; padding: 12px 14px; border-radius: 12px; background: #fff3f3; font-weight: 400; color: #8c0f19;
}
.v2-legacy .is-invalid-input:not(:focus), .v2-legacy .behandling-skjema .is-invalid-input:not(:focus),
.v2-legacy .behandling-skjema input.is-invalid-input:not(:focus):not([type='radio']):not([type='checkbox']),
.v2-legacy .behandling-skjema select.is-invalid-input:not(:focus), .v2-legacy .behandling-skjema textarea.is-invalid-input:not(:focus) {
  border-color: #d0303d; background-color: #fff; box-shadow: 0 0 0 3px rgba(208, 48, 61, .12);
}
/* Abide farger også radio-etiketter røde – meldingen under er nok */
.v2-legacy .radiomarkcontainer.is-invalid-label { color: var(--ink); }
.v2-legacy .is-invalid-label, .v2-legacy .behandling-skjema .is-invalid-label { color: #b3121f; }

/* Radioknapper som valgbare rader */
.v2-legacy label.radiomarkcontainer, .v2-legacy .radiomarkcontainer {
  display: block; position: relative; margin: 0 0 10px; padding: 14px 16px 14px 54px; min-height: 52px;
  border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 17px; line-height: 1.45; font-weight: 400; color: var(--ink); transition: box-shadow .15s, background-color .15s;
}
.v2-legacy .radiomarkcontainer:hover { box-shadow: inset 0 0 0 1.5px #cfc8da; }
.v2-legacy .radiomarkcontainer:has(input:checked) { background: var(--green-50); box-shadow: inset 0 0 0 2px var(--green-600); }
.v2-legacy .radiomarkcontainer:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 2px; }
.v2-legacy .radiomark { top: 50%; left: 16px; width: 24px; height: 24px; margin-top: -12px; border: 1.5px solid #a9a1b8; background: #fff; }
.v2-legacy .radiomarkcontainer:hover input ~ .radiomark { background: #fff; }
.v2-legacy .radiomarkcontainer input:checked ~ .radiomark { background: var(--green-600); border-color: var(--green-600); }
.v2-legacy .radiomarkcontainer .radiomark:after { top: 50%; left: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; background: #fff; }

/* Avkrysning (sjekkbokser) */
.v2-legacy label.checkmarkcontainer { line-height: 1.5; font-weight: 400; font-size: 16px; color: var(--ink-2); }
.v2-legacy .checkmark { border-radius: 7px; border-color: #a9a1b8; }
.v2-legacy .checkmarkcontainer input:checked ~ .checkmark { background-color: var(--green); border-color: var(--green-600); }

/* «Haster det?»-valg og andre .radios-grupper */
.v2-legacy .behandling-skjema fieldset.radios, .v2-legacy fieldset.radios { margin-top: 20px; padding: 20px; border: 0; border-radius: var(--radius); background: var(--plum-50); }
.v2-legacy fieldset.radios legend { float: left; width: 100%; margin-bottom: 12px; font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--ink); }
.v2-legacy .behandling-skjema .radios label {
  display: inline-flex; align-items: center; margin: 0 8px 0 0; padding: 10px 18px 10px 12px; border-radius: 999px; background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px; font-weight: 700; cursor: pointer;
}
.v2-legacy .behandling-skjema .radios input:checked + label { background: var(--green-50); box-shadow: inset 0 0 0 2px var(--green-600); }
.v2-legacy .behandling-skjema .radios label span { float: none; padding: 5px; border: 1.5px solid #a9a1b8; margin-right: 10px; background: #fff; }
.v2-legacy .behandling-skjema .radios label span i { width: 9px; height: 9px; }
.v2-legacy .behandling-skjema .radios input:checked + label span { border-color: var(--green-600); background: var(--green-600); }
.v2-legacy .behandling-skjema .radios input:checked + label span i { background-color: #fff; }

/* Opplasting, nedtrekkslister med søk og diverse */
.v2-legacy .dropzone { border: 2px dashed #cfc8da; border-radius: var(--radius); background: var(--plum-50); color: var(--ink-2); min-height: 140px; }
.v2-legacy .dropzone:hover { border-color: var(--green-600); }
.v2-legacy .selectize-input { min-height: 52px; padding: 14px 16px; border: 1.5px solid #cfc8da; border-radius: 12px; box-shadow: none; font-size: 17px; }
.v2-legacy .selectize-input.focus { border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(33, 211, 126, .18); }
.v2-legacy .selectize-dropdown { border-radius: 12px; border-color: var(--line); box-shadow: var(--shadow); font-size: 16px; }
.v2-legacy .selectize-dropdown .active { background: var(--green-50); color: var(--ink); }
.v2-legacy .callout { border: 0; border-radius: var(--radius); background: var(--plum-50); padding: 18px 20px; }
.v2-legacy .callout.alert { background: #fff3f3; }
.v2-legacy .callout.success { background: var(--green-50); }
.v2-legacy hr { border-bottom-color: var(--line); }

/* Kort som brukes på enkelte gamle sider (f.eks. anmeldelser) */
.v2-legacy .card--is-featured { background: var(--sand); }
.v2-legacy .anmeldelser-scroll > div .slide-content { border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }

/* Skjemaene scroller selv til aktivt trinn (Foundation Tabs). En fast meny ville
   dekket toppen av trinnet, så på skjemasider scroller menyen bort som før. */
.v2-legacy:has(.behandling-skjema) .topbar { position: relative; }
