/* © Haut Forvalting AS (Org.nr. 931 603 760) — Altibedrift.
 * Konfidensiell arkitektur/arbeidsdokument. Uautorisert kopiering/distribusjon forbudt.
 * MTA output integrated with finite native-details feedback and no persistent layer hints.
 */
/* ==========================================================================
   MTA — MORPHE TRANSFORMATION ARCHITECT
   TARGET: WEBSJEKK-PAGE-SURFACE-005 (/innsikt/norsk-tech/)
   FILE: norsk-tech-motion-haut-v1.css
   PURPOSE: Additive Microinteractions & State Geometry (Dynamic Reflect v1)
   ========================================================================== */

/* 1. FOCUS STATE (3px #397651 med hvit kontrastkant) */
html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main :focus-visible {
  outline: 3px solid #397651 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px #ffffff inset, 0 0 0 2px #ffffff !important;
  transition: outline-color 150ms ease, box-shadow 150ms ease !important;
}

/* 2. BASE INTERACTION TIMING (150ms feedback) */
html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main a,
html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main button,
html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main summary {
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
              background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
              color 150ms cubic-bezier(0.4, 0, 0.2, 1),
              border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3. HOVER STATES (Kun for fine pointers, 1px løft på utvalgte handlinger) */
@media (hover: hover) and (pointer: fine) {
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main .button--primary:hover,
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main .source-route__actions a:hover,
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main .traffic-journey__actions a:hover,
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main .source-graph-related__grid a:hover,
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main .nt-institutional-newsletter__form button:hover {
    transform: translateY(-1px);
  }

  /* Visuell respons på summaries uten løft */
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main summary:hover {
    opacity: 0.8;
  }
}

/* 4. Native details remain owned by the browser. No height interpolation or persistent compositor hints. */
@keyframes nt-details-reveal-v1 { from { transform:translateY(-2px); } to { transform:translateY(0); } }
html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main details[open] summary ~ * { animation:nt-details-reveal-v1 180ms ease-out; }

/* 5. INVARIANT SIKRING (Ingen infinite loops) */
html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main .source-graph-live__pulse {
  animation: none !important; /* Blokkerer evt. fremtidig statusglød-loop */
}

/* 6. REDUCED MOTION SIKKERHET */
/* Fjerner tid på transitions, men forhindrer universal transform:none som ødelegger SVG-posisjonering */
@media (prefers-reduced-motion: reduce) {
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main *,
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main *::before,
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  /* Nullstiller kun det spesifikke MTA-løftet på interaktive elementer */
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main .button--primary:hover,
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main .source-route__actions a:hover,
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main .traffic-journey__actions a:hover,
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main .source-graph-related__grid a:hover,
  html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main .nt-institutional-newsletter__form button:hover {
    transform: translateY(0) !important;
  }
}

html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main :is(button,summary,.button--primary,.source-route__actions a,.traffic-journey__actions a):active { transform:translateY(1px); }
@media(prefers-reduced-motion:reduce) {
html body[data-ws-experience="2"][data-ws-norsk-tech-surface="1"] main :is(button,summary,.button--primary,.source-route__actions a,.traffic-journey__actions a):active { transform:none !important; }
}
