/*
 * What the full viewer and the diff view share, so that they look like one product: the colours of
 * the viewer's own light and dark palette, and the icons Lpdf draws for its controls. Both pages
 * load this file, and a change here changes both.
 *
 * Every colour is a light-dark() pair, which follows the color-scheme of the page; the pages set
 * that from the VS Code theme. The values that mirror PDF.js's own palette are named in the
 * comments, and a test fails if an upgrade of PDF.js changes any of them.
 *
 * The icons are drawn to fill a 16 unit box edge to edge, as the viewer's own sidebar, save and
 * info icons are. A page shows one as a mask, in the icon colour.
 */
:root {
    /* Surfaces. */
    --lpdf-header-bg: light-dark(rgb(249 249 250), rgb(56 56 61));        /* PDF.js --toolbar-bg-color */
    --lpdf-header-border: light-dark(rgb(184 184 184), rgb(12 12 13));    /* PDF.js --toolbar-border-color */
    --lpdf-desk-bg: light-dark(rgb(212 212 215), rgb(42 42 46));          /* PDF.js --body-bg-color */
    --lpdf-scrollbar: light-dark(auto, rgb(121 121 123));                 /* PDF.js --scrollbar-color */
    --lpdf-scrollbar-bg: light-dark(auto, rgb(35 35 39));                 /* PDF.js --scrollbar-bg-color */

    /* Text, icons and buttons. */
    --lpdf-text: light-dark(rgb(12 12 13), rgb(249 249 250));             /* PDF.js --main-color */
    --lpdf-icon-color: light-dark(rgb(0 0 0), rgb(255 255 255));          /* PDF.js --toolbar-icon-bg-color */
    --lpdf-icon-opacity: 0.7;                                             /* PDF.js --toolbar-icon-opacity */
    --lpdf-button-hover-bg: color-mix(in srgb, currentColor 17%, transparent);
    --lpdf-separator: rgb(0 0 0 / 0.3);                                   /* PDF.js --separator-color */

    /* Text fields. */
    --lpdf-field-text: light-dark(rgb(6 6 6), rgb(250 250 250));          /* PDF.js --field-color */
    --lpdf-field-bg: light-dark(rgb(255 255 255), rgb(64 64 68));         /* PDF.js --field-bg-color */
    --lpdf-field-border: light-dark(rgb(187 187 188), rgb(115 115 115));  /* PDF.js --field-border-color */

    /* The page shadow, an error message, and a tick box. */
    --lpdf-page-shadow: 0 2px 10px rgb(0 0 0 / 0.4);
    --lpdf-page-bg: rgb(255 255 255);                                     /* PDF.js page background, behind what a page draws */
    --lpdf-error: light-dark(#b20037, #ffa0aa);                              /* PDF.js --indicator-warning-color */
    --lpdf-accent: light-dark(rgb(10 132 255), rgb(0 96 223));            /* PDF.js --progressBar-color */

    /* A dialog: its border, shadow and the veil behind it, and the buttons in it. */
    --lpdf-dialog-border: rgb(0 0 0 / 0.5);                               /* PDF.js dialog border */
    --lpdf-dialog-shadow: 0 1px 4px rgb(0 0 0 / 0.3);                     /* PDF.js dialog box-shadow */
    --lpdf-dialog-backdrop: rgb(0 0 0 / 0.2);                             /* PDF.js dialog::backdrop */
    --lpdf-dialog-button-text: light-dark(#15141a, #fbfbfe);              /* PDF.js --button-secondary-fg-color */
    --lpdf-dialog-button-bg: light-dark(rgb(21 20 26 / 0.07), rgb(251 251 254 / 0.07));        /* PDF.js --button-secondary-bg-color */
    --lpdf-dialog-button-hover-bg: light-dark(rgb(21 20 26 / 0.14), rgb(251 251 254 / 0.14));  /* PDF.js --button-secondary-hover-bg-color */
    --lpdf-dialog-button-active-bg: light-dark(rgb(21 20 26 / 0.21), rgb(251 251 254 / 0.21)); /* PDF.js --button-secondary-active-bg-color */

    /* What differs between the two documents of the diff view. */
    --lpdf-changed-bg: color-mix(in srgb, var(--lpdf-accent) 18%, transparent);

    /* Icons. */
    --lpdf-icon-minus: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M1.5%208h13%22%2F%3E%3C%2Fsvg%3E");
    --lpdf-icon-plus: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M8%201.5v13M1.5%208h13%22%2F%3E%3C%2Fsvg%3E");
    --lpdf-icon-fit-width: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%220.65%22%20y%3D%222.15%22%20width%3D%2214.7%22%20height%3D%2211.7%22%20rx%3D%221.6%22%2F%3E%3Cpath%20d%3D%22M3.6%208h8.8M5.6%206%203.6%208l2%202M10.4%206l2%202-2%202%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
    --lpdf-icon-fit-page: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%222.65%22%20y%3D%220.65%22%20width%3D%2210.7%22%20height%3D%2214.7%22%20rx%3D%221.4%22%2F%3E%3Cpath%20d%3D%22M8%203.6v8.8M6%205.6l2-2%202%202M6%2010.4l2%202%202-2%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
    --lpdf-icon-two-page: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%220.65%22%20y%3D%222.15%22%20width%3D%226.7%22%20height%3D%2211.7%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%228.65%22%20y%3D%222.15%22%20width%3D%226.7%22%20height%3D%2211.7%22%20rx%3D%221%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
    --lpdf-icon-cover: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Crect%20x%3D%220.65%22%20y%3D%222.15%22%20width%3D%226.7%22%20height%3D%2211.7%22%20rx%3D%221%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.3%22%20stroke-dasharray%3D%221.6%201.6%22%2F%3E%3Crect%20x%3D%228%22%20y%3D%221.5%22%20width%3D%228%22%20height%3D%2213%22%20rx%3D%221.4%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
