/* ---------------------------------------------------------------
   Light interface
   White toolbars and panels on a soft grey desk, blue for what is
   picked — the look of a desktop PDF reader. It is the interface
   only: the page's own reading theme (Paper, Sepia, Night) is a
   separate choice and still applies on top.
   Everything that reads its colour from a variable follows by itself;
   what is left here are the places that were written for dark.
   --------------------------------------------------------------- */

body[data-ui="light"] {
  --chrome: #FFFFFF;
  --chrome-2: #F3F4F6;
  --stage: #E8E9EB;
  --line: #DADCE0;
  --paper: #FFFFFF;
  --text: #1F2328;
  --text-dim: #646A73;
  --marker: #7B5CFF;
  --btn: #0265DC;                 /* filled buttons: white text on it 5.4:1 */
  --btn-hover: #0256BB;
  --marker-ink: #6141EA;          /* the violet as text: 5:1 on every grey here */
  --danger: #D7373F;
  --accent-ink: #FFFFFF;          /* text on a violet fill */
  --on-bg: #E5E7EB;               /* pressed tool / tab: grey tile */
  --on-ink: #6141EA;              /* its icon and label: 5.4:1 on --on-bg */
  --pri-bg: #E5E7EB;              /* main actions (Save, Select files) */
  --pri-bg-hover: #D7DAE0;
  --pri-ink: #111827;             /* 13:1 on --pri-bg */
  --hover: rgba(0, 0, 0, .045);
  --shadow-pop: 0 10px 30px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .08);
  color-scheme: light;
}

/* The photo screens stay dark, like a camera or a photo viewer: a picture
   reads better on black. They get the dark values back. */
body[data-ui="light"] :is(#pm, #cam, #lb) {
  --chrome: #050505; --chrome-2: #181818; --stage: #111111; --line: #333333;
  --text: #E4E4E4; --text-dim: #8D8D8D; --marker: #FFFFFF; --marker-ink: #FFFFFF; --danger: #E27C68;
  --on-bg: #2E2E2E; --on-ink: #B7A6FF; --pri-bg: #2E2E2E; --pri-bg-hover: #3A3A3A; --pri-ink: #F2F2F2;
  color: var(--text);
  color-scheme: dark;
}

/* ---- toolbar, ribbon and buttons ---- */
body[data-ui="light"] .bar,
body[data-ui="light"] .ribbon { box-shadow: 0 1px 0 rgba(0, 0, 0, .02) }
body[data-ui="light"] .btn:hover:not(:disabled) { background: var(--hover); border-color: transparent }
body[data-ui="light"] .btn.on { background: var(--on-bg); border-color: transparent; color: var(--on-ink) }
body[data-ui="light"] .btn.primary { background: var(--pri-bg); color: var(--pri-ink); border-color: transparent }
body[data-ui="light"] .btn.primary:hover:not(:disabled) { background: var(--pri-bg-hover); border-color: transparent }
body[data-ui="light"] .ribbon .btn.on::after { color: var(--on-ink) }
body[data-ui="light"] .admark { color: #1F2328; border-color: #9AA0A6 }
body[data-ui="light"] a.admark:hover { border-color: #1F2328 }
body[data-ui="light"] #btnHome { background: #FFFFFF }
body[data-ui="light"] #btnHome:hover:not(:disabled) { background: var(--pri-bg-hover); color: var(--pri-ink) }
body[data-ui="light"] .pager input,
body[data-ui="light"] .search-in,
body[data-ui="light"] .pop input,
body[data-ui="light"] .pw input { background: #FFFFFF }

/* ---- pops and floating panels: a soft shadow, not a black one ---- */
body[data-ui="light"] :is(.pop, .markpop, .swpop) { box-shadow: var(--shadow-pop) }
body[data-ui="light"] .scrim { background: rgba(15, 23, 42, .32) }

/* a dark toast stands out over a white page, the way desktop readers do it */
body[data-ui="light"] .toast { background: #2B2F36; border-color: #2B2F36; color: #FFFFFF;
                               box-shadow: 0 8px 24px rgba(15, 23, 42, .25) }
body[data-ui="light"] .toast b { color: #B9A8FF }
/* a thin ring, so the white swatch does not vanish into the white bar */
body[data-ui="light"] :is(.sw, .swpop button, .markpop .cbtn i) { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18) }
body[data-ui="light"] .sw.on { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), 0 0 0 2px var(--chrome-2) }

/* ---- sidebar ---- */
body[data-ui="light"] .rail { background: #FAFAFB }
body[data-ui="light"] .thumb .shell { box-shadow: 0 1px 3px rgba(0, 0, 0, .12) }
body[data-ui="light"] .thumb.picked .shell { box-shadow: 0 0 0 2px rgba(123, 92, 255, .28) }
body[data-ui="light"] .thumb.active .no { color: #7B5CFF }
body[data-ui="light"] :is(.thumb .tools button, .ptools button) {
  background: rgba(255, 255, 255, .96); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
body[data-ui="light"] .btn .cnt { color: var(--accent-ink) }
body[data-ui="light"] .thumb .badge,
body[data-ui="light"] .pagebox.added .ptools::before { background: var(--marker); color: var(--accent-ink) }
body[data-ui="light"] .hit-item mark { background: rgba(255, 196, 0, .45); color: inherit }
body[data-ui="light"] .hit-item.active mark { background: rgba(255, 120, 0, .4) }
body[data-ui="light"] .pined figure { background: #F1F2F4 }

/* ---- the pages on the desk ---- */
body[data-ui="light"] .page { box-shadow: 0 1px 3px rgba(0, 0, 0, .16), 0 6px 18px rgba(0, 0, 0, .08) }

/* ---- open file / home screen ---- */
body[data-ui="light"] :is(.drop h1, .htop h1, .hdrop h2, .hsec h3) { color: var(--text) }
body[data-ui="light"] .hdrop .art .dot { color: var(--accent-ink) }
body[data-ui="light"] .pick { color: var(--pri-ink) }
body[data-ui="light"] .pick { background: var(--pri-bg) }
body[data-ui="light"] .pick:hover { background: var(--pri-bg-hover) }
body[data-ui="light"] .home { background: #F4F5F7 }
body[data-ui="light"] .hnav { background: #FFFFFF }
body[data-ui="light"] .hnav .safe svg { stroke: #7A808A }
body[data-ui="light"] .hdrop { background: #FFFFFF; border-color: #C3C7CD }
body[data-ui="light"] .hdrop.hot { background: #F3F0FF; border-color: var(--marker) }
body[data-ui="light"] .hdrop .art .pg.b { box-shadow: 0 4px 12px rgba(0, 0, 0, .14) }
body[data-ui="light"] .hdrop .art .pg.f { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .14)) }
body[data-ui="light"] .tcard:hover { border-color: #AEB4BC; background: #FFFFFF; box-shadow: 0 4px 14px rgba(0, 0, 0, .06) }
body[data-ui="light"] .tcard .ic { background: #F3F0FF; border-color: #DCD3FF; color: var(--marker-ink) }
body[data-ui="light"] .rrow .x:hover { background: var(--hover) }

/* ---- the feature panels in pro.css ---- */
body[data-ui="light"] :is(.cthread .lnk:hover, .citem:hover, .rcitem:hover, .rcitem footer .lnk:hover) { background: var(--hover) }
body[data-ui="light"] .sigtabs button.on { background: var(--chrome-2) }
body[data-ui="light"] .dhint.block { background: var(--chrome-2) }
body[data-ui="light"] :is(.anno-sw .sw, .sigcolors .sw) { border-color: rgba(0, 0, 0, .18) }
body[data-ui="light"] .orgshell.pending { background: repeating-linear-gradient(45deg, #EEEFF1 0 8px, #F6F7F8 8px 16px) }
body[data-ui="light"] .hdrop .install:hover { border-color: #AEB4BC; color: var(--text) }
body[data-ui="light"] .instpop .txt b { color: var(--text) }
body[data-ui="light"] :is(.sigmodal, .docmodal) > * { box-shadow: var(--shadow-pop) }

/* ---- the switch itself: a sun in the dark, a moon in the light ---- */
.resume.uimode svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8;
                     stroke-linecap: round; stroke-linejoin: round; flex: none }
.uimode .moon { display: none }
body[data-ui="light"] .uimode .sun { display: none }
body[data-ui="light"] .uimode .moon { display: inline }

/* the top bar, as Acrobat's: a light grey, with the document tab in view
   white, as the toolbar it runs into */
body[data-ui="light"] .appbar { --tab-strip: #E6E8EC; --tab-on: var(--chrome) }
