/* Readium CSS 
   Sepia mode

   A preset theme for sepia mode

   Repo: https://github.com/readium/readium-css */


/* CONFIG */

:root:--sepia-mode {
  --RS__backgroundColor: #faf4e8;
  --RS__textColor: #121212;

  --RS__linkColor: #0000EE;
  --RS__visitedColor: #551A8B;

  /* This can be customized but initial will re-use default value of the browser */
  --RS__selectionBackgroundColor: #b4d8fe;
  --RS__selectionTextColor: inherit;

  --RS__maxLineLength: 40.01rem; /* Forcing a reflow in Blink/Webkit so that blend mode can work */
}

/* we don’t need to redeclare bg-color and color for :root since we will inherit and update from day/default mode */

:root:--sepia-mode body {
  background-color: var(--RS__backgroundColor);
  /* Should be transparent but Chrome bug https://bugs.chromium.org/p/chromium/issues/detail?id=711955&q=mix-blend-mode&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified */

  color: inherit;
}

:root:--sepia-mode a:link,
:root:--sepia-mode a:link * {
  color: var(--RS__linkColor);
}

:root:--sepia-mode a:visited,
:root:--sepia-mode a:visited * {
  color: var(--RS__visitedColor);
}

:root:--sepia-mode svg,
:root:--sepia-mode img {
  /* Make sure the proper bg-color is used for the blend mode */
  background-color: transparent !important;
  mix-blend-mode: multiply;
}