/* EnyaBooks — skins. Each skin only changes the colour variables of site.css; the pages stay the same.
   The skin is chosen in the top bar (palette icon) and kept in the browser (cookie eb_skin). "classic" = site.css as it is. */

/* ---------------- Blue Office */
html[data-skin="blue"] {
    --eb-sidebar: #1f3a5f;
    --eb-side-text: #c3d2e6;
    --eb-side-active: #fff;
    --eb-topbar: #2f6db5;
    --eb-topbar-text: #fff;
    --eb-head: #3d7cc9;
    --eb-head-text: #fff;
    --eb-accent: #2f6db5;
    --eb-accent-dark: #24568f;
    --eb-accent-soft: #e8f0fb;
    --eb-accent-border: #c9dbf2;
    --eb-link: #1f5fbf;
    --eb-bg: #eef2f7;
    --eb-soft: #eaf1fa;
    --eb-row-alt: #f6f9fd;
}

/* ---------------- Green */
html[data-skin="green"] {
    --eb-sidebar: #24433a;
    --eb-side-text: #c6dbd2;
    --eb-side-active: #fff;
    --eb-topbar: #3f7d66;
    --eb-topbar-text: #fff;
    --eb-head: #4a8a72;
    --eb-head-text: #fff;
    --eb-accent: #2e8b57;
    --eb-accent-dark: #23704a;
    --eb-accent-soft: #e6f4ec;
    --eb-accent-border: #c4e3d1;
    --eb-link: #1d7a4c;
    --eb-bg: #eef4f1;
    --eb-soft: #e9f3ee;
    --eb-row-alt: #f6faf8;
}

/* ---------------- Dark (Bootstrap's own dark mode is switched on with it: data-bs-theme="dark") */
html[data-skin="dark"] {
    color-scheme: dark;
    --eb-sidebar: #111317;
    --eb-side-text: #a9afba;
    --eb-side-active: #fff;
    --eb-topbar: #262a33;
    --eb-topbar-text: #e6e8ec;
    --eb-head: #2d3340;
    --eb-head-text: #e6e8ec;
    --eb-accent: #8b6fe0;
    --eb-accent-dark: #a48bf0;
    --eb-accent-soft: #2a2540;
    --eb-accent-border: #463c6b;
    --eb-link: #7fb0ff;
    --eb-bg: #15171c;
    --eb-card: #1e2128;
    --eb-text: #c9ced6;
    --eb-title: #eceef2;
    --eb-strong: #e2e5ea;
    --eb-muted: #8f96a3;
    --eb-ico: #b9bfca;
    --eb-border: #343944;
    --eb-border-strong: #4a505d;
    --eb-row-alt: #22262e;
    --eb-soft: #252a33;
    --eb-warn-bg: #3a3120;
    --eb-warn-border: #8a6d2a;
    --eb-warn-text: #f3c76b;
    --eb-ok-bg: #1f3326;
    --eb-ok-border: #3f7a52;
    --eb-bad-bg: #3a2224;
    --bs-body-bg: #1e2128;
    --bs-body-color: #c9ced6;
}
html[data-skin="dark"] body { background: var(--eb-bg); }
/* pages that set a light colour in their own markup */
html[data-skin="dark"] .bg-white, html[data-skin="dark"] .bg-light { background-color: var(--eb-soft) !important; }
html[data-skin="dark"] .text-dark { color: var(--eb-strong) !important; }
html[data-skin="dark"] .table { --bs-table-bg: transparent; }
html[data-skin="dark"] .eb-table td, html[data-skin="dark"] .eb-rep-table td { color: var(--eb-text); }
html[data-skin="dark"] .eb-sugg { background: var(--eb-warn-bg) !important; color: var(--eb-warn-text) !important; }
html[data-skin="dark"] .select2-container--default .select2-selection--single,
html[data-skin="dark"] .select2-dropdown,
html[data-skin="dark"] .select2-search__field { background: var(--eb-card); color: var(--eb-text); border-color: var(--eb-border); }
html[data-skin="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--eb-text); }
html[data-skin="dark"] .select2-container--default .select2-results__option--selected { background: var(--eb-soft); }
html[data-skin="dark"] img.signimg, html[data-skin="dark"] .eb-logo-box img { background: #fff; }

/* the skin picker in the top bar */
.eb-skin-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.2); vertical-align: -2px; margin-right: 6px; }

/* ================= Style "veteran": keyboard way of working (no sidebar; Gateway, F-keys, key bar) ================= */
.eb-vgw-btn { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); color: var(--eb-topbar-text); border-radius: 6px;
              font-size: 14px; padding: 4px 10px; display: inline-flex; align-items: center; gap: 6px; }
.eb-vgw-btn:hover { background: rgba(255,255,255,.25); }
html[data-style="veteran"] .eb-sidebar { display: none; }
html[data-style="veteran"] .eb-content { padding-bottom: 46px; }
html[data-style="veteran"] .eb-table td { padding-top: 3px; padding-bottom: 3px; }
html[data-style="veteran"] tr.eb-vrow td { background: var(--eb-accent-soft) !important; box-shadow: inset 0 1px 0 var(--eb-accent), inset 0 -1px 0 var(--eb-accent); }
/* the key bar at the bottom */
.eb-vbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; flex-wrap: wrap; gap: 4px; padding: 5px 8px;
           background: var(--eb-sidebar); border-top: 1px solid var(--eb-border-strong); font-size: 12.5px; }
.eb-vbar button { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: var(--eb-side-text); border-radius: 4px; padding: 3px 8px; }
.eb-vbar button:hover { color: var(--eb-side-active); background: rgba(255,255,255,.14); }
.eb-vbar b { color: var(--eb-side-active); margin-right: 4px; }
/* Gateway: every screen of the menu, opened by a letter */
.eb-vgw { position: fixed; inset: 0; z-index: 1080; background: rgba(0,0,0,.35); display: grid; place-items: start center; padding-top: 8vh; }
.eb-vgw-box { width: min(760px, 94vw); max-height: 80vh; overflow-y: auto; background: var(--eb-card); color: var(--eb-text); border-radius: 10px;
              box-shadow: 0 18px 50px rgba(0,0,0,.3); padding: 14px 18px 18px; }
.eb-vgw-box h2 { font-size: 17px; font-weight: 600; color: var(--eb-strong); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.eb-vgw-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 18px; }
.eb-vgw-grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--eb-muted); margin: 10px 0 2px; grid-column: 1 / -1; }
.eb-vgw a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--eb-strong); text-decoration: none; font-size: 14px; }
.eb-vgw a.on, .eb-vgw a:hover { background: var(--eb-accent-soft); }
.eb-vgw a u { color: var(--eb-accent-dark); font-weight: 700; text-decoration: underline; }
@media print { .eb-vbar, .eb-vgw { display: none !important; } }
