/* ==========================================================================
   Tema: Regi-farger, tema-variablene (lyst/mørkt/system) og fontene.
   Lastes før __intern.css på internsidene og alene (med designsystem.css) på de
   offentlige sidene, innloggingen og feilsidene. Bare :root og @font-face her.
   ========================================================================== */

:root {
  --Regi-white: #f5f4f4;
  --Regi-yellow: #fab53a;
  --Regi-grey: #9c9c9c;
  --Regi-black: #171717;
  --Regi-darkgrey: #4f4f4f; /* inputfelt på mørk bakgrunn (dip) */
  --Dark-grey: hsl(0, 0%, 88%);
  --Button-green: #27ae60;
  --Dark-button-green: #229955;
  --Green2: #27ae60;
  --Cancel-red: #eb5757;
  --Dark-cancel-red: #e84040;
  --Tungerod: hsl(359, 80%, 50%);
  --Mork-rod: #6b261f;
  --Lys-rod: #7a3b35;
  --Lysere-rod: #a97a76;

  /* Tema (lyst er standard, mørkt settes med data-theme, se felles/js/tema.js).
     Bruk disse i stedet for hardkodede farger, så virker siden i begge temaer. */
  color-scheme: light;
  --bg: var(--Regi-white); /* sidebakgrunn */
  --flate: white; /* kort, menyer, knapper */
  --flate-dempet: #ddd;
  --flate-svak: #f8f9fa; /* nesten hvit, f.eks. bakgrunn i kort */
  --flate-graa: #e9ecef;
  --tekst: var(--Regi-black);
  --tekst-sekundaer: #555;
  --tekst-dempet: #8a8a8a;
  --ikon-filter: none; /* mørke ikonbilder (png/svg) inverteres i mørkt tema */
  --kant: var(--Regi-black);
  --kant-lys: #ddd;
  --skygge: rgba(0, 0, 0, 0.75);
  --max-page-width: 1440px;
  --breadcrumbs-height: 31px;
  --Trekkspillmeny-bredde: 18vw;
  --max-trekkspillbredde: calc(0.18 * var(--max-page-width));
  --max-intern-content-width: calc(
    var(--max-page-width) - var(--max-trekkspillbredde)
  );
  --FelixDB-flexbox-left-bredde: 30vw;
  --max-felixdb-left-bredde: calc(0.3 * var(--max-page-width));
  --FelixDB-flexbox-right-bredde: calc(
    100vw - var(--Trekkspillmeny-bredde) - var(--FelixDB-flexbox-left-bredde)
  );
  --max-felixdb-right-bredde: calc(0.52 * var(--max-page-width));
  --max-intern-content-bredde: calc(
    var(--max-felixdb-left-bredde) + var(--max-felixdb-right-bredde)
  );
  --header-height: 132px;
  --intern-content-height: calc(100vh - var(--header-height));
  --felixdb-height: calc(
    var(--intern-content-height) - var(--breadcrumbs-height)
  );
  --mobil-page-side-margin: 23px;
  --mobil-page-top-margin: 29px;
  --intern-content-bredde: calc(1440px - var(--Trekkspillmeny-bredde));
  --pagination-height: 33px;
}

/* Mørkt tema: valgt eksplisitt, eller «system» når OS-et bruker mørk modus */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414;
  --flate: #1f1f1f;
  --flate-dempet: #2c2c2c;
  --flate-svak: #262626;
  --flate-graa: #2c2c2c;
  --tekst: #ececec;
  --tekst-sekundaer: #c4c4c4;
  --tekst-dempet: #9a9a9a;
  --ikon-filter: invert(1) hue-rotate(180deg);
  scrollbar-color: #4a4a4a transparent;
  --kant: #d6d6d6;
  --kant-lys: #3a3a3a;
  --skygge: rgba(250, 181, 58, 0.55);
  --Dark-grey: hsl(0, 0%, 26%);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #141414;
    --flate: #1f1f1f;
    --flate-dempet: #2c2c2c;
    --flate-svak: #262626;
    --flate-graa: #2c2c2c;
    --tekst: #ececec;
    --tekst-sekundaer: #c4c4c4;
    --tekst-dempet: #9a9a9a;
    --ikon-filter: invert(1) hue-rotate(180deg);
    scrollbar-color: #4a4a4a transparent;
    --kant: #d6d6d6;
    --kant-lys: #3a3a3a;
    --skygge: rgba(250, 181, 58, 0.55);
    --Dark-grey: hsl(0, 0%, 26%);
  }
}

/* Fonts
   Relative url()-er (fra static/felles/css/), så ManifestStaticFilesStorage kan skrive dem om.
   De gamle navnene («Roboto Regular», «Roboto Slab Bold» ...) brukes rundt om i CSS-en og beholdes.
   Designsystemet bruker «Roboto» og «Roboto Slab» med ekte font-weight. */
@font-face {
  font-family: "Roboto Slab Bold";
  src: url("../fonter/Roboto_Slab/static/RobotoSlab-SemiBold.f2add96fdf83.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Roboto Slab Regular";
  src: url("../fonter/Roboto_Slab/static/RobotoSlab-Regular.f7ffac600a7a.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Roboto Slab Medium";
  src: url("../fonter/Roboto_Slab/static/RobotoSlab-Medium.d11040e282c4.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Roboto Slab Light";
  src: url("../fonter/Roboto_Slab/static/RobotoSlab-Light.34fef0f8265d.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Roboto Bold";
  src: url("../fonter/Roboto/Roboto-Bold.e07df86cef2e.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Roboto Regular";
  src: url("../fonter/Roboto/Roboto-Regular.11eabca22513.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Roboto Italic";
  src: url("../fonter/Roboto/Roboto-Italic.a720f17aa773.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Roboto Light";
  src: url("../fonter/Roboto/Roboto-Light.88823c2015ff.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonter/Roboto/Roboto-Light.88823c2015ff.ttf") format("truetype");
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonter/Roboto/Roboto-Regular.11eabca22513.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonter/Roboto/Roboto-Medium.58aef543c97b.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonter/Roboto/Roboto-Bold.e07df86cef2e.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonter/Roboto/Roboto-Italic.a720f17aa773.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Slab";
  src: url("../fonter/Roboto_Slab/static/RobotoSlab-Regular.f7ffac600a7a.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Slab";
  src: url("../fonter/Roboto_Slab/static/RobotoSlab-Medium.d11040e282c4.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Slab";
  src: url("../fonter/Roboto_Slab/static/RobotoSlab-SemiBold.f2add96fdf83.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Slab";
  src: url("../fonter/Roboto_Slab/static/RobotoSlab-Bold.5b025a51d20f.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
