/* ============================================================
   Toms Arena · bestillingsflyten (runde 2026-10, redesign)

   Alt er avgrenset til .tabf-host. Oppsett:
     .tabf-shell   rutenett: stegene til venstre, «Din time» til høyre
     .tabf-main    stegindikator, steget, bunnlinje (tilbake / neste)
     .tabf-aside   mørk oppsummering som fylles etter hvert som man velger

   Under 960 px forsvinner høyrekolonnen. Bunnlinja blir en fast, mørk
   linje nederst på skjermen med tilbake, en kompakt oppsummering og
   «Neste». Oppsummeringen åpnes som et ark over linja.

   Skrifter: Instrument Serif for overskrifter og tall, Poppins
   for alt annet. Ingen etiketter i store bokstaver med sperring.
   ============================================================ */

.tabf-host {
  --tabf-line: rgba(21, 25, 26, .1);
  --tabf-line-2: rgba(21, 25, 26, .18);
  --tabf-soft: #F6F9F5;
  --tabf-serif: 'Instrument Serif', 'TA Serif', Georgia, serif;
  --tabf-ease: var(--ease, cubic-bezier(.2, .8, .2, 1));
  position: relative;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--ink, #15191A);
  -webkit-tap-highlight-color: transparent;
}
.tabf-host *, .tabf-host *::before, .tabf-host *::after { box-sizing: border-box; }
:where(.tabf-host) button { font: inherit; color: inherit; }
.tabf-host :focus-visible { outline: 2px solid var(--green, #2A4A31); outline-offset: 3px; }
.tabf-live, .tabf-vh, .tabf-eyebrow {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Skall ---------- */
.tabf-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 12px;
  padding: 12px;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(21, 25, 26, .06), 0 30px 60px -40px rgba(15, 36, 24, .35);
}
.tabf-is-done .tabf-shell { grid-template-columns: minmax(0, 1fr); }
.tabf-main { min-width: 0; display: flex; flex-direction: column; padding: 28px 36px 28px; }
.tabf-body { flex: 1; padding: 8px 0 32px; }
.tabf-body--solo { padding: clamp(28px, 5vw, 56px); border-radius: 32px; background: #fff; }
.tabf-step-wrap { animation: tabf-in .45s var(--tabf-ease) both; }
@keyframes tabf-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tabf-h {
  margin: 0;
  font-family: var(--tabf-serif);
  font-weight: 400;
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--ink, #15191A);
}
.tabf-host .tabf-h:focus, .tabf-host .tabf-h:focus-visible { outline: none; }
.tabf-sub { margin: 12px 0 0; max-width: 58ch; font-size: 16px; line-height: 1.55; color: var(--muted, #5B605A); }
.tabf-step-wrap > .tabf-sub { margin-bottom: 28px; }
.tabf-step-wrap > .tabf-h:last-child { margin-bottom: 28px; }

/* ---------- Stegindikator ---------- */
.tabf-progress { margin: 0 0 36px; }
.tabf-progress-txt, .tabf-progress-bar { display: none; }
.tabf-stepper { display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.tabf-step { display: flex; align-items: center; flex: 1; min-width: 0; }
.tabf-step:last-child { flex: none; }
.tabf-step::after { content: ""; flex: 1; height: 1px; margin: 0 12px; background: var(--tabf-line); }
.tabf-step:last-child::after { display: none; }
.tabf-step.done::after { background: var(--forest-950, #2A4A31); }
.tabf-step > span, .tabf-step > button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px;
  border: 0; background: none; color: var(--muted, #5B605A); font-size: 14px; white-space: nowrap;
}
.tabf-step > button { cursor: pointer; border-radius: 999px; padding: 0 12px 0 4px; transition: background-color .2s var(--tabf-ease); }
.tabf-step > button:hover { background: var(--paper-2, #F3F5F2); }
.tabf-step-num {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--tabf-line-2); background: #fff;
  font-family: var(--tabf-serif); font-size: 17px; line-height: 1; color: var(--muted, #5B605A);
}
.tabf-step.current .tabf-step-num { background: var(--forest-950, #2A4A31); border-color: var(--forest-950, #2A4A31); color: #fff; }
.tabf-step.current .tabf-step-label { color: var(--ink, #15191A); font-weight: 600; }
.tabf-step.done .tabf-step-num { background: var(--sage-2, #DCEBD6); border-color: var(--sage-2, #DCEBD6); color: var(--ink, #15191A); }
.tabf-step.done .tabf-step-label { color: var(--ink, #15191A); }

/* ---------- Steg 1: behandler ---------- */
.tabf-staff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tabf-staff-card {
  position: relative; display: flex; flex-direction: column; text-align: start;
  padding: 28px 28px 26px; border: 1px solid var(--tabf-line); border-radius: 28px; background: #fff;
  cursor: pointer; overflow: hidden;
  transition: border-color .25s var(--tabf-ease), box-shadow .25s var(--tabf-ease), transform .25s var(--tabf-ease), background-color .25s var(--tabf-ease);
}
.tabf-staff-card:hover { border-color: var(--tabf-line-2); box-shadow: 0 20px 40px -28px rgba(15, 36, 24, .45); transform: translateY(-2px); }
.tabf-staff-card.selected { border-color: var(--forest-950, #2A4A31); box-shadow: inset 0 0 0 1px var(--forest-950, #2A4A31); background: var(--tabf-soft); }
/* Tekstkort uten portrett (2026-10-12). Kortene i rutenettet strekkes til
   samme høyde; tilknytningslinja legges nederst bak en tynn strek, så de
   to kortene står likt selv om teksten er ulik lang. */
.tabf-staff-text { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 0; }
.tabf-staff-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tabf-staff-name { font-family: var(--tabf-serif); font-size: 32px; line-height: 1.05; color: var(--ink, #15191A); }
.tabf-staff-role {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px;
  border-radius: 999px; background: var(--sage-2, #DCEBD6);
  font-size: 13.5px; color: var(--forest-800, #3B5541); font-weight: 500;
}
.selected .tabf-staff-role { background: #fff; }
.tabf-staff-bio { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--ink-2, #2D3330); }
.tabf-staff-tenure {
  margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--tabf-line);
  font-size: 13.5px; line-height: 1.5; color: var(--muted, #5B605A);
}
.tabf-staff-foot {
  margin-top: auto; padding-top: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14.5px; font-weight: 600; color: var(--forest-800, #3B5541);
}

/* Avkrysningsmerke i kortene */
.tabf-check {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--tabf-line-2); background: #fff; color: transparent;
  transition: background-color .2s var(--tabf-ease), border-color .2s var(--tabf-ease), color .2s var(--tabf-ease);
}
.selected .tabf-check { background: var(--forest-950, #2A4A31); border-color: var(--forest-950, #2A4A31); color: #fff; }

/* Venteliste */
/* Runde 2026-10-14: diskret tekstlenke, ingen pil (pilen hører til «Neste»). */
.tabf-waitlist-cta {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px;
  color: var(--ink-2, #2D3330); font-size: 14.5px; line-height: 1.4;
  text-decoration: underline; text-decoration-color: var(--tabf-line-2); text-underline-offset: 4px;
  transition: color .2s var(--tabf-ease), text-decoration-color .2s var(--tabf-ease);
}
.tabf-waitlist-cta:hover { color: var(--ink, #15191A); text-decoration-color: currentColor; }
.tabf-waitlist-cta:focus-visible { outline: 2px solid var(--green, #2A4A31); outline-offset: 3px; border-radius: 6px; }

.tabf-waitlist-link { margin-top: 12px; }
.tabf-waitlist-link a { color: var(--ink, #15191A); font-weight: 500; }

/* ---------- Steg 2: tjeneste ---------- */
.tabf-length { margin: 0 0 22px; padding: 0; border: 0; }
.tabf-length-legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--ink, #15191A); }
.tabf-length-options { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper-2, #F3F5F2); }
.tabf-length-option {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-size: 14.5px; color: var(--ink-2, #2D3330); cursor: pointer; transition: background-color .2s var(--tabf-ease), color .2s var(--tabf-ease);
}
.tabf-length-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tabf-length-option.selected { background: var(--forest-950, #2A4A31); color: #fff; }
.tabf-length-option:has(input:focus-visible) { outline: 2px solid var(--green, #2A4A31); outline-offset: 2px; }
.tabf-length-hint { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted, #5B605A); max-width: 60ch; }

.tabf-service-list { display: grid; gap: 12px; }
.tabf-service-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 18px;
  width: 100%; padding: 22px 24px; text-align: start; cursor: pointer;
  border: 1px solid var(--tabf-line); border-radius: 24px; background: #fff;
  transition: border-color .25s var(--tabf-ease), box-shadow .25s var(--tabf-ease), background-color .25s var(--tabf-ease);
}
.tabf-service-card:hover { border-color: var(--tabf-line-2); box-shadow: 0 16px 34px -26px rgba(15, 36, 24, .45); }
.tabf-service-card.selected { border-color: var(--forest-950, #2A4A31); box-shadow: inset 0 0 0 1px var(--forest-950, #2A4A31); background: var(--tabf-soft); }
.tabf-radio {
  display: grid; place-items: center; width: 24px; height: 24px; margin-top: 3px; border-radius: 50%;
  border: 1.5px solid var(--tabf-line-2); background: #fff; transition: border-color .2s var(--tabf-ease);
}
.tabf-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--forest-950, #2A4A31); transform: scale(0); transition: transform .2s var(--tabf-ease); }
.tabf-service-card.selected .tabf-radio { border-color: var(--forest-950, #2A4A31); }
.tabf-service-card.selected .tabf-radio::after { transform: scale(1); }
.tabf-radio--info { border: 0; background: var(--sage-2, #DCEBD6); color: var(--ink, #15191A); }
.tabf-radio--info::after { display: none; }
.tabf-service-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tabf-service-name { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--ink, #15191A); }
.tabf-service-desc { font-size: 14.5px; line-height: 1.55; color: var(--muted, #5B605A); }
.tabf-service-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.tabf-service-more { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--ink, #15191A); }
.tabf-service-price { font-family: var(--tabf-serif); font-size: 30px; line-height: 1; white-space: nowrap; color: var(--ink, #15191A); padding-top: 2px; }
.tabf-service-card--venter { background: #fff; border-style: dashed; }
.tabf-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: 999px;
  background: var(--paper-2, #F3F5F2); font-size: 13px; color: var(--ink-2, #2D3330); white-space: nowrap;
}
.tabf-chip svg { color: var(--green, #2A4A31); }
.tabf-chip--note { background: var(--sage-2, #DCEBD6); color: var(--ink, #15191A); }

/* InMotion-infoskjermen */
.tabf-venter { padding: 28px; border-radius: 28px; background: var(--paper-2, #F3F5F2); }
.tabf-venter-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tabf-venter-price { font-family: var(--tabf-serif); font-size: 34px; line-height: 1; color: var(--ink, #15191A); }
.tabf-venter-title { margin: 22px 0 6px; font-size: 18px; font-weight: 600; color: var(--ink, #15191A); }
.tabf-venter-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2, #2D3330); max-width: 56ch; }
.tabf-venter .tabf-inline-actions { margin-top: 22px; }

/* ---------- Steg 3: kalender ---------- */
.tabf-cal-range { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--ink, #15191A); }
.tabf-cal-range svg { color: var(--green, #2A4A31); }
.tabf-cal { display: grid; gap: 8px; }
.tabf-cal-head, .tabf-cal-row { display: grid; gap: 8px; }
.tabf-cal--5 .tabf-cal-head, .tabf-cal--5 .tabf-cal-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tabf-cal--7 .tabf-cal-head, .tabf-cal--7 .tabf-cal-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tabf-cal-head span { padding: 0 0 2px; text-align: center; font-size: 13px; font-weight: 500; color: var(--muted, #5B605A); }
.tabf-cal-cell {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 84px; padding: 8px 4px; border-radius: 20px; border: 1px solid transparent; text-align: center;
}
.tabf-cal-cell.empty { min-height: 0; }
.tabf-cal-mon { font-size: 12px; color: var(--muted, #5B605A); line-height: 1; }
.tabf-cal-day { font-family: var(--tabf-serif); font-size: 30px; line-height: 1; color: inherit; }
.tabf-cal-status { font-size: 12px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabf-cal-cell.open { cursor: pointer; background: #fff; border-color: var(--tabf-line-2); color: var(--ink, #15191A); transition: background-color .2s var(--tabf-ease), border-color .2s var(--tabf-ease), transform .2s var(--tabf-ease); }
.tabf-cal-cell.open .tabf-cal-status { color: var(--green, #2A4A31); }
.tabf-cal-cell.open .tabf-cal-status b { font-weight: 600; }
.tabf-cal-cell.open:hover { border-color: var(--forest-950, #2A4A31); background: var(--tabf-soft); }
.tabf-cal-cell.open:active { transform: scale(.97); }
.tabf-cal-cell.open.selected { background: var(--forest-950, #2A4A31); border-color: var(--forest-950, #2A4A31); color: #fff; }
.tabf-cal-cell.open.selected .tabf-cal-mon,
.tabf-cal-cell.open.selected .tabf-cal-status { color: var(--sage, #B7D3AE); }
.tabf-cal-cell.full { background: var(--paper-2, #F3F5F2); color: #5A5F58; }
.tabf-cal-cell.full .tabf-cal-day { text-decoration: line-through; text-decoration-thickness: 1px; }
.tabf-cal-cell.closed { color: #8C918A; }
.tabf-cal-cell.closed .tabf-cal-mon { color: #8C918A; }
.tabf-cal-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-size: 13px; color: var(--muted, #5B605A); }
.tabf-cal-legend span { display: inline-flex; align-items: center; gap: 8px; }
.tabf-cal-legend .sw { width: 14px; height: 14px; border-radius: 5px; }
.tabf-cal-legend .sw.open { background: #fff; border: 1px solid var(--forest-950, #2A4A31); }
.tabf-cal-legend .sw.full { background: var(--paper-2, #F3F5F2); border: 1px solid var(--tabf-line); }
.tabf-cal-legend .sw.closed { background: transparent; border: 1px dashed var(--tabf-line-2); }

/* ---------- Steg 4: tider ---------- */
.tabf-time-group + .tabf-time-group { margin-top: 28px; }
.tabf-time-group-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--tabf-line); font-size: 15px; font-weight: 600; color: var(--ink, #15191A); }
.tabf-time-group-h .n { font-size: 13px; font-weight: 400; color: var(--muted, #5B605A); }
.tabf-time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tabf-time-slot {
  min-height: 52px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--tabf-line-2); background: #fff;
  font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; color: var(--ink, #15191A);
  cursor: pointer; transition: background-color .2s var(--tabf-ease), border-color .2s var(--tabf-ease), color .2s var(--tabf-ease), transform .15s var(--tabf-ease);
}
.tabf-time-slot:hover:not(:disabled) { border-color: var(--forest-950, #2A4A31); background: var(--tabf-soft); }
.tabf-time-slot:active:not(:disabled) { transform: scale(.97); }
.tabf-time-slot.selected { background: var(--forest-950, #2A4A31); border-color: var(--forest-950, #2A4A31); color: #fff; }
.tabf-time-slot.selected:hover { background: var(--forest-800, #3B5541); }
.tabf-time-slot.unavailable { cursor: not-allowed; background: transparent; border-style: dashed; border-color: var(--tabf-line); color: #8C918A; font-weight: 400; text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---------- Lasting ---------- */
.tabf-skel { display: grid; gap: 8px; }
.tabf-skel i { display: block; border-radius: 20px; background: linear-gradient(90deg, var(--paper-2, #F3F5F2) 0%, #fff 50%, var(--paper-2, #F3F5F2) 100%); background-size: 200% 100%; animation: tabf-shimmer 1.4s linear infinite; }
.tabf-skel--cal { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tabf-skel--cal i { height: 84px; }
.tabf-skel--time { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.tabf-skel--time i { height: 52px; border-radius: 999px; }
.tabf-skel--boot { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 28px; }
.tabf-skel--boot i { height: 120px; border-radius: 24px; }
.tabf-skel--boot i:nth-child(n+6) { display: none; }
.tabf-boot { border-radius: 32px; background: #fff; min-height: 420px; }
.tabf-loading { padding: 40px; color: var(--muted, #5B605A); }
@keyframes tabf-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.tabf-empty { padding: 22px 24px; border-radius: 20px; background: var(--paper-2, #F3F5F2); font-size: 15px; line-height: 1.55; color: var(--ink-2, #2D3330); }

/* ---------- Steg 5: skjema ---------- */
.tabf-form { display: grid; gap: 28px; }
.tabf-group { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 16px; }
.tabf-group-h { padding: 0; margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--ink, #15191A); }
.tabf-form-row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* Runde 4: radene i et felt strekkes ikke. Før ble Telefon-feltet like høyt
   som E-post med hjelpetekst under, og ekstrahøyden ble fordelt på etikett
   og input, så Telefon så høyere ut og sto lavere. Nå står etikett, input og
   hjelpetekst øverst i hver kolonne: inputene får samme høyde og linje. */
.tabf-field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.tabf-field label { font-size: 14px; font-weight: 500; color: var(--ink-2, #2D3330); }
.tabf-req { color: var(--green, #2A4A31); }
.tabf-field input, .tabf-field textarea {
  width: 100%; min-height: 54px; padding: 14px 18px; border-radius: 16px; border: 1px solid var(--tabf-line-2);
  background: #fff; font: inherit; font-size: 16px; color: var(--ink, #15191A);
  transition: border-color .2s var(--tabf-ease), box-shadow .2s var(--tabf-ease);
}
.tabf-field textarea { min-height: 116px; resize: vertical; line-height: 1.5; }
.tabf-field input:hover, .tabf-field textarea:hover { border-color: rgba(21, 25, 26, .32); }
.tabf-field input:focus, .tabf-field textarea:focus { outline: none; border-color: var(--forest-950, #2A4A31); box-shadow: 0 0 0 4px rgba(74, 102, 80, .16); }
.tabf-field.has-error input, .tabf-field.has-error textarea { border-color: #B3261E; box-shadow: 0 0 0 3px rgba(179, 38, 30, .1); }
.tabf-field-err { margin: 0; font-size: 13.5px; line-height: 1.45; color: #9F1F18; }
.tabf-field-counter { justify-self: end; font-size: 12.5px; color: var(--muted, #5B605A); font-variant-numeric: tabular-nums; }
/* Runde 12 (A1): hjelpetekst under kommentarfeltet i forespørselen hos Tom. */
.tabf-field-hint { margin: 2px 4px 0; font-size: 13.5px; line-height: 1.45; color: var(--muted, #5B605A); }

/* Runde 5: den grå boksen ligger på .tabf-legal-boks inni fieldset, og
   overskriften (legend) står over boksen som i de andre gruppene. Før lå
   bakgrunn og padding på selve fieldset, og Safari tegnet legend oppå
   kanten, halvt utenfor og halvt inni boksen. */
.tabf-legal-boks { display: grid; gap: 14px; min-width: 0; padding: 24px; border-radius: 24px; background: var(--paper-2, #F3F5F2); }
.tabf-terms-notice { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 14px 16px; border-radius: 16px; background: #fff; font-size: 14.5px; line-height: 1.5; color: var(--ink, #15191A); font-weight: 500; }
.tabf-terms-notice svg { flex: none; margin-top: 2px; color: var(--green, #2A4A31); }
.tabf-notat-note { margin: 4px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--muted, #5B605A); }
.tabf-consent-wrap { display: grid; gap: 6px; }
.tabf-consent { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; align-items: start; min-height: 44px; padding: 4px 0; cursor: pointer; font-size: 14.5px; line-height: 1.55; color: var(--ink-2, #2D3330); }
.tabf-consent input { position: absolute; left: 0; top: 4px; width: 26px; height: 26px; margin: 0; opacity: 0; cursor: pointer; }
.tabf-box { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid rgba(21, 25, 26, .34); background: #fff; color: transparent; transition: background-color .2s var(--tabf-ease), border-color .2s var(--tabf-ease), color .2s var(--tabf-ease); }
.tabf-consent:hover .tabf-box { border-color: var(--forest-950, #2A4A31); }
.tabf-consent input:checked + .tabf-box { background: var(--forest-950, #2A4A31); border-color: var(--forest-950, #2A4A31); color: #fff; }
.tabf-consent input:focus-visible + .tabf-box { outline: 2px solid var(--green, #2A4A31); outline-offset: 3px; }
.tabf-consent.has-error .tabf-box { border-color: #B3261E; box-shadow: 0 0 0 3px rgba(179, 38, 30, .12); }
.tabf-consent-wrap .tabf-field-err { padding-left: 40px; }
/* Runde 4: notatfeltet vises alltid. Samtykkeboksen dukker opp rett under
   når det står tekst i feltet (booking-flow.js, notatMedSamtykke). */
.tabf-consent-wrap[hidden] { display: none; }
.tabf-consent-health-wrap { margin-top: -6px; padding: 12px 14px 12px 12px; border-radius: 16px; background: var(--paper-2, #F3F5F2); }
.tabf-consent-health-wrap.is-ny { animation: tabf-samtykke-inn var(--dur-tab, 180ms) var(--ease-out-fluid, cubic-bezier(.22, 1, .36, 1)) both; }
@keyframes tabf-samtykke-inn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tabf-consent-health-wrap.is-ny { animation: none; } }
.tabf-consent a, .tabf-privacy-link a { color: var(--ink, #15191A); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tabf-privacy-link { margin: 0; font-size: 14px; }

.tabf-error { display: block; padding: 16px 18px; border-radius: 18px; background: #FBEDEB; color: #7A1A14; font-size: 15px; line-height: 1.5; margin: 0 0 18px; }
.tabf-error:focus { outline: 2px solid #B3261E; outline-offset: 2px; }
.tabf-form .tabf-error { margin: 0; }
.tabf-error--soft { font-weight: 500; }

/* ---------- Knapper ---------- */
.tabf-btn-primary, .tabf-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 999px; font: inherit; font-size: 16px; font-weight: 500;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .25s var(--tabf-ease), color .25s var(--tabf-ease), border-color .25s var(--tabf-ease), opacity .25s var(--tabf-ease), transform .15s var(--tabf-ease);
}
.tabf-btn-primary { border: 0; background: var(--forest-950, #2A4A31); color: #fff; }
.tabf-btn-primary:hover:not(:disabled) { background: var(--forest-800, #3B5541); color: #fff; }
.tabf-btn-primary:active:not(:disabled) { transform: scale(.98); }
.tabf-btn-primary:disabled { background: var(--paper-3, #E9EEE8); color: #5A5F58; cursor: not-allowed; }
.tabf-btn-primary svg { transition: transform .25s var(--tabf-ease); }
.tabf-btn-primary:hover:not(:disabled) svg { transform: translateX(3px); }
.tabf-btn-primary.is-loading { opacity: 1; cursor: progress; }
.tabf-btn-primary.is-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: tabf-spin .8s linear infinite; }
@keyframes tabf-spin { to { transform: rotate(360deg); } }
.tabf-btn-ghost { border: 1px solid var(--tabf-line-2); background: #fff; color: var(--ink, #15191A); }
.tabf-btn-ghost:hover { border-color: var(--forest-950, #2A4A31); color: var(--ink, #15191A); }
.tabf-inline-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* Bunnlinje (desktop: i flyt nederst i hovedkolonnen) */
.tabf-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--tabf-line); }
.tabf-btn-back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 22px 0 16px; border-radius: 999px;
  border: 1px solid var(--tabf-line-2); background: #fff; color: var(--ink, #15191A); font-size: 16px; cursor: pointer;
  transition: border-color .2s var(--tabf-ease), background-color .2s var(--tabf-ease);
}
.tabf-btn-back:hover { border-color: var(--forest-950, #2A4A31); }
.tabf-btn-back.is-hidden { visibility: hidden; }
.tabf-bar-sum { display: none; }
.tabf-btn-next { min-width: 168px; }
.tabf-bar--nonext { justify-content: flex-start; }

/* ---------- «Din time» ---------- */
.tabf-aside { position: relative; border-radius: 24px; background: var(--forest-950, #2A4A31); color: #fff; }
.tabf-aside-in { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 22px; padding: 30px 28px 28px; }
.tabf-aside-head { display: flex; align-items: center; justify-content: space-between; }
.tabf-aside-h { margin: 0; font-family: var(--tabf-serif); font-weight: 400; font-size: 34px; line-height: 1; color: #fff; }
.tabf-aside-close { display: none; }
.tabf-aside-who { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: rgba(21, 25, 26, .1); }
.tabf-aside-who > span:last-child { display: grid; gap: 2px; min-width: 0; }
.tabf-aside-who .k, .tabf-aside-rows dt, .tabf-aside-total .k { font-size: 13px; color: rgba(255, 255, 255, .94); }
.tabf-aside-who b { font-size: 17px; font-weight: 600; color: #fff; }
.tabf-aside-avatar { position: relative; flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, .1); font-family: var(--tabf-serif); font-size: 24px; }
.tabf-aside-avatar.is-empty { border: 1.5px dashed rgba(255, 255, 255, .28); background: transparent; }
.tabf-aside-avatar.is-mark { background: rgba(183, 211, 174, .16); color: var(--sage, #B7D3AE); box-shadow: inset 0 0 0 1px rgba(183, 211, 174, .28); }
.tabf-aside-avatar.is-mark svg { width: 26px; height: 26px; }
/* Runde 2 (26.10): bildet av behandleren i «Din time» og på bekreftelsen. */
.tabf-aside-avatar.is-photo { background: #E6ECE4; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.tabf-aside-avatar.is-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.tabf-aside-avatar.is-stack { width: auto; height: auto; overflow: visible; border-radius: 0; background: none; }
.tabf-aside-avatar.is-stack .tabf-ava-i { width: 44px; height: 44px; box-shadow: 0 0 0 2px var(--forest-950, #0F2418); }
.tabf-aside-avatar.is-stack .tabf-ava-i + .tabf-ava-i { margin-left: -14px; }
.tabf-confirm-who { display: inline-flex; align-items: center; gap: 10px; }
.tabf-aside-avatar.is-liten { width: 36px; height: 36px; box-shadow: none; }
.tabf-aside-rows { margin: 0; display: grid; }
.tabf-aside-rows > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 14px 4px; border-top: 1px solid rgba(255, 255, 255, .1); }
.tabf-aside-rows > div:last-child { border-bottom: 1px solid rgba(255, 255, 255, .1); }
.tabf-aside-rows dd { margin: 0; font-size: 15.5px; font-weight: 500; color: #fff; overflow-wrap: anywhere; }
.tabf-aside-rows dd::first-letter { text-transform: uppercase; }
.tabf-host .pending { color: rgba(255, 255, 255, .94) !important; font-weight: 400 !important; }
.tabf-aside-rows > div.is-set dd { animation: tabf-in .35s var(--tabf-ease) both; }
.tabf-aside-total { display: grid; gap: 4px; padding: 0 4px; }
.tabf-aside-total .v { font-family: var(--tabf-serif); font-size: 52px; line-height: 1; color: var(--sage, #B7D3AE); white-space: nowrap; }
.tabf-aside-total .v.pending { font-family: inherit; font-size: 15.5px; line-height: 1.4; }
.tabf-aside-total .sub { font-size: 13px; color: rgba(255, 255, 255, .94); }
.tabf-aside-note { display: grid; gap: 10px; padding: 18px 4px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.tabf-aside-note p { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .94); }
.tabf-aside-note svg { flex: none; margin-top: 2px; color: var(--sage, #B7D3AE); }

/* ---------- Steg 6: bekreftet ---------- */
.tabf-is-done .tabf-main { padding: clamp(32px, 6vw, 72px) clamp(20px, 6vw, 72px); }
.tabf-confirm { max-width: 680px; margin: 0 auto; text-align: center; }
.tabf-confirm-icon { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 26px; border-radius: 50%; background: var(--sage-2, #DCEBD6); color: var(--ink, #15191A); }
.tabf-confirm-icon svg { width: 46px; height: 46px; }
.tabf-confirm .tabf-sub { margin-left: auto; margin-right: auto; }
.tabf-confirm .tabf-sub b { color: var(--ink, #15191A); font-weight: 600; overflow-wrap: anywhere; }
.tabf-confirm-card { margin: 32px 0 0; text-align: start; border-radius: 28px; background: var(--paper-2, #F3F5F2); overflow: hidden; }
.tabf-confirm-ref { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 22px 26px; background: var(--forest-950, #2A4A31); color: #fff; }
.tabf-confirm-ref .k { font-size: 14px; color: rgba(255, 255, 255, .94); }
.tabf-confirm-ref .v { font-family: var(--tabf-serif); font-size: 32px; line-height: 1; letter-spacing: .02em; color: var(--sage, #B7D3AE); }
.tabf-confirm-sum { margin: 0; padding: 8px 26px 12px; display: grid; }
.tabf-confirm-sum > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--tabf-line); }
.tabf-confirm-sum > div:last-child { border-bottom: 0; }
.tabf-confirm-sum dt { font-size: 14px; color: var(--muted, #5B605A); }
.tabf-confirm-sum dd { margin: 0; font-size: 15.5px; font-weight: 500; color: var(--ink, #15191A); }
.tabf-assigned { margin-top: 18px !important; }
.tabf-confirm-note, .tabf-cancel-box { margin-top: 14px; padding: 16px 20px; border-radius: 18px; border: 1px solid var(--tabf-line); text-align: start; font-size: 14.5px; line-height: 1.55; color: var(--ink-2, #2D3330); }
.tabf-cancel-foot { margin: 0; }
.tabf-cancel-ref { margin: 8px 0 0; font-size: 12.5px; color: var(--muted, #6B6F68); }
.tabf-cancel-box a, .tabf-confirm-note a { color: var(--ink, #15191A); font-weight: 500; }
.tabf-actions-confirm { justify-content: center; margin-top: 28px; }

/* ============================================================
   Runde 5 (R5BFLYT): bakteppe, tastatur, «Bekreft bestillingen»
   og kvitteringen. Bare transform og opacity animeres, med tallene
   fra runde 4 (--dur-*, --ease-*). prefers-reduced-motion: ingen
   bevegelse (nederst i blokka).
   ============================================================ */

/* Bakteppet bak «Din time»-arket (bare mobil). Ligger under bunnlinja og
   arket, over steget. Trykk lukker arket. */
.tabf-ark-teppe { display: none; }

/* Bunnlinja glir ut av veien når tastaturet er oppe (booking-flow.js,
   vurderTastatur). Plassen under skjemaet står, så ingenting hopper. */
.tabf-bar {
  transition:
    transform var(--dur-sheet-in, 280ms) var(--ease-ios-sheet, cubic-bezier(.32, .72, 0, 1)),
    opacity var(--dur-sheet-in, 280ms) var(--ease-ios-sheet, cubic-bezier(.32, .72, 0, 1));
}

/* ---------- «Bekreft bestillingen» ----------
   <dialog> i toppsjiktet (showModal). PC: sentrert, 560 px. Mobil: ark
   nederst med safe-area. Knappene står fast nederst, innholdet ruller. */
.tabf-bk {
  --tabf-serif: 'Instrument Serif', 'TA Serif', Georgia, serif;
  --tabf-line: rgba(21, 25, 26, .1);
  --tabf-line-2: rgba(21, 25, 26, .18);
  --tabf-ease: var(--ease, cubic-bezier(.2, .8, .2, 1));
  position: fixed; inset: 0; margin: auto; padding: 0; border: 0;
  width: min(560px, calc(100vw - 48px)); max-width: none;
  height: fit-content; max-height: calc(100dvh - 48px);
  border-radius: 28px; background: #fff; color: var(--ink, #15191A);
  box-shadow: 0 30px 80px -30px rgba(15, 36, 24, .55);
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  overflow: hidden; overscroll-behavior: contain;
  opacity: 0; transform: translateY(12px) scale(.98);
  transition:
    opacity var(--dur-sheet-out, 200ms) var(--ease-m3-accelerate, cubic-bezier(.3, 0, .8, .15)),
    transform var(--dur-sheet-out, 200ms) var(--ease-m3-accelerate, cubic-bezier(.3, 0, .8, .15));
}
.tabf-bk:not([open]) { display: none; }
.tabf-bk.is-inne {
  opacity: 1; transform: none;
  transition:
    opacity var(--dur-page, 240ms) var(--ease-out-fluid, cubic-bezier(.22, 1, .36, 1)),
    transform var(--dur-sheet-in, 280ms) var(--ease-out-fluid, cubic-bezier(.22, 1, .36, 1));
}
.tabf-bk::backdrop { background: rgba(21, 25, 26, .45); opacity: 0; transition: opacity var(--dur-sheet-out, 200ms) linear; }
.tabf-bk.is-inne::backdrop { opacity: 1; transition-duration: var(--dur-sheet-in, 280ms); }
.tabf-bk *, .tabf-bk *::before, .tabf-bk *::after { box-sizing: border-box; }
.tabf-bk button { font: inherit; }
.tabf-bk :focus-visible { outline: 2px solid var(--green, #2A4A31); outline-offset: 3px; }
.tabf-bk-in { display: flex; flex-direction: column; max-height: inherit; }
.tabf-bk-hode { flex: none; padding: 26px 30px 4px; }
.tabf-bk-h { margin: 0; font-family: var(--tabf-serif); font-weight: 400; font-size: 34px; line-height: 1.05; letter-spacing: -0.01em; color: var(--ink, #15191A); }
.tabf-bk-h:focus, .tabf-bk-h:focus-visible { outline: none; }
.tabf-bk-lede { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted, #5B605A); }
.tabf-bk-kropp { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 14px 30px 6px; display: grid; gap: 14px; }
.tabf-bk-time { border-radius: 22px; background: var(--forest-950, #2A4A31); color: #fff; padding: 14px 18px 14px; display: grid; gap: 10px; }
.tabf-bk-hvem { display: flex; align-items: center; gap: 14px; }
.tabf-bk-hvem > span:last-child { display: grid; gap: 2px; min-width: 0; }
.tabf-bk-hvem .k, .tabf-bk-time dt, .tabf-bk-pris .k { font-size: 13px; color: rgba(255, 255, 255, .94); }
.tabf-bk-hvem b { font-size: 17px; font-weight: 600; color: #fff; overflow-wrap: anywhere; }
.tabf-bk-hvem .tabf-aside-avatar:not(.is-stack) { width: 48px; height: 48px; }
.tabf-bk-hvem .tabf-aside-avatar.is-stack .tabf-ava-i { width: 40px; height: 40px; }
.tabf-bk-rader { margin: 0; display: grid; }
.tabf-bk-rader > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.tabf-bk-rader dd { margin: 0; font-size: 15px; font-weight: 500; color: #fff; overflow-wrap: anywhere; }
.tabf-bk-rader dd::first-letter { text-transform: uppercase; }
.tabf-bk-pris { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .12); }
.tabf-bk-pris .v { font-family: var(--tabf-serif); font-size: 34px; line-height: 1; color: var(--sage, #B7D3AE); white-space: nowrap; }
.tabf-bk-deg { padding: 4px 4px 0; }
.tabf-bk-h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--ink, #15191A); }
.tabf-bk-rader--lys > div { border-top-color: var(--tabf-line); padding: 7px 0; }
.tabf-bk-rader--lys dt { font-size: 14px; color: var(--muted, #5B605A); }
.tabf-bk-rader--lys dd { color: var(--ink, #15191A); }
.tabf-bk-rader--lys dd::first-letter { text-transform: none; }
.tabf-bk-regler { margin: 0; padding: 12px 16px; list-style: none; display: grid; gap: 8px; border-radius: 18px; background: var(--paper-2, #F3F5F2); }
.tabf-bk-regler li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-2, #2D3330); }
.tabf-bk-regler svg { flex: none; margin-top: 2px; color: var(--green, #2A4A31); }
.tabf-bk-fot { flex: none; display: flex; gap: 10px; justify-content: flex-end; padding: 14px 30px 22px; border-top: 1px solid var(--tabf-line); background: #fff; }
.tabf-bk-fot .tabf-btn-ghost { min-width: 120px; }
.tabf-bk-ok { min-width: 216px; }
.tabf-bk-ok.is-loading { pointer-events: none; }
.tabf-bk-ok.is-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: tabf-spin .8s linear infinite; }
.tabf-bk-ok:disabled.is-loading { background: var(--forest-950, #2A4A31); color: #fff; cursor: progress; }
.tabf-bk-endre:disabled { opacity: .55; cursor: not-allowed; }

/* Mobil: ark nederst. */
.tabf-bk.is-ark {
  inset: auto 0 0 0; margin: 0; width: 100%;
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 16px);
  border-radius: 28px 28px 0 0;
  transform: translateY(100%);
}
.tabf-bk.is-ark.is-inne {
  transform: none;
  transition:
    opacity var(--dur-sheet-in, 280ms) var(--ease-ios-sheet, cubic-bezier(.32, .72, 0, 1)),
    transform var(--dur-sheet-in, 280ms) var(--ease-ios-sheet, cubic-bezier(.32, .72, 0, 1));
}
.tabf-bk.is-ark .tabf-bk-hode { padding: 22px 20px 4px; }
.tabf-bk.is-ark .tabf-bk-h { font-size: 31px; }
.tabf-bk.is-ark .tabf-bk-kropp { padding: 14px 16px 8px; gap: 14px; }
.tabf-bk.is-ark .tabf-bk-fot { padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.tabf-bk.is-ark .tabf-bk-fot .tabf-btn-ghost { min-width: 0; flex: 0 0 auto; padding: 0 22px; }
.tabf-bk.is-ark .tabf-bk-ok { flex: 1 1 auto; min-width: 0; }
@media (max-width: 380px) {
  .tabf-bk-rader > div { grid-template-columns: 88px minmax(0, 1fr); }
  .tabf-bk-pris .v { font-size: 32px; }
}

/* ---------- Kvitteringen (bilde 6): en boks om avbestilling ---------- */
.tabf-cancel-box { display: grid; gap: 6px; margin-top: 18px; padding: 18px 20px; }
.tabf-cancel-h { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: 15.5px; font-weight: 600; line-height: 1.35; color: var(--ink, #15191A); }
.tabf-cancel-h svg { flex: none; color: var(--green, #2A4A31); }
.tabf-cancel-regel { margin: 0; color: var(--ink, #15191A); }
.tabf-cancel-box .tabf-cancel-ref { margin-top: 4px; }
.tabf-ltk svg { flex: none; }

@media (max-width: 959px) {
  .tabf-ark-teppe {
    display: block; position: fixed; inset: 0; z-index: 58;
    background: rgba(21, 25, 26, .4); opacity: 0; pointer-events: none;
    transition: opacity var(--dur-sheet-out, 200ms) linear;
  }
  .tabf-sum-open .tabf-ark-teppe { opacity: 1; pointer-events: auto; transition-duration: var(--dur-sheet-in, 280ms); }
  .tabf-tastatur .tabf-bar {
    transform: translateY(calc(100% + 24px)); opacity: 0; pointer-events: none;
    transition:
      transform var(--dur-sheet-out, 200ms) var(--ease-m3-accelerate, cubic-bezier(.3, 0, .8, .15)),
      opacity var(--dur-sheet-out, 200ms) var(--ease-m3-accelerate, cubic-bezier(.3, 0, .8, .15));
  }
}

@media (prefers-reduced-motion: reduce) {
  .tabf-bk, .tabf-bk.is-ark { transform: none !important; transition: opacity 1ms linear !important; }
  .tabf-bk::backdrop { transition: none !important; }
  .tabf-tastatur .tabf-bar { transform: none; }
  .tabf-bar { transition: opacity 1ms linear; }
  .tabf-bk-ok.is-loading::before { animation-duration: 1.6s; }
}

/* ============================================================
   Nettbrett og mobil
   ============================================================ */
@media (max-width: 1100px) {
  .tabf-shell { grid-template-columns: minmax(0, 1fr) 320px; }
  .tabf-main { padding: 24px 24px 24px; }
  .tabf-step-label { display: none; }
  .tabf-step.current .tabf-step-label { display: inline; }
}

@media (max-width: 959px) {
  .tabf-shell { grid-template-columns: minmax(0, 1fr); padding: 0; border-radius: 28px; }
  .tabf-main { padding: 22px 20px 8px; }
  .tabf-body { padding-bottom: 24px; }

  /* Kompakt fremdrift */
  .tabf-stepper { display: none; }
  .tabf-progress { margin-bottom: 24px; }
  .tabf-progress-txt { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--muted, #5B605A); }
  .tabf-progress-txt b { font-weight: 600; color: var(--ink, #15191A); }
  .tabf-progress-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .tabf-progress-bar i { height: 4px; border-radius: 4px; background: var(--paper-3, #E9EEE8); }
  .tabf-progress-bar i.done { background: var(--green, #2A4A31); }
  .tabf-progress-bar i.current { background: var(--forest-950, #2A4A31); }

  .tabf-h { font-size: 34px; }
  .tabf-step-wrap > .tabf-sub { margin-bottom: 22px; font-size: 15.5px; }

  /* Fast bunnlinje */
  .tabf-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 0; border-radius: 24px 24px 0 0;
    background: var(--forest-950, #2A4A31); color: #fff;
    box-shadow: 0 -14px 40px -18px rgba(15, 36, 24, .5);
  }
  .tabf-btn-back { flex: none; width: 48px; height: 48px; min-height: 48px; padding: 0; justify-content: center; border-color: rgba(255, 255, 255, .22); background: transparent; color: #fff; }
  .tabf-btn-back:hover { border-color: #fff; }
  .tabf-btn-back-txt { display: none; }
  .tabf-btn-back.is-hidden { display: none; }
  .tabf-bar-sum {
    display: grid; gap: 2px; flex: 1; min-width: 0; min-height: 48px; padding: 4px 6px; border: 0; border-radius: 14px;
    background: none; color: #fff; text-align: start; cursor: pointer;
  }
  .tabf-bar-sum-k { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255, 255, 255, .94); }
  .tabf-bar-sum-k svg { transition: transform .25s var(--tabf-ease); }
  .tabf-sum-open .tabf-bar-sum-k svg { transform: rotate(180deg); }
  .tabf-bar-sum-v { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tabf-btn-next { flex: none; min-width: 0; min-height: 52px; padding: 0 20px 0 22px; background: #fff; color: var(--ink, #15191A); }
  .tabf-btn-next:hover:not(:disabled) { background: var(--sage-2, #DCEBD6); color: var(--ink, #15191A); }
  .tabf-btn-next:disabled { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .85); }
  .tabf-btn-next.is-loading::before { border-color: rgba(15, 36, 24, .25); border-top-color: var(--forest-950, #2A4A31); }

  /* Oppsummeringen som ark over bunnlinja */
  /* Runde 5 (R5BFLYT, bilde 1): arket starter under den svevende headeren.
     booking-flow.js (maalArk) setter --tabf-ark-maks fra headerens
     underkant til bunnlinja; reserven under holder headeren fri også
     før skriptet har målt. */
  .tabf-aside {
    position: fixed; left: 8px; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 59;
    max-height: calc(100vh - 196px - env(safe-area-inset-top, 0px));
    max-height: var(--tabf-ark-maks, calc(100dvh - 196px - env(safe-area-inset-top, 0px)));
    overflow: auto; overscroll-behavior: contain;
    border-radius: 24px; box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .45);
    visibility: hidden; opacity: 0; transform: translateY(16px);
    transition:
      opacity var(--dur-sheet-out, 200ms) var(--ease-m3-accelerate, cubic-bezier(.3, 0, .8, .15)),
      transform var(--dur-sheet-out, 200ms) var(--ease-m3-accelerate, cubic-bezier(.3, 0, .8, .15)),
      visibility 0s linear var(--dur-sheet-out, 200ms);
  }
  .tabf-sum-open .tabf-aside {
    visibility: visible; opacity: 1; transform: none;
    transition:
      opacity var(--dur-sheet-in, 280ms) var(--ease-ios-sheet, cubic-bezier(.32, .72, 0, 1)),
      transform var(--dur-sheet-in, 280ms) var(--ease-ios-sheet, cubic-bezier(.32, .72, 0, 1)),
      visibility 0s;
  }
  .tabf-aside-in { position: static; padding: 22px 20px 20px; gap: 16px; }
  .tabf-aside-h { font-size: 28px; }
  .tabf-aside-close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: #fff; cursor: pointer; }
  .tabf-aside-total .v { font-size: 42px; }

  /* Bekreftelsen har ingen bunnlinje */
  .tabf-is-done .tabf-shell { padding: 0; }
}

@media (max-width: 640px) {
  .tabf-main { padding: 20px 16px 4px; }
  .tabf-h { font-size: 31px; }

  /* Behandlerkort: tekstkort i full bredde */
  .tabf-staff-grid { grid-template-columns: 1fr; gap: 12px; }
  .tabf-staff-card { padding: 20px 20px 18px; border-radius: 24px; }
  .tabf-staff-text { gap: 6px; }
  .tabf-staff-name { font-size: 26px; }
  .tabf-staff-role { font-size: 12.5px; min-height: 26px; padding: 0 10px; }
  .tabf-staff-bio { margin-top: 4px; font-size: 14.5px; line-height: 1.55; }
  .tabf-staff-tenure { font-size: 12.5px; padding-top: 10px; margin-top: 6px; }
  .tabf-staff-foot { display: none; }
  .tabf-check { width: 26px; height: 26px; }
  .tabf-waitlist-cta { font-size: 14px; }

  .tabf-length-options { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .tabf-length-option { justify-content: center; padding: 0 10px; font-size: 13.5px; text-align: center; }
  .tabf-service-card { grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px 18px; border-radius: 22px; }
  .tabf-service-price { grid-column: 2; font-size: 26px; padding-top: 4px; }
  .tabf-service-name { font-size: 17px; }
  .tabf-service-desc { font-size: 14px; }
  .tabf-venter { padding: 22px 18px; border-radius: 22px; }
  .tabf-venter .tabf-inline-actions > * { flex: 1 1 100%; }

  .tabf-cal, .tabf-cal-head, .tabf-cal-row { gap: 6px; }
  .tabf-cal-cell { min-height: 68px; padding: 6px 2px; border-radius: 16px; }
  .tabf-cal--7 .tabf-cal-cell { min-height: 58px; border-radius: 14px; }
  .tabf-cal-day { font-size: 25px; }
  .tabf-cal--7 .tabf-cal-day { font-size: 21px; }
  .tabf-cal-mon { font-size: 11px; }
  .tabf-cal-status { font-size: 11px; white-space: nowrap; }
  .tabf-cal--7 .tabf-cal-status, .tabf-cal--7 .tabf-cal-mon { display: none; }
  .tabf-skel--cal i { height: 68px; }
  .tabf-cal-legend { gap: 14px; font-size: 12.5px; }

  .tabf-time-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .tabf-skel--time { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tabf-time-slot { min-height: 48px; padding: 0 4px; font-size: 15px; }

  .tabf-form-row-2 { grid-template-columns: 1fr; }
  .tabf-legal-boks { padding: 18px 16px; border-radius: 22px; margin: 0 -4px; }

  .tabf-confirm-ref { padding: 18px 20px; }
  .tabf-confirm-ref .v { font-size: 26px; }
  .tabf-confirm-sum { padding: 4px 20px 8px; }
  .tabf-confirm-sum > div { grid-template-columns: 1fr; gap: 2px; }
  .tabf-actions-confirm > * { flex: 1 1 100%; }
  .tabf-skel--boot { grid-template-columns: 1fr; padding: 16px; }
}

@media (max-width: 380px) {
  .tabf-btn-next { padding: 0 16px 0 18px; }
  .tabf-time-grid, .tabf-skel--time { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .tabf-host *, .tabf-host *::before, .tabf-host *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Etterjusteringer */
.tabf-h + .tabf-form { margin-top: 28px; }
.tabf-cancel-box a[href^="tel:"] { white-space: nowrap; }
.tabf-time-slot { letter-spacing: 0; }
@media (max-width: 959px) {
  .tabf-bar-sum-k { min-width: 0; white-space: nowrap; }
  .tabf-bar-sum-k .k { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .tabf-bar-sum-k svg { flex: none; }
}
@media (max-width: 420px) {
  .tabf-btn-next[type="submit"] { padding: 0 16px 0 18px; font-size: 15px; gap: 6px; }
}
.tabf-venter .tabf-chip { background: #fff; }

/* Runde 2026-10-14 b: InMotion som egen vei i steg 1. Kortet går over hele
   bredden under de to behandlerkortene, i den lyse salviefargen, så det
   leses som et eget tilbud og ikke som en tredje behandler. */
.tabf-staff-card--inmotion { grid-column: 1 / -1; background: var(--sage-2, #DCEBD6); border-color: rgba(15, 36, 24, .1); }
.tabf-staff-card--inmotion:hover { background: #D1E5C9; }
.tabf-staff-card--inmotion.selected { background: var(--sage-2, #DCEBD6); }

/* ---------- Runde 2026-10-17: behandlerkort med ansikter ----------
   En rad per kort: ansiktene i sirkel, navnet og en kort linje, og haken
   til høyre. InMotion har samme farge som de andre. Tre kort side om side
   på brede skjermer, under hverandre på telefon. */
.tabf-staff-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tabf-staff-card { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px 22px 20px; }
.tabf-staff-card--inmotion, .tabf-staff-card--inmotion:hover, .tabf-staff-card--inmotion.selected {
  grid-column: auto; background: #fff; border-color: var(--tabf-line);
}
.tabf-staff-card--inmotion.selected { background: var(--tabf-soft); border-color: var(--forest-950, #2A4A31); }
.tabf-staff-card .tabf-check { position: absolute; top: 18px; right: 18px; }
.tabf-staff-text { gap: 4px; }
.tabf-staff-name { font-size: 28px; }
.tabf-staff-line { font-size: 14.5px; line-height: 1.45; color: var(--ink-2, #2D3330); }
.tabf-ava { display: flex; align-items: center; }
.tabf-ava-i {
  position: relative; width: 64px; height: 64px; flex: none; border-radius: 50%; overflow: hidden;
  /* Runde 21 A4: en tynn ring i salvie (som Tom-bildet på forsiden), så
     bildene står tydelig mot den lyse bakgrunnen. Samme ring overalt. */
  background: var(--sage-2, #DCEBD6); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--sage, #B7D3AE);
  display: grid; place-items: center;
}
.tabf-ava-i::before { content: attr(data-init); font: 600 20px/1 var(--tabf-serif, serif); color: var(--forest-800, #3B5541); }
.tabf-ava-i img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.tabf-ava--stack .tabf-ava-i { width: 52px; height: 52px; }
.tabf-ava--stack .tabf-ava-i + .tabf-ava-i { margin-left: -14px; }
.selected .tabf-ava-i { box-shadow: 0 0 0 2px var(--tabf-soft, #F3F5F2), 0 0 0 3px var(--sage, #B7D3AE); }
@media (max-width: 900px) {
  .tabf-staff-grid { grid-template-columns: 1fr; gap: 10px; }
  .tabf-staff-card { flex-direction: row; align-items: center; gap: 14px; padding: 14px 52px 14px 14px; border-radius: 22px; }
  .tabf-staff-card .tabf-check { top: 50%; right: 16px; margin-top: -13px; }
  .tabf-staff-name { font-size: 22px; }
  .tabf-staff-line { font-size: 13.5px; }
  /* Fast bredde på ansiktene, så navnene står på linje i alle tre kortene. */
  .tabf-ava { width: 84px; flex: none; justify-content: center; }
  .tabf-ava-i { width: 56px; height: 56px; }
  .tabf-ava--stack .tabf-ava-i { width: 40px; height: 40px; }
  .tabf-ava--stack .tabf-ava-i + .tabf-ava-i { margin-left: -18px; }
  .tabf-ava--stack .tabf-ava-i:nth-child(n+4) { display: none; }
}

/* ---------- Runde 16: alle terapeutene, og oppsett etter antall kort ----------
   A: «Toms terapeuter» viser hele gruppen. Runde 17 (F): et tett rutenett på
   3 x 2 uten overlapp, radene rett under hverandre med samme avstand
   sidelengs og i høyden (--ava-gap), alle ansiktene like store (--ava-str).
   Alle ansiktsfeltene i steg 1 får samme høyde, så kortene og navnene står
   likt selv om bare ett kort har to rader.
   B: kolonnene følger data-n (antall kort), satt av renderStaffStep.
   Størrelsen settes på beholderen (rutenettet i steg 1, «Din time», bekreft-
   dialogen) og arves; selektorene er sterke nok til å slå .is-stack-reglene. */
.tabf-ava--rader { flex-direction: column; align-items: flex-start; gap: var(--ava-gap, 6px); }
.tabf-ava-rad { display: flex; gap: var(--ava-gap, 6px); }
.tabf-ava.tabf-ava--rader .tabf-ava-rad .tabf-ava-i { width: var(--ava-str, 46px); height: var(--ava-str, 46px); }
.tabf-ava.tabf-ava--rader .tabf-ava-rad .tabf-ava-i + .tabf-ava-i { margin-left: 0; }
.tabf-staff-grid:has(.tabf-ava--rader) .tabf-ava { min-height: calc(2 * var(--ava-str, 46px) + var(--ava-gap, 6px)); }
.tabf-staff-grid[data-n="1"] { grid-template-columns: minmax(0, 520px); }
.tabf-staff-grid[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tabf-staff-grid[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Tre smale kort side om side: mindre ansikter, så gruppen ikke går inn i haken. */
@media (min-width: 901px) {
  .tabf-staff-grid[data-n="3"] { --ava-str: 38px; --ava-gap: 5px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .tabf-staff-grid[data-n="3"] { --ava-str: 32px; --ava-gap: 4px; }
}
.tabf-aside-avatar.is-stack { --ava-str: 32px; --ava-gap: 4px; }
.tabf-bk-hvem .tabf-aside-avatar.is-stack { --ava-str: 30px; }
/* «Din time» og bekreft-dialogen: mobilregelen .tabf-ava { width: 84px } gjelder
   bare kortene i steg 1, ellers henger gruppen over teksten ved siden av. */
.tabf-aside-avatar .tabf-ava { width: auto; }
@media (max-width: 900px) {
  .tabf-staff-grid[data-n] { grid-template-columns: 1fr; }
  .tabf-staff-grid { --ava-str: 32px; --ava-gap: 5px; }
  .tabf-staff-grid:has(.tabf-ava--rader) .tabf-ava { width: 108px; justify-content: flex-start; }
}

/* Runde 23: kompakte samtykker, detaljene bak «Les mer». */
.tabf-group--legal .tabf-consent-txt { line-height: 1.45; }
.tabf-more { margin: 2px 0 0 40px; font-size: 13.5px; line-height: 1.6; color: var(--muted, #5B605A); }
.tabf-more summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--green, #2A4A31); text-decoration: underline; text-underline-offset: 3px;
}
.tabf-more summary::-webkit-details-marker { display: none; }
.tabf-more summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.tabf-more[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.tabf-more summary:focus-visible { outline: 2px solid var(--green, #2A4A31); outline-offset: 3px; border-radius: 6px; }
.tabf-more p { margin: 6px 0 0; }
.tabf-more a { color: var(--ink, #15191A); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.tabf-ingen-ledige { margin-bottom: 16px; }
.tabf-ingen-ledige p { margin: 0 0 6px; }
.tabf-ingen-ledige p:last-child { margin-bottom: 0; }

/* ---------- Runde 7: lengde og behandler under tjenestene ---------- */
.tabf-service-list + .tabf-length,
.tabf-service-list ~ .tabf-who { margin-top: 26px; }
.tabf-length + .tabf-who { margin-top: 22px; }
.tabf-service-list + .tabf-length { margin-bottom: 0; }
.tabf-who { margin: 0; padding: 0; border: 0; min-width: 0; }
.tabf-who-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tabf-who-option {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px;
  padding: 10px 14px 10px 10px; border: 1px solid var(--tabf-line); border-radius: 18px; background: #fff;
  cursor: pointer; transition: border-color .2s var(--tabf-ease), background-color .2s var(--tabf-ease);
}
.tabf-who-option:hover { border-color: var(--tabf-line-2); }
.tabf-who-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tabf-who-option.selected { border-color: var(--forest-950, #2A4A31); box-shadow: inset 0 0 0 1px var(--forest-950, #2A4A31); background: var(--tabf-soft); }
.tabf-who-option:has(input:focus-visible) { outline: 2px solid var(--green, #2A4A31); outline-offset: 2px; }
.tabf-who-option .tabf-ava-i { width: 44px; height: 44px; }
.tabf-who-option .tabf-ava-i::before { font-size: 16px; }
.tabf-who-any {
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--sage-2, #DCEBD6); color: var(--forest-800, #3B5541);
}
.tabf-who-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tabf-who-name { font-size: 15.5px; font-weight: 600; color: var(--ink, #15191A); }
.tabf-who-line { font-size: 13px; line-height: 1.35; color: var(--muted, #5B605A); }
.tabf-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 560px) {
  .tabf-who-options { grid-template-columns: 1fr; }
}

/* ---------- Runde 19 G: «Dag og tid» på samme skjerm ----------
   .tabf-dt er en container: kalenderen og tidene ved siden av hverandre når
   steget er bredt nok (PC, nettbrett på langs), ellers tidene under
   kalenderen (mobil), slik Setmore gjør det, i Toms Arenas farger. */
.tabf-dt { container-type: inline-size; }
.tabf-dt-in { display: grid; gap: 24px; }
.tabf-dt-tider { min-width: 0; padding-top: 22px; border-top: 1px solid var(--tabf-line); }
@container (min-width: 540px) {
  .tabf-dt-in { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0; align-items: start; }
  .tabf-dt-kal { padding-right: 28px; }
  .tabf-dt-tider { padding: 0 0 0 28px; border-top: 0; border-left: 1px solid var(--tabf-line); min-height: 100%; }
  .tabf-dt-tider .tabf-time-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
  .tabf-dt-tider .tabf-skel--time { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .tabf-dt-tider .tabf-time-slot { min-height: 46px; font-size: 15px; }
}
.tabf-dt-h { margin: 0; font-family: var(--tabf-serif); font-size: 28px; line-height: 1.1; font-weight: 400; color: var(--ink, #15191A); }
.tabf-dt-h::first-letter { text-transform: uppercase; }
.tabf-dt-sub { margin: 4px 0 16px; font-size: 14px; color: var(--muted, #5B605A); }
.tabf-dt-tom { margin: 10px 0 0; padding: 18px 20px; border-radius: 18px; background: var(--paper-2, #F3F5F2); font-size: 15px; line-height: 1.5; color: var(--ink-2, #2D3330); }
.tabf-dt-tider .tabf-time-group + .tabf-time-group { margin-top: 20px; }
.tabf-dt-tider .tabf-time-group-h { margin-bottom: 10px; padding-bottom: 8px; font-size: 14px; }

/* Kompakt kalender: bare datoen og «X ledig», valgt dag i skoggrønt. */
.tabf-cal--kompakt, .tabf-cal--kompakt .tabf-cal-head, .tabf-cal--kompakt .tabf-cal-row { gap: 6px; }
.tabf-cal--kompakt .tabf-cal-cell { min-height: 62px; padding: 6px 2px; border-radius: 16px; }
.tabf-cal--kompakt .tabf-cal-day { font-size: 25px; }
.tabf-cal--kompakt .tabf-cal-mon { font-size: 10.5px; }
.tabf-cal--kompakt .tabf-cal-status { font-size: 11px; }
.tabf-cal--kompakt .tabf-cal-cell.closed .tabf-cal-status { display: none; }
.tabf-cal-dot { display: none; width: 6px; height: 6px; margin-top: 3px; border-radius: 50%; background: var(--green, #2A4A31); }
.tabf-cal-cell.open.selected .tabf-cal-dot { background: var(--sage, #B7D3AE); }
@container (min-width: 540px) and (max-width: 860px) {
  .tabf-cal--7.tabf-cal--kompakt .tabf-cal-status { display: none; }
  .tabf-cal--7.tabf-cal--kompakt .tabf-cal-dot { display: block; }
}
@container (max-width: 290px) {
  .tabf-cal--kompakt .tabf-cal-status { display: none; }
  .tabf-cal--kompakt .tabf-cal-dot { display: block; }
}
@media (max-width: 640px) {
  .tabf-cal--kompakt .tabf-cal-cell { min-height: 56px; }
  .tabf-cal--kompakt .tabf-cal-day { font-size: 23px; }
  .tabf-cal--7.tabf-cal--kompakt .tabf-cal-dot { display: block; }
  .tabf-dt-h { font-size: 25px; }
}
/* «Din time» uten pris (bedriftslenken, runde 19 C). */
.tabf-aside-total.is-bedrift .sub { font-size: 15px; line-height: 1.45; }
.tabf-bedrift-kv { margin-top: 18px; }
