﻿
/* =============================================================================
   Book viewer — surface elevation (Option B2, locked 2026-06-03)
   =============================================================================
   Following the same surface-elevation principle established for the library
   viewer in May 2026 (Path A — Material 3 / Atlassian / Refactoring UI).

   Stack from outer chrome to focal content:
     1. Top header             dark    #1c2127       (unchanged)
     2. Top toolbar            grey    #f5f7f9       (chrome)
     3. Sidebar tab panel      off-w   #fafbfc       (secondary chrome)
     4. Breadcrumb             white   #ffffff       (content metadata)
     5. Reading surround       grey    #f5f7f9       (paper "cradle")
     6. Paper (#mockTurtle)    white + Material 3 elevation-3 shadow

   The grey surround under the paper gives the shadow tonal contrast to
   register against — the textbook reading-app pattern (Kindle Cloud
   Reader, O'Reilly, Apple Books web, Issuu, Scribd). Tokens reused from
   the existing palette (--sp-surface for chrome, --sp-card-bg for paper).

   --book-page-body-bg is the custom property that _set_page_view() reads
   from in ext-acs-book2c.js — keeps the JS layout writer in sync with
   the canonical token without hard-coding hex in JS. See the note above
   #mockTurtle below.
   ============================================================================= */
:root {
    --book-page-body-bg: #f5f7f9;  /* page-view surround (paper cradle) */
    --book-web-view-bg:  #ffffff;  /* web-view surround (no paper card) */
}

#mockTurtle {
    margin: 0 auto;
    background-color: var(--sp-card-bg, #ffffff);
    padding: 2cm;
    border: none;
    border-radius: 4px;
    /* Material 3 elevation-3 — three-layer shadow gives the paper a real
       "lifted card" presence against the grey surround. */
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.06),
        0 4px 8px rgba(15, 23, 42, 0.08),
        0 8px 24px rgba(15, 23, 42, 0.10);
}

/* Reading surround. Page-view sets this to --book-page-body-bg (grey
   cradle), web-view sets it to --book-web-view-bg (white, no card to
   cradle). _set_page_view() in ext-acs-book2c.js applies the switch
   inline by reading these custom properties — keeps the JS layout
   writer in sync with the CSS token without hard-coded hex. */
#page_body {
    background-color: var(--book-page-body-bg);
    padding-top: 5px;
    padding-bottom: 5px;
}

#mockSpacer {
    margin: 0 0;   
}

/* A book with no fragments: no paper card, just the empty-state message
   (same look as the start page's .empty-state). The footer spacer stays in
   the DOM because the viewer still sizes it by id. */
#mockTurtle:has(> .book-empty-state) {
    background-color: transparent;
    box-shadow: none;
}
#mockTurtle:has(> .book-empty-state) > .book_frag_padding {
    display: none;
}
.book-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.book-empty-state-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: #b0b8c4;
}
.book-empty-state h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--acs-text-primary, #1c2127);
}
.book-empty-state p {
    max-width: 320px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--acs-text-secondary, #5a6370);
}

/* <== Page view for books */

.book-fragment {
    padding: 0.1px;
    width: 100%;    
}

/* Bread crumbs panel in Book Viewer */
.bread_crumb_panel {
	background-color: #FFFFFF !important;
}

/* Controls Left panel's Tab-Bar height */
#ext-acs-book-tabpanel .x-tab-strip-text {
	line-height: 19px !important;
} 

/* Set width of Left Panel Trees to 100% */
#toc ul { width: 100%; }
#qaa ul { width: 100%; }
#notes ul { width: 100%; } 
#tracks ul { width: 100%; }
#tasks ul { width: 100%; }


/* content styles */

.content_body 
{
    padding-left:20px;
    padding-right:20px;
    padding-bottom:5px;
}


/* book page content */

#page_content h1, #page_content h2, #page_content h3, #page_content h4, #page_content h5, #page_content h6
{
    font-size:100%;
    font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
    color:black;
}

#viewer-more-info
{
    padding:10px;
}
/* definition popups  */
.defn_content {
    margin:0px;
    padding:0px;
    overflow:auto;;
    font-family: "Verdana", "Arial", sans-serif;
    font-size:9pt;
    padding-left:0px;
    padding-right:0px;
    padding-top:0px;
    padding-bottom:0px;
    margin:0px;
    height:100%;    
}

.defn_content div
{
    height:100%;
}
.defn_content * TD {
    border: 0px;
}

.defn_content TABLE {
    width: 100%;
}       

/* Uninitialized fragment */
.book_frag_uninitialised
{
    background-color: #FAFAFA;
}

.book_frag_padding
{
    background-color: #ffffff;
}

.book_loading_indicator
{
    background-image:url("/tg_widgets/acs/extJS_3_4_1_1/resources/images/azzurra-legacy/shared/loading-eclipse-1s-16px.gif") !important;
    background-repeat : no-repeat;
}

/* Book info */
.book_info_header
{
    top:0px;
    left:180px;
    font-size: 12pt;
    font-weight: normal;
    color:#A47904;
    text-transform:uppercase;
    z-index:100;
}

.book_info_id
{
    margin:10px;
    z-index:100;
    font-size: 13px;
}

.book_info_label
{
    font-weight: normal;
    color:#16548F;
}



/*  container to remove extjs sytles - used for notes, qaa? */
.templatePanel {  font-size: 12px; }
.templatePanel ul { list-style-type: disc; list-style-position: inside; font-style:bold;
                    line-height:1.2em; margin-top:10px; margin-bottom:10px;
                    margin-right: 0px;
                    margin-left: 25px;
                    }
.templatePanel ol { list-style-type: decimal;
                    line-height:1.2em; margin-top:10px; margin-bottom:10px;
                    margin-right: 0px;
                    margin-left: 40px;
                    }
.templatePanel head { display: none }
.templatePanel table { display: table }
.templatePanel tr { display: table-row }
.templatePanel thead { display: table-header-group }
.templatePanel tbody { display: table-row-group }
.templatePanel tfoot { display: table-footer-group }
.templatePanel col { display: table-column }
.templatePanel colgroup { display: table-column-group }
.templatePanel td, th { display: table-cell }
.templatePanel caption { display: table-caption }
.templatePanel th { font-weight: bolder; text-align: center }
.templatePanel caption { text-align: center }
.templatePanel body { margin: 8px }
.templatePanel h1 { font-size: 2em; margin: .67em 0 }
.templatePanel h2 { font-size: 1.5em; margin: .75em 0 }
.templatePanel h3 { font-size: 1.17em; margin: .83em 0 }
.templatePanel h4, p,
        blockquote, ul,
        fieldset, form,
        ol, dl, dir,
        menu { margin: 0.0em 0 }
.templatePanel h5 { font-size: .83em; margin: 1.5em 0 }
.templatePanel h6 { font-size: .75em; margin: 1.67em 0 }                    



#book_page_panel .xtb-sep
{
    width: 17px;
	background: center center no-repeat url(/static/images/source-arrow.png);
}
/*
Analysis tracking styles
*/
.addToCurrentButton
{
    background-image:url("/static/images/at_add_current.png") !important;
}
.addToExistingButton
{
    background-image:url("/static/images/at_add_existing.png") !important;
}
.addToNewButton
{
    background-image:url("/static/images/at_add_new.png") !important;
}
.highlightButton
{
    background-image:url("/static/images/at_highlight.png") !important;
}
.floatingToolbar
{
   z-index: 9039;
   display: inline-block;
   _width: 1px;
}

/* floatingToolbar */

div.floatingToolbar {
  border: none;
  height: 40px;
  padding: 0 0 0 6px;
  color: #000000; 
}
div.floatingToolbar div.x-panel-bwrap {
  border: none;
  
}
div.floatingToolbar div.x-panel-body {
  border: none;
  height: 40px;
  margin-right: 6px;
  background-color: #4A4A4A;
}

.floatingToolbar .x-btn {
  background-color: #4A4A4A !important;
}

.floatingToolbar .x-btn :hover{
  background-color: #3b3b3b;
}


.floatingToolbar .x-btn-tl,
.floatingToolbar .x-btn-tr,
.floatingToolbar .x-btn-tc,
.floatingToolbar .x-btn-ml,
.floatingToolbar .x-btn-mr,
.floatingToolbar .x-btn-mc,
.floatingToolbar .x-btn-bl,
.floatingToolbar .x-btn-br,
.floatingToolbar .x-btn-bc {
    background-image: none;
} 

div.floatingToolbar table.x-table-layout {
  margin-top: -1px;
  padding-left: 1px;
  height: 40px;

}

div.floatingToolbar td.x-table-layout-cell table.x-btn em {
  padding: 0 4px;
}

div.floatingToolbar td.x-table-layout-cell,
div.floatingToolbar td.x-table-layout-cell table.x-btn {
  border: none;
  height: 40px;
  padding-right: 1px;
  margin-left: 0px;
}

div.floatingToolbar td.x-table-layout-cell table.x-btn.x-btn-over,
div.floatingToolbar td.x-table-layout-cell table.x-btn.x-btn-over tbody.x-btn-small {
  border: none;
}


div.floatingToolbar td.x-table-layout-cell table.x-btn td.x-btn-mc,
div.floatingToolbar td.x-table-layout-cell table.x-btn-over.x-btn td.x-btn-mc,
div.floatingToolbar td.x-table-layout-cell table.x-btn button,
div.floatingToolbar td.x-table-layout-cell table.x-btn-over.x-btn button {
  height: 34px;
}



/* extended toolbar */
div.floatingToolbar .x-panel-extended div.x-panel {

  border: none;
/*  height: 36px;
*/
  padding: 0 0 0 4px;
  background: no-repeat left top url(/static/images/button/left-exp.png);
}

div.floatingToolbar .x-panel-extended button {
  color: #ffffff;  
}


div.floatingToolbar .x-panel-extended div.x-panel-bwrap {
  border: none;
}

div.floatingToolbar .x-panel-extended div.x-panel-body {
  border: none;
  height: 36px; 
  margin-right: 3px;
}

div.floatingToolbar .x-panel-extended table.x-table-layout {
  margin-top: -2px;
}



.track_item_started {
  background-image: url(/static/images/at_start.png) !important; background-position: 0 0 !important;
}

.track_item {
  background-image: url(/static/images/libraryswitcher.png) !important; background-position: 0 0  !important;
}

.locked_track_item {
  background-image: url(/static/images/libraryswitcher.png) !important; background-position: 0 -16px  !important;
}

.track_recording_icn {
	background-image: url("/static/images/recording.png") !important;
}


.floatingToolbar button.x-btn-text.trackViewButton {
    background-image: url("/static/images/at_item.png") !important;
    background-position: left;
    padding-left: 18px;
} 


/* Analysys Tracking */


.floatingToolbar .x-table-layout-cell.analysysTracking .x-btn.x-btn-icon.x-btn-over,
.floatingToolbar .x-table-layout-cell.analysysTracking .x-btn.x-btn-text-icon.x-btn-over {
  background: none;
}

div.floatingToolbar td.analysysTracking.x-table-layout-cell table.x-btn button {
  height: 32px;
}

.floatingToolbar button.x-btn-text.analysysTrackingOff.visibleButton,
.floatingToolbar button.x-btn-text.ai-assist-icon.visibleButton {
    background-image: url("/static/images/arrow-AT-on.png") !important;
    background-position: right;
    padding: 0 18px 0 0;
/*  border-left: #9db5d5 1px solid;
*/
}
.floatingToolbar button.x-btn-text.analysysTrackingOff,
.floatingToolbar button.x-btn-text.ai-assist-icon {
    /*height: 34px;
    */
    background-image: url(/static/images/arrow-AT-off.png) !important;
    background-position: left;
    *width: auto !important;
} 

div.floatingToolbar td.x-table-layout-cell.analysysTracking.hiddenCell,
div.floatingToolbar td.x-table-layout-cell.ai-assist-cell.hiddenCell {
  background: no-repeat 0 1px url(/static/images/button/left-AT.png);
}

div.floatingToolbar .start-chat-btn td.x-btn-ml {
    border-left: 1px solid #929292;
}

div.floatingToolbar td.x-table-layout-cell.analysysTracking {

}

div.floatingToolbar td.x-table-layout-cell.analysysTracking table.x-btn.x-btn-over td.x-btn-ml,
div.floatingToolbar td.x-table-layout-cell.analysysTracking table.x-btn.x-btn-over td.x-btn-mc,
div.floatingToolbar td.x-table-layout-cell.analysysTracking table.x-btn.x-btn-over td.x-btn-mr {
  background-image: none;
}

#pwd_info_panel{
    width: 372px;
}

.x-plain .x-panel-btns {
    padding-right: 21px;
}

.x-plain .x-form{
    height:204px !important;
}


/* ============================================================================
   Book viewer — chrome surface palette (B2, 2026-06-03)
   ============================================================================
   Surface tones for the book viewer chrome stack. See the elevation rationale
   in the comment above #mockTurtle / #page_body. This block colours the
   surfaces themselves; per-element overrides (button icons, hover washes,
   active states, etc.) live in their own blocks below.

   The sidebar↔reading-column divider also gets a stronger line + inset
   shadow at the bottom of this block, matching the col-1↔col-2 pattern on
   the library viewer.
   ============================================================================ */

/* Top toolbar — grey, primary chrome. */
body.book-viewer .acs_toolbar {
    background-color: var(--sp-surface, #f5f7f9) !important;
}

/* Sidebar tab-panel — off-white, secondary chrome. Tabs strip + tab panel
   body + each individual tab content (toc / notes / tasks / tracks) get
   the same surface so the sidebar reads as one cohesive zone. */
body.book-viewer #ext-acs-book-tabpanel,
body.book-viewer #ext-acs-book-tabpanel .x-tab-panel-body,
body.book-viewer #ext-acs-book-tabpanel .x-tab-panel-bwrap,
body.book-viewer #ext-acs-book-tabpanel .x-tab-strip-top,
body.book-viewer #toc,
body.book-viewer #notes,
body.book-viewer #tasks,
body.book-viewer #tracks {
    background-color: var(--acs-surface-soft) !important;
}

/* Drop the legacy 4px top padding on the tab-panel header — added shell-wide
   in ext-acs-theme.css:1130 for "breathing room vs panel header", but with
   the off-white sidebar surface and no panel-header above, it reads as dead
   space. Scoped here to the book viewer only; the shell-wide rule applies
   elsewhere unchanged. */
body.book-viewer #ext-acs-book-tabpanel .x-tab-panel-header {
    padding: 0 !important;
}

/* Reading column container — same grey as the surround so the col reads
   as a continuous chrome zone with the white paper floating on it. */
body.book-viewer #book_page_panel,
body.book-viewer #book_page_panel > .x-panel-bwrap,
body.book-viewer #book_page_panel > .x-panel-bwrap > .x-panel-body {
    background-color: var(--sp-surface, #f5f7f9) !important;
}

/* Sidebar ↔ reading-column divider — soft inset shadow only on the
   reading column's left edge. Reinforces "content layer floats above
   chrome" without doubling up.

   No explicit border-right on the sidebar: the off-white #fafbfc vs grey
   #f5f7f9 tonal gap + the inset shadow already create the boundary. An
   added 1px line read as a thick double-divider (one line, plus the
   shadow edge, plus the tonal gap). */
body.book-viewer #book_page_panel {
    box-shadow: inset 4px 0 6px -4px rgba(15, 23, 42, 0.08) !important;
}


/* ============================================================================
   Book viewer — top toolbar restyle (theme refresh, A3.1 quick-polish slice)
   ============================================================================
   `body.book-viewer` is set in ext-acs-book2c.js. The viewer's `#ext-acs-header-wrap`
   contains two stacked rows — the dark shell nav (top) and `.acs_toolbar`
   (bottom), a 26-button book action bar that previously rendered as a
   light-grey strip embedded inside the dark header. This block re-flats the
   action bar, swaps every legacy `.cmd_*` / `*_img` PNG for a `--icon-*`
   SVG mask-image so the icons inherit `color:` (cyan on hover, secondary
   default, tertiary disabled), and aligns hover/pressed washes with the
   STYLING_PATTERNS §11 canonical pattern. Mirrors the notes-page top toolbar
   in ext-acs-notes-widgets.css (the reference implementation for this pattern).
   ============================================================================ */

/* ---- Clear legacy PNG backgrounds on every iconCls button ---- */
body.book-viewer .acs_toolbar button.cmd_home,
body.book-viewer .acs_toolbar button.cmd_web_view,
body.book-viewer .acs_toolbar button.cmd_page_view,
body.book-viewer .acs_toolbar button.cmd_supporting_doc,
body.book-viewer .acs_toolbar button.cmd_email_page,
body.book-viewer .acs_toolbar button.cmd_copy,
body.book-viewer .acs_toolbar button.cmd_print,
body.book-viewer .acs_toolbar button.cmd_export_to_pdf,
body.book-viewer .acs_toolbar button.cmd_export_to_idf,
body.book-viewer .acs_toolbar button.cmd_bookmark_page,
body.book-viewer .acs_toolbar button.cmd_note,
body.book-viewer .acs_toolbar button.cmd_info,
body.book-viewer .acs_toolbar button.cmd_task,
body.book-viewer .acs_toolbar button.cmd_expand,
body.book-viewer .acs_toolbar button.cmd_collapse,
body.book-viewer .acs_toolbar button.cmd_next_item,
body.book-viewer .acs_toolbar button.cmd_prev_item,
body.book-viewer .acs_toolbar button.cmd_sync,
body.book-viewer .acs_toolbar button.zoom_in,
body.book-viewer .acs_toolbar button.zoom_out,
body.book-viewer .acs_toolbar button.show_hide_links,
body.book-viewer .acs_toolbar button.show_in_folder,
body.book-viewer .acs_toolbar button.track_item_started,
body.book-viewer .acs_toolbar button.track_item_completed {
    background-image: none !important;
    background-color: transparent !important;
}

/* ---- ::before pseudo carries each glyph as a mask-image SVG ---- */
body.book-viewer .acs_toolbar button.cmd_home::before,
body.book-viewer .acs_toolbar button.cmd_web_view::before,
body.book-viewer .acs_toolbar button.cmd_page_view::before,
body.book-viewer .acs_toolbar button.cmd_supporting_doc::before,
body.book-viewer .acs_toolbar button.cmd_email_page::before,
body.book-viewer .acs_toolbar button.cmd_copy::before,
body.book-viewer .acs_toolbar button.cmd_print::before,
body.book-viewer .acs_toolbar button.cmd_export_to_pdf::before,
body.book-viewer .acs_toolbar button.cmd_export_to_idf::before,
body.book-viewer .acs_toolbar button.cmd_bookmark_page::before,
body.book-viewer .acs_toolbar button.cmd_note::before,
body.book-viewer .acs_toolbar button.cmd_info::before,
body.book-viewer .acs_toolbar button.cmd_task::before,
body.book-viewer .acs_toolbar button.cmd_expand::before,
body.book-viewer .acs_toolbar button.cmd_collapse::before,
body.book-viewer .acs_toolbar button.cmd_next_item::before,
body.book-viewer .acs_toolbar button.cmd_prev_item::before,
body.book-viewer .acs_toolbar button.cmd_sync::before,
body.book-viewer .acs_toolbar button.zoom_in::before,
body.book-viewer .acs_toolbar button.zoom_out::before,
body.book-viewer .acs_toolbar button.show_hide_links::before,
body.book-viewer .acs_toolbar button.show_in_folder::before,
body.book-viewer .acs_toolbar button.track_item_started::before,
body.book-viewer .acs_toolbar button.track_item_completed::before {
    content: '' !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
    vertical-align: -3px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
}

/* ---- Per-button glyph ---- */
body.book-viewer .acs_toolbar button.cmd_home::before {
    -webkit-mask-image: var(--icon-home) !important;
            mask-image: var(--icon-home) !important;
}
body.book-viewer .acs_toolbar button.cmd_web_view::before {
    -webkit-mask-image: var(--icon-list) !important;
            mask-image: var(--icon-list) !important;
}
body.book-viewer .acs_toolbar button.cmd_page_view::before {
    -webkit-mask-image: var(--icon-book-open) !important;
            mask-image: var(--icon-book-open) !important;
}
body.book-viewer .acs_toolbar button.cmd_supporting_doc::before {
    -webkit-mask-image: var(--icon-file-text) !important;
            mask-image: var(--icon-file-text) !important;
}
body.book-viewer .acs_toolbar button.cmd_email_page::before {
    -webkit-mask-image: var(--icon-mail) !important;
            mask-image: var(--icon-mail) !important;
}
body.book-viewer .acs_toolbar button.cmd_copy::before {
    -webkit-mask-image: var(--icon-copy) !important;
            mask-image: var(--icon-copy) !important;
}
body.book-viewer .acs_toolbar button.cmd_print::before {
    -webkit-mask-image: var(--icon-printer) !important;
            mask-image: var(--icon-printer) !important;
}
body.book-viewer .acs_toolbar button.cmd_export_to_pdf::before {
    -webkit-mask-image: var(--icon-file-pdf) !important;
            mask-image: var(--icon-file-pdf) !important;
}
body.book-viewer .acs_toolbar button.cmd_export_to_idf::before {
    -webkit-mask-image: var(--icon-export) !important;
            mask-image: var(--icon-export) !important;
}
body.book-viewer .acs_toolbar button.cmd_bookmark_page::before {
    -webkit-mask-image: var(--icon-bookmark) !important;
            mask-image: var(--icon-bookmark) !important;
}
body.book-viewer .acs_toolbar button.cmd_note::before {
    -webkit-mask-image: var(--icon-sticky-note) !important;
            mask-image: var(--icon-sticky-note) !important;
}
body.book-viewer .acs_toolbar button.cmd_info::before {
    -webkit-mask-image: var(--icon-info) !important;
            mask-image: var(--icon-info) !important;
}
body.book-viewer .acs_toolbar button.cmd_task::before {
    -webkit-mask-image: var(--icon-check) !important;
            mask-image: var(--icon-check) !important;
}
body.book-viewer .acs_toolbar button.cmd_expand::before {
    -webkit-mask-image: var(--icon-chevron-down) !important;
            mask-image: var(--icon-chevron-down) !important;
}
body.book-viewer .acs_toolbar button.cmd_collapse::before {
    -webkit-mask-image: var(--icon-chevron-up) !important;
            mask-image: var(--icon-chevron-up) !important;
}
body.book-viewer .acs_toolbar button.cmd_next_item::before {
    -webkit-mask-image: var(--icon-chevron-right) !important;
            mask-image: var(--icon-chevron-right) !important;
}
body.book-viewer .acs_toolbar button.cmd_prev_item::before {
    -webkit-mask-image: var(--icon-chevron-left) !important;
            mask-image: var(--icon-chevron-left) !important;
}
body.book-viewer .acs_toolbar button.cmd_sync::before {
    -webkit-mask-image: var(--icon-folder-sync) !important;
            mask-image: var(--icon-folder-sync) !important;
}
body.book-viewer .acs_toolbar button.zoom_in::before {
    -webkit-mask-image: var(--icon-font-size-plus) !important;
            mask-image: var(--icon-font-size-plus) !important;
}
body.book-viewer .acs_toolbar button.zoom_out::before {
    -webkit-mask-image: var(--icon-font-size-minus) !important;
            mask-image: var(--icon-font-size-minus) !important;
}
body.book-viewer .acs_toolbar button.show_hide_links::before {
    -webkit-mask-image: var(--icon-eye) !important;
            mask-image: var(--icon-eye) !important;
}
body.book-viewer .acs_toolbar button.show_in_folder::before {
    -webkit-mask-image: var(--icon-folder-open) !important;
            mask-image: var(--icon-folder-open) !important;
}
body.book-viewer .acs_toolbar button.track_item_started::before,
body.book-viewer .acs_toolbar button.track_item_completed::before {
    -webkit-mask-image: var(--icon-clock) !important;
            mask-image: var(--icon-clock) !important;
}

/* ---- Hover: glyph flips to brand cyan (text colour rule below).
   Selectors enumerate each iconCls explicitly (rather than `[class*="cmd_"]`)
   so the per-button hover-spec ties or beats the per-button base-spec — using
   an attribute selector here was matching but Chrome's cascade did not paint
   it as expected. Mirrors notes-page §11 explicit enumeration pattern. */
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_home::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_web_view::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_page_view::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_supporting_doc::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_email_page::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_copy::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_print::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_export_to_pdf::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_export_to_idf::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_bookmark_page::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_note::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_info::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_task::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_expand::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_collapse::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_next_item::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_prev_item::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.cmd_sync::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.zoom_in::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.zoom_out::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.show_hide_links::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.show_in_folder::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.track_item_started::before,
body.book-viewer .acs_toolbar .x-btn.x-btn-over button.track_item_completed::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* ---- Disabled: glyph softens to text-tertiary ---- */
body.book-viewer .acs_toolbar .x-item-disabled button[class*="cmd_"]::before,
body.book-viewer .acs_toolbar .x-item-disabled button.zoom_in::before,
body.book-viewer .acs_toolbar .x-item-disabled button.zoom_out::before,
body.book-viewer .acs_toolbar .x-item-disabled button.show_hide_links::before,
body.book-viewer .acs_toolbar .x-item-disabled button.show_in_folder::before {
    background-color: var(--acs-text-tertiary, #8c95a0) !important;
}

/* ---- Header → content divider + 44px toolbar chrome (mirrors notes-page §11).
   The tab panel used to sit directly on the toolbar's bottom edge, so any
   border-bottom on the bar was invisible. The bar is 44px below, taller than
   the shell reserves by default, and the shell is told so in JS through
   `toolbar_height` in ext-acs-book2c.js rather than by a height pinned here:
   the shell adds the checkout banner to its own sum, and a stylesheet cannot
   see the banner, so a hard-coded total here is 20px short inside a checkout
   session and the content surfaces cover the bottom of the bar. With the
   reservation right, `.acs_toolbar` carries its own border-bottom, fully
   visible above the tab strip. The toolbar's legacy `top: -4px` lift is
   neutralised so the white wash fills the bottom of the header with no dark
   wrap background leaking through. */

/* The embedded preview (chat-bot / AffiniAI east pane) hides the header
   entirely (viewer.css `.embedded-viewer`), but the shell still reserves
   header and toolbar space for it, which would leave a blank band above the
   document. Reclaim it. */
body.book-viewer.embedded-viewer #ext-acs-book-tabpanel,
body.book-viewer.embedded-viewer #content_panel,
body.book-viewer.embedded-viewer #ext-acs-book-tabpanel-xsplit {
    top: 0 !important;
    height: 100vh !important;
}

body.book-viewer .acs_toolbar {
    height: 44px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
    background-color: #fff !important;
    background-image: none !important;
    padding: 0 4px !important;
    border: none !important;
    border-bottom: 1px solid var(--acs-border, #e2e6ec) !important;
    display: flex !important;
    align-items: center !important;
    top: 0 !important;
}

/* Stretch inner toolbar table to fill the 40px so cells centre vertically */
body.book-viewer .acs_toolbar table.x-toolbar-ct,
body.book-viewer .acs_toolbar table.x-toolbar-ct > tbody > tr {
    height: 40px !important;
}
body.book-viewer .acs_toolbar .x-toolbar-left-row > td,
body.book-viewer .acs_toolbar .x-toolbar-right-row > td {
    vertical-align: middle !important;
}
body.book-viewer .acs_toolbar td.x-toolbar-cell > table.x-btn {
    height: 100% !important;
}
body.book-viewer .acs_toolbar td.x-toolbar-cell > table.x-btn td.x-btn-mc {
    vertical-align: middle !important;
}
body.book-viewer .acs_toolbar .x-btn td.x-btn-mc em {
    vertical-align: middle !important;
    display: flex !important;
    align-items: center !important;
    height: auto !important;
}
body.book-viewer .acs_toolbar .x-btn td.x-btn-mc em button.x-btn-text {
    vertical-align: middle !important;
    height: auto !important;
    line-height: 1.4 !important;
}

/* ---- Strip legacy 3D button chrome ---- */
body.book-viewer .acs_toolbar .x-btn .x-btn-tl,
body.book-viewer .acs_toolbar .x-btn .x-btn-tc,
body.book-viewer .acs_toolbar .x-btn .x-btn-tr,
body.book-viewer .acs_toolbar .x-btn .x-btn-bl,
body.book-viewer .acs_toolbar .x-btn .x-btn-bc,
body.book-viewer .acs_toolbar .x-btn .x-btn-br,
body.book-viewer .acs_toolbar .x-btn .x-btn-ml,
body.book-viewer .acs_toolbar .x-btn .x-btn-mr {
    display: none !important;
}
body.book-viewer .acs_toolbar .x-btn .x-btn-mc {
    background-image: none !important;
    padding: 0 !important;
}
body.book-viewer .acs_toolbar .x-btn {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 4px !important;
    transition: background-color 0.15s !important;
}
body.book-viewer .acs_toolbar .x-btn button.x-btn-text {
    background-image: none !important;
    color: var(--acs-text-secondary, #5a6370) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 6px 10px !important;
    line-height: 1.4 !important;
}

/* Icon-only buttons (the home/cmd_home button is x-btn-icon with no visible
   text label). The ExtJS-sized cell is only 22px wide — the default 6px/10px
   text padding overflows the cell so the hover wash gets cropped at the
   right edge. Use square 6px padding for icon-only buttons and let the cell
   widen via `width: auto` on the button table. */
body.book-viewer .acs_toolbar .x-btn.x-btn-icon button.x-btn-text {
    padding: 6px 6px !important;
}
body.book-viewer .acs_toolbar td.x-toolbar-cell:has(.x-btn-icon),
body.book-viewer .acs_toolbar .x-btn.x-btn-icon {
    width: auto !important;
    min-width: 28px !important;
}

/* Hover + pressed / menu-active chrome (wash + text) moved to
   ext-acs-theme.css "Toolbar-button chrome — shell-wide" block. */

/* Toolbar separator + bottom stripe — match notes-page treatment */
body.book-viewer .acs_toolbar .xtb-sep {
    border-left-color: var(--acs-border-light, #ecf0f6) !important;
}
body.book-viewer .acs_toolbar::after {
    display: none !important;
}
body.book-viewer .acs_toolbar td,
body.book-viewer .acs_toolbar span,
body.book-viewer .acs_toolbar label,
body.book-viewer .acs_toolbar .xtb-text {
    color: var(--acs-text-secondary, #5a6370) !important;
}

/* Menu-button caret + Layout-button sliders moved to ext-acs-theme.css
   "Menu-button chrome — shell-wide" block. */


/* ============================================================================
   Book viewer — left sidebar tabs (Contents / Search / Notes / Tasks / Tracks)
   ============================================================================
   Five non-AffiniAI tabs share a common shell: a thin tbar with four
   commands (Expand / Collapse / Next / Prev) over a tree (toc/notes/
   tasks/tracks) or a search form + grid. Four of those five tabs are
   tree-based; this block themes them. AffiniAI is excluded — it has its
   own theming layer in ext-acs-affiniai.css.
   ============================================================================ */

/* ---- Per-tab inner tbar — clear legacy PNGs on the four cmd_* buttons ---- */
body.book-viewer #toc .x-panel-tbar button.cmd_expand,
body.book-viewer #toc .x-panel-tbar button.cmd_collapse,
body.book-viewer #toc .x-panel-tbar button.cmd_next_item,
body.book-viewer #toc .x-panel-tbar button.cmd_prev_item,
body.book-viewer #notes .x-panel-tbar button.cmd_expand,
body.book-viewer #notes .x-panel-tbar button.cmd_collapse,
body.book-viewer #notes .x-panel-tbar button.cmd_next_item,
body.book-viewer #notes .x-panel-tbar button.cmd_prev_item,
body.book-viewer #tasks .x-panel-tbar button.cmd_expand,
body.book-viewer #tasks .x-panel-tbar button.cmd_collapse,
body.book-viewer #tasks .x-panel-tbar button.cmd_next_item,
body.book-viewer #tasks .x-panel-tbar button.cmd_prev_item,
body.book-viewer #tracks .x-panel-tbar button.cmd_expand,
body.book-viewer #tracks .x-panel-tbar button.cmd_collapse,
body.book-viewer #tracks .x-panel-tbar button.cmd_next_item,
body.book-viewer #tracks .x-panel-tbar button.cmd_prev_item {
    background-image: none !important;
    background-color: transparent !important;
}

/* ---- Per-tab tbar — SVG icon via ::before on each iconCls button ---- */
/* Icon glyph — brand cyan at 0.85 opacity rest, 1.0 hover. Matches the
   startpage `.tree-col` tree-toolbar buttons (ext-acs-startpage.css
   lines 7400–7423). */
body.book-viewer #toc .x-panel-tbar button.cmd_expand::before,
body.book-viewer #toc .x-panel-tbar button.cmd_collapse::before,
body.book-viewer #toc .x-panel-tbar button.cmd_next_item::before,
body.book-viewer #toc .x-panel-tbar button.cmd_prev_item::before,
body.book-viewer #notes .x-panel-tbar button.cmd_expand::before,
body.book-viewer #notes .x-panel-tbar button.cmd_collapse::before,
body.book-viewer #notes .x-panel-tbar button.cmd_next_item::before,
body.book-viewer #notes .x-panel-tbar button.cmd_prev_item::before,
body.book-viewer #tasks .x-panel-tbar button.cmd_expand::before,
body.book-viewer #tasks .x-panel-tbar button.cmd_collapse::before,
body.book-viewer #tasks .x-panel-tbar button.cmd_next_item::before,
body.book-viewer #tasks .x-panel-tbar button.cmd_prev_item::before,
body.book-viewer #tracks .x-panel-tbar button.cmd_expand::before,
body.book-viewer #tracks .x-panel-tbar button.cmd_collapse::before,
body.book-viewer #tracks .x-panel-tbar button.cmd_next_item::before,
body.book-viewer #tracks .x-panel-tbar button.cmd_prev_item::before {
    content: '' !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    vertical-align: middle !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    opacity: 0.85 !important;
    transition: opacity 0.15s !important;
}
body.book-viewer #toc .x-panel-tbar button.cmd_expand::before,
body.book-viewer #notes .x-panel-tbar button.cmd_expand::before,
body.book-viewer #tasks .x-panel-tbar button.cmd_expand::before,
body.book-viewer #tracks .x-panel-tbar button.cmd_expand::before {
    -webkit-mask-image: var(--icon-chevron-down) !important;
            mask-image: var(--icon-chevron-down) !important;
}
body.book-viewer #toc .x-panel-tbar button.cmd_collapse::before,
body.book-viewer #notes .x-panel-tbar button.cmd_collapse::before,
body.book-viewer #tasks .x-panel-tbar button.cmd_collapse::before,
body.book-viewer #tracks .x-panel-tbar button.cmd_collapse::before {
    -webkit-mask-image: var(--icon-chevron-up) !important;
            mask-image: var(--icon-chevron-up) !important;
}
body.book-viewer #toc .x-panel-tbar button.cmd_next_item::before,
body.book-viewer #notes .x-panel-tbar button.cmd_next_item::before,
body.book-viewer #tasks .x-panel-tbar button.cmd_next_item::before,
body.book-viewer #tracks .x-panel-tbar button.cmd_next_item::before {
    -webkit-mask-image: var(--icon-arrow-down) !important;
            mask-image: var(--icon-arrow-down) !important;
}
body.book-viewer #toc .x-panel-tbar button.cmd_prev_item::before,
body.book-viewer #notes .x-panel-tbar button.cmd_prev_item::before,
body.book-viewer #tasks .x-panel-tbar button.cmd_prev_item::before,
body.book-viewer #tracks .x-panel-tbar button.cmd_prev_item::before {
    -webkit-mask-image: var(--icon-arrow-up) !important;
            mask-image: var(--icon-arrow-up) !important;
}

/* Hover — boost opacity to 1.0 (color stays cyan from default rule). */
body.book-viewer #toc .x-panel-tbar .x-btn.x-btn-over button[class*="cmd_"]::before,
body.book-viewer #notes .x-panel-tbar .x-btn.x-btn-over button[class*="cmd_"]::before,
body.book-viewer #tasks .x-panel-tbar .x-btn.x-btn-over button[class*="cmd_"]::before,
body.book-viewer #tracks .x-panel-tbar .x-btn.x-btn-over button[class*="cmd_"]::before {
    opacity: 1 !important;
}

/* ---- Per-tab tbar chrome — flat white bar with theme border-bottom ---- */
/* Mirror the startpage `.tree-col` toolbar styling (ext-acs-startpage.css
   lines 7573–7608): transparent-on-surface bar, 8px horizontal padding,
   button hit-targets get a 28×28 cyan-tinted pill on hover. Goal is that
   the four sidebar tabs feel like the same UI family as the startpage
   Browse Library tree.

   Border-bottom lives on the OUTER `.x-panel-tbar` (not the inner
   `.x-toolbar`) so it isn't clipped by the parent's height clamp below
   (the clamp was added to fix legacy `border-width: 1px 1px medium`
   inflation but ends up hiding the inner toolbar's bottom border). */
body.book-viewer #toc .x-panel-tbar .x-toolbar,
body.book-viewer #notes .x-panel-tbar .x-toolbar,
body.book-viewer #tasks .x-panel-tbar .x-toolbar,
body.book-viewer #tracks .x-panel-tbar .x-toolbar {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    padding: 4px 8px !important;
    height: auto !important;
    min-height: 0 !important;
}
/* azzurra's 5px teal stripe below the inner tbar */
body.book-viewer #toc .x-panel-tbar .x-toolbar::after,
body.book-viewer #notes .x-panel-tbar .x-toolbar::after,
body.book-viewer #tasks .x-panel-tbar .x-toolbar::after,
body.book-viewer #tracks .x-panel-tbar .x-toolbar::after {
    display: none !important;
}

/* Strip legacy 3D button chrome inside the per-tab tbar */
body.book-viewer #toc .x-panel-tbar .x-btn .x-btn-tl,
body.book-viewer #toc .x-panel-tbar .x-btn .x-btn-tc,
body.book-viewer #toc .x-panel-tbar .x-btn .x-btn-tr,
body.book-viewer #toc .x-panel-tbar .x-btn .x-btn-bl,
body.book-viewer #toc .x-panel-tbar .x-btn .x-btn-bc,
body.book-viewer #toc .x-panel-tbar .x-btn .x-btn-br,
body.book-viewer #toc .x-panel-tbar .x-btn .x-btn-ml,
body.book-viewer #toc .x-panel-tbar .x-btn .x-btn-mr,
body.book-viewer #notes .x-panel-tbar .x-btn .x-btn-tl,
body.book-viewer #notes .x-panel-tbar .x-btn .x-btn-tc,
body.book-viewer #notes .x-panel-tbar .x-btn .x-btn-tr,
body.book-viewer #notes .x-panel-tbar .x-btn .x-btn-bl,
body.book-viewer #notes .x-panel-tbar .x-btn .x-btn-bc,
body.book-viewer #notes .x-panel-tbar .x-btn .x-btn-br,
body.book-viewer #notes .x-panel-tbar .x-btn .x-btn-ml,
body.book-viewer #notes .x-panel-tbar .x-btn .x-btn-mr,
body.book-viewer #tasks .x-panel-tbar .x-btn .x-btn-tl,
body.book-viewer #tasks .x-panel-tbar .x-btn .x-btn-tc,
body.book-viewer #tasks .x-panel-tbar .x-btn .x-btn-tr,
body.book-viewer #tasks .x-panel-tbar .x-btn .x-btn-bl,
body.book-viewer #tasks .x-panel-tbar .x-btn .x-btn-bc,
body.book-viewer #tasks .x-panel-tbar .x-btn .x-btn-br,
body.book-viewer #tasks .x-panel-tbar .x-btn .x-btn-ml,
body.book-viewer #tasks .x-panel-tbar .x-btn .x-btn-mr,
body.book-viewer #tracks .x-panel-tbar .x-btn .x-btn-tl,
body.book-viewer #tracks .x-panel-tbar .x-btn .x-btn-tc,
body.book-viewer #tracks .x-panel-tbar .x-btn .x-btn-tr,
body.book-viewer #tracks .x-panel-tbar .x-btn .x-btn-bl,
body.book-viewer #tracks .x-panel-tbar .x-btn .x-btn-bc,
body.book-viewer #tracks .x-panel-tbar .x-btn .x-btn-br,
body.book-viewer #tracks .x-panel-tbar .x-btn .x-btn-ml,
body.book-viewer #tracks .x-panel-tbar .x-btn .x-btn-mr {
    display: none !important;
}
body.book-viewer #toc .x-panel-tbar .x-btn .x-btn-mc,
body.book-viewer #notes .x-panel-tbar .x-btn .x-btn-mc,
body.book-viewer #tasks .x-panel-tbar .x-btn .x-btn-mc,
body.book-viewer #tracks .x-panel-tbar .x-btn .x-btn-mc {
    background-image: none !important;
    padding: 0 !important;
}
/* Button hit-target — 28×28 with 6px rounding, transparent border. Matches
   startpage .tree-col .x-toolbar .x-btn at line 7591. */
body.book-viewer #toc .x-panel-tbar .x-btn,
body.book-viewer #notes .x-panel-tbar .x-btn,
body.book-viewer #tasks .x-panel-tbar .x-btn,
body.book-viewer #tracks .x-panel-tbar .x-btn {
    min-width: 28px !important;
    min-height: 28px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    margin: 0 1px !important;
    background: transparent !important;
    background-image: none !important;
    transition: background-color 0.12s !important;
}
/* Hover wash — cyan-tint at 0.08 alpha (matches startpage line 7604).
   Stack `.x-toolbar` four times to beat azzurra-legacy's same-specificity
   `.x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn.x-btn-over` reset. */
body.book-viewer #toc .x-panel-tbar .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn:hover,
body.book-viewer #toc .x-panel-tbar .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn.x-btn-over,
body.book-viewer #notes .x-panel-tbar .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn:hover,
body.book-viewer #notes .x-panel-tbar .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn.x-btn-over,
body.book-viewer #tasks .x-panel-tbar .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn:hover,
body.book-viewer #tasks .x-panel-tbar .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn.x-btn-over,
body.book-viewer #tracks .x-panel-tbar .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn:hover,
body.book-viewer #tracks .x-panel-tbar .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn.x-btn-over {
    background: rgba(0, 174, 239, 0.08) !important;
    background-color: rgba(0, 174, 239, 0.08) !important;
    border-color: transparent !important;
}

/* ---- Per-tab tbar outer container ----
   Let the outer .x-panel-tbar hug the inner .x-toolbar's natural height
   (no `height: 33px` clamp — that was inflating empty space and clipping
   the inner toolbar's bottom border). The legacy
   `.x-panel-tbar-noheader .x-toolbar { border-width: 1px 1px medium }`
   inflation is neutralised by the explicit `border: none` rule on the
   inner toolbar below.

   Border-bottom matches the tab-strip-wrap line (--acs-border-light) so
   the two stacked separators read as a single theme rhythm. */
body.book-viewer #toc .x-panel-tbar,
body.book-viewer #notes .x-panel-tbar,
body.book-viewer #tasks .x-panel-tbar,
body.book-viewer #tracks .x-panel-tbar {
    height: auto !important;
    overflow: visible !important;
    border-bottom: 1px solid var(--acs-border-light, #ecf0f6) !important;
    box-sizing: border-box !important;
}

/* Inner toolbar must respect the parent's width — ExtJS sets an inline
   `width: 424px` (panel 440 - 16) but with `content-box` + `padding 4px 8px`
   the actual rendered width becomes 424+16=440px, exactly matching the
   parent. To be safe (and to handle dynamic panel widths) force the inner
   toolbar to fill 100% of the parent with border-box, so it never
   overflows regardless of ExtJS's inline width. */
body.book-viewer #toc .x-panel-tbar .x-toolbar,
body.book-viewer #notes .x-panel-tbar .x-toolbar,
body.book-viewer #tasks .x-panel-tbar .x-toolbar,
body.book-viewer #tracks .x-panel-tbar .x-toolbar {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ============================================================================
   Tree (TOC / Notes / Tasks / Tracks)
   ============================================================================
   ext-acs-startpage.css :: bookshelf TOC + Contents View tree was the model;
   re-declare those rules here scoped to body.book-viewer so they apply on
   the book viewer page where startpage.css is not loaded.
   ============================================================================ */

/* Chevron (expand/collapse elbow) — content-swap on <img> (replaced element)
   so the legacy blank_image_url.gif src is hidden and the SVG paints. */
body.book-viewer .x-tree img.x-tree-ec-icon.x-tree-elbow-plus,
body.book-viewer .x-tree img.x-tree-ec-icon.x-tree-elbow-end-plus {
    content: var(--icon-chevron-right) !important;
    width: 12px !important;
    height: 12px !important;
    background-image: none !important;
    color: var(--acs-text-secondary, #5a6370) !important;
    vertical-align: middle !important;
    margin: 0 2px !important;
    cursor: pointer !important;
    transition: color 0.15s !important;
}
body.book-viewer .x-tree img.x-tree-ec-icon.x-tree-elbow-minus,
body.book-viewer .x-tree img.x-tree-ec-icon.x-tree-elbow-end-minus {
    content: var(--icon-chevron-down) !important;
    width: 12px !important;
    height: 12px !important;
    background-image: none !important;
    color: var(--acs-text-secondary, #5a6370) !important;
    vertical-align: middle !important;
    margin: 0 2px !important;
    cursor: pointer !important;
    transition: color 0.15s !important;
}
body.book-viewer .x-tree img.x-tree-ec-icon.x-tree-elbow,
body.book-viewer .x-tree img.x-tree-ec-icon.x-tree-elbow-end {
    background-image: none !important;
    visibility: hidden !important;
}
body.book-viewer .x-tree .x-tree-node-el:hover > .x-tree-ec-icon {
    color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Folder/section/root + page node glyphs are hidden in the viewer trees
   (Contents/Notes/Tasks/Tracks). The tree structure reads from the
   expand/collapse chevrons + indentation alone; the folder and page icons
   added visual noise without aiding navigation. Leaf-item glyphs
   (note/task/track markers below) are kept — they carry status meaning.
   Chevrons (.x-tree-ec-icon) are untouched. */
body.book-viewer .x-tree img.x-tree-node-icon.toc_section,
body.book-viewer .x-tree img.x-tree-node-icon.toc_root,
body.book-viewer .x-tree img.x-tree-node-icon.toc_folder,
body.book-viewer .x-tree img.x-tree-node-icon.toc_page {
    display: none !important;
}
/* Generic .x-tree-icon spacer — kill the sprite */
body.book-viewer .x-tree img.x-tree-icon {
    background-image: none !important;
    visibility: hidden !important;
}

/* Inline node icons — img.x-tree-node-inline-icon carries a real `src` set
   from each node's data (e.g. application_form_add.png in the tasks tree,
   libraryswitcher.png + track_item in the tracks tree). Use content-swap
   so the rendered image is replaced by an SVG from the theme library and
   the legacy PNG never paints.

   Mapping:
     .x-tree-node-inline-icon (default, used in tasks tree) → clipboard-list
     .track_item (inside trees, used in tracks tree)        → circle-dot
     .task_info (if it ever appears in tree nodes)          → clipboard-list

   `content` swaps the replaced-element image directly — no mask-image
   needed. `color` is irrelevant since the SVG carries its own stroke. */
/* Inline tree-node leaves — paint in brand cyan with 0.7/1.0 opacity
   pattern matching startpage Browse Library trees (see
   ext-acs-startpage.css :: .tree-col .x-tree-node-leaf img.x-tree-node-icon).
   `currentColor` from the SVG stroke is driven by the `color` property;
   set `opacity` (not color value) so hover/selected can boost to 1.0. */
body.book-viewer .x-tree img.x-tree-node-icon.x-tree-node-inline-icon {
    /* mask-image (not content-swap) so the background-color reliably tints
       the SVG. `content: url(...)` swaps the rendered image, but the foreign
       SVG's `currentColor` doesn't always resolve to the host CSS `color`
       in WebKit, leaving the icon dark instead of cyan. */
    -webkit-mask-image: var(--icon-clipboard-list) !important;
            mask-image: var(--icon-clipboard-list) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    width: 16px !important;
    height: 16px !important;
    background-image: none !important;
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    vertical-align: middle !important;
    margin-right: 4px !important;
    transition: background-color 0.15s !important;
}
body.book-viewer .x-tree img.x-tree-node-icon.track_item {
    /* --icon-shelf-book matches startpage tracks-tree leaves
       (ext-acs-startpage.css:8138). Use mask-image (not content-swap) so
       background-color drives the cyan tint reliably. */
    -webkit-mask-image: var(--icon-shelf-book) !important;
            mask-image: var(--icon-shelf-book) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    width: 16px !important;
    height: 16px !important;
    background-image: none !important;
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    vertical-align: middle !important;
    margin-right: 4px !important;
    transition: background-color 0.15s !important;
}
body.book-viewer .x-tree img.x-tree-node-icon.task_info {
    -webkit-mask-image: var(--icon-clipboard-list) !important;
            mask-image: var(--icon-clipboard-list) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    width: 16px !important;
    height: 16px !important;
    background-image: none !important;
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    vertical-align: middle !important;
    margin-right: 4px !important;
    transition: background-color 0.15s !important;
}

/* Hover/selected — leaves stay solid cyan (no opacity change). */

/* Force theme font stack on the tree subtree — the legacy
   `body .x-panel-body { font-family: "Segoe UI", tahoma, ... }` rule
   cascades through every panel body, so `inherit` on the anchor inherits
   the LEGACY stack rather than the body's theme stack. Re-declare the
   theme stack explicitly on .x-tree so all descendants pick it up. */
body.book-viewer .x-tree,
body.book-viewer .x-tree .x-tree-node-anchor,
body.book-viewer .x-tree .x-tree-node-anchor span {
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Anchor (the clickable text + its hit area) — match startpage tree pattern:
   no horizontal padding so the only icon→text gap is the icon's margin-right
   (4px). Vertical padding stays for hit-area / row breathing room. */
body.book-viewer .x-tree .x-tree-node-anchor {
    color: var(--acs-text-primary, #1c2127) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    padding: 4px 0 !important;
    border-radius: 4px !important;
    transition: background-color 0.15s, color 0.15s !important;
}
body.book-viewer .x-tree .x-tree-node-anchor span {
    color: inherit !important;
    font-size: inherit !important;
}

/* Hover / selected node washes */
body.book-viewer .x-tree .x-tree-node-over,
body.book-viewer .x-tree .x-tree-node-el:hover {
    background-color: var(--acs-hover-bg, #f6f8fb) !important;
}
/* Hover — folder icons stay grey (only leaves are cyan); leaf icons keep
   their cyan tint. No icon-color change on hover keeps the hierarchy stable. */
body.book-viewer .x-tree .x-tree-selected {
    background-color: #EEF6FB !important;
}
body.book-viewer .x-tree .x-tree-selected .x-tree-node-anchor {
    color: var(--acs-brand-cyan-muted, #0e8bb0) !important;
    font-weight: 500 !important;
}
/* Selected — folder icons stay grey; leaf icons stay cyan. No icon-color
   change on selection (text color is what reflects selection). */


/* ============================================================================
   Documents window — Linked Documents tab + footer
   ============================================================================
   The Documents dialog (Ext.Window with `cls: 'documents-window'`, set in
   ext-acs-book2c.js) hosts a tab control with a grid of linked documents.
   This block themes:
     - The "Clear Filters" toolbar button (attach_clear_filters iconCls)
     - The grid's checkbox column (header + row) — currently a 19px column
       with the legacy row-check-sprite1.gif background; widen + replace
       with the canonical theme checkbox.
     - The header dropdown menu's Filter icon and Columns submenu items.
       Mirrors ext-acs-taskreport.css :: §"Grid column header dropdown menu",
       re-declared here because that rule is body.tasks-page-scoped.
       (Architectural debt: the menu rules should live in a shell-wide
       layer; tracked separately.)
   The "Create Archives" primary-button styling is handled by the global
   .dialog-ok-btn rule in ext-acs-theme.css — we add `cls: 'dialog-ok-btn'`
   to the Ext.Button in ext-acs-orginal-docs.js. No CSS needed here for it.
   ============================================================================ */

/* ---- Clear Filters button — filter-x SVG ::before ----
   Mirrors the bookshelf clear-filters pattern at ext-acs-startpage.css:3680.
   Hover wash + text colour must beat azzurra's primary-action hover paint
   (`.acs-new-theme .x-btn.x-btn-over:not(.reset-btn)` → cyan-deep + white).
   The Clear Filters button is a regular toolbar action, NOT a primary
   action — so we restore the flat `#F6F8FB` toolbar-hover wash + cyan text. */
.documents-window button.attach_clear_filters {
    background-image: none !important;
    padding-left: 24px !important;
    position: relative !important;
}
.documents-window button.attach_clear_filters::before {
    content: '' !important;
    position: absolute !important;
    left: 4px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 16px !important;
    height: 16px !important;
    -webkit-mask-image: var(--icon-filter-x) !important;
            mask-image: var(--icon-filter-x) !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
}

/* Idle wrap — strip the legacy 3D button chrome so the hover wash paints
   cleanly on .x-btn-mc rather than the table wrap. */
.documents-window .x-btn.x-btn-text-icon:has(.attach_clear_filters) {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
}
.documents-window .x-btn.x-btn-text-icon:has(.attach_clear_filters) .x-btn-tl,
.documents-window .x-btn.x-btn-text-icon:has(.attach_clear_filters) .x-btn-tc,
.documents-window .x-btn.x-btn-text-icon:has(.attach_clear_filters) .x-btn-tr,
.documents-window .x-btn.x-btn-text-icon:has(.attach_clear_filters) .x-btn-bl,
.documents-window .x-btn.x-btn-text-icon:has(.attach_clear_filters) .x-btn-bc,
.documents-window .x-btn.x-btn-text-icon:has(.attach_clear_filters) .x-btn-br,
.documents-window .x-btn.x-btn-text-icon:has(.attach_clear_filters) .x-btn-ml,
.documents-window .x-btn.x-btn-text-icon:has(.attach_clear_filters) .x-btn-mr {
    display: none !important;
}

/* Hover — flat wash on .x-btn-mc (table-bg gotcha), cyan text + cyan icon.
   The chained `.documents-window.documents-window.documents-window` lifts
   specificity above azzurra's quad-class `.acs-new-theme .x-btn.x-btn-over:
   not(.reset-btn)` rule that otherwise paints the dark teal primary fill. */
.documents-window.documents-window .x-btn.x-btn-over:has(.attach_clear_filters) {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
.documents-window.documents-window .x-btn.x-btn-over:has(.attach_clear_filters) td.x-btn-mc {
    background: #F6F8FB !important;
    background-color: #F6F8FB !important;
    background-image: none !important;
    border-radius: 4px !important;
}
.documents-window.documents-window .x-btn.x-btn-over button.attach_clear_filters {
    color: var(--acs-brand-cyan, #00aeef) !important;
    background: transparent !important;
}
.documents-window.documents-window .x-btn.x-btn-over button.attach_clear_filters::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Grid CheckboxSelectionModel row + header checker theming now lives
   shell-wide in ext-acs-theme.css ("Grid CheckboxSelectionModel — shell-
   wide row + header checker theming"). No per-dialog override needed. */

/* Grid column-header dropdown menu icon theming is promoted shell-wide in
   ext-acs-theme.css (end of file). Removed from here 2026-05-15. */


/* ============================================================================
   Export Dialog — Book/Chapter radios + Include-Project-Info checkbox + Run
   ============================================================================
   The Export Dialog (Ext.Window with `cls: 'export-to-excel-modal export-book-
   chapter'`, set in ext-acs-book2c.js:7490) had two visible issues:

   1. The "Run" button has `cls: 'dialog-ok-btn'` but the legacy azzurra rule
      `.acs-new-theme .export-to-excel-modal .x-panel-fbar .x-btn` paints
      `#f5f5f5 !important` at 4-class specificity and beats the shell-wide
      3-class `.x-window .x-panel-btns .dialog-ok-btn` rule. Re-declare the
      primary teal hover scoped to `.export-book-chapter` to win.

   2. The "Include project info" checkbox sits in a `.x-form-element` with
      inline `padding-left: 135px` (ExtJS form-layout label gutter, even
      though `x-hide-label` is set). The radios above live in a 2-column
      column-layout container without that gutter, so the checkbox visually
      drifts ~240px to the right of the radios. Zero the form-element
      inline padding inside this dialog so the checkbox lines up.
   ============================================================================ */

/* ---- Run button — primary teal, beats the legacy export-to-excel-modal rule ---- */
.x-window.export-book-chapter .x-panel-fbar .x-btn.dialog-ok-btn,
.x-window.export-book-chapter .x-panel-btns .x-btn.dialog-ok-btn,
.x-window.export-book-chapter .x-panel-footer .x-btn.dialog-ok-btn {
    background: var(--acs-brand-cyan-muted, #2098b6) !important;
    background-color: var(--acs-brand-cyan-muted, #2098b6) !important;
    background-image: none !important;
    border: 1px solid var(--acs-brand-cyan-muted, #2098b6) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}
.x-window.export-book-chapter .x-panel-fbar .x-btn.dialog-ok-btn button,
.x-window.export-book-chapter .x-panel-fbar .x-btn.dialog-ok-btn .x-btn-text,
.x-window.export-book-chapter .x-panel-btns .x-btn.dialog-ok-btn button,
.x-window.export-book-chapter .x-panel-btns .x-btn.dialog-ok-btn .x-btn-text,
.x-window.export-book-chapter .x-panel-footer .x-btn.dialog-ok-btn button,
.x-window.export-book-chapter .x-panel-footer .x-btn.dialog-ok-btn .x-btn-text {
    color: #fff !important;
    font-weight: 600 !important;
    background: transparent !important;
}
/* Hover — darker teal */
.x-window.export-book-chapter .x-panel-fbar .x-btn.dialog-ok-btn.x-btn-over,
.x-window.export-book-chapter .x-panel-btns .x-btn.dialog-ok-btn.x-btn-over,
.x-window.export-book-chapter .x-panel-footer .x-btn.dialog-ok-btn.x-btn-over {
    background: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    background-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    border-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
}

/* ---- Body padding + form-row alignment ----
   The dialog body (`.x-plain-body.x-plain-body-noheader`) renders with
   `padding: 0` and pulls the form rows flush to the edges. Add breathing
   room. The radios (radiogroup, hideLabel:true) and the checkbox
   (`Include project info`, hideLabel:true) both sit in `.x-form-item.x-
   hide-label` rows. ExtJS writes inline `padding-left:135px` on the
   `.x-form-element` and azzurra adds `padding-left:105px` on `.x-form-
   check-wrap` (label gutters that don't apply when hideLabel is set).
   Zero both and centre the row content. */
.x-window.export-book-chapter .x-plain-body {
    /* Top padding is small because `.x-window-mc` already contributes 16px
       above the body. Side + bottom padding give breathing room for the
       form rows. */
    padding: 8px 32px 16px !important;
    text-align: center !important;
}
/* Shrink the dialog — the form content is only ~145px wide and the footer
   buttons need ~200px, so 380px window gives ample breathing room while
   removing the wasted horizontal whitespace. ExtJS sets the inline `width`
   on the window element from the JS config; override here. */
.x-window.export-book-chapter {
    width: 380px !important;
}
.x-window.export-book-chapter .x-window-body,
.x-window.export-book-chapter .x-window-mc {
    width: auto !important;
}
.x-window.export-book-chapter .x-form-element {
    padding-left: 0 !important;
}
.x-window.export-book-chapter .x-form-check-wrap {
    padding-left: 0 !important;
    display: inline-block !important;
    width: auto !important;
}
.x-window.export-book-chapter .x-form-item {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 12px !important;
}
.x-window.export-book-chapter .x-form-item:last-child {
    margin-bottom: 0 !important;
}
.x-window.export-book-chapter .x-column-inner {
    margin: 0 auto !important;
}

/* ============================================================================
   Book viewer — annotation link colors (theme refresh)
   ============================================================================
   Ports the obligation-finder annotation-link palette to the book viewer.
   These override the legacy global rules in viewer.css (lines 1554–1610) which
   used raw CSS color keywords (red, green, brown). Scoped to body.book-viewer
   to avoid bleeding into other pages that load viewer.css.

   Colours come from the shared theme's content-link palette (--acs-link-*,
   emitted by acs-theme-properties.css, which ext-acs-theme.css imports), so
   the viewer, the obligation-finder's extraction-session content and AffiniAI
   answers all colour a clause or a document identically.

   Mapping (legacy keyword → palette token):
     unresolvedLink  red     → --acs-link-unresolved
     resolvedLink    green   → --acs-link-clause
     externalLink    brown   → --acs-link-document
     notprovidedLink brown   → --acs-link-document (same as external)
     .defn_source A  #006666 → --acs-link-definition

   :visited is kept equal to :link on purpose — preserving the annotation-type
   color signal after the user has clicked is more important than visited state.

   viewer.css mirrors these rules for the definition popup (body.defn-popup-page),
   which is its own document: change both together.
   ============================================================================ */

body.book-viewer a.unresolvedLink,
body.book-viewer a.unresolvedLink * {
    color: var(--acs-link-unresolved, #c62828);
}
body.book-viewer a.unresolvedLink:hover {
    text-decoration: underline;
}

body.book-viewer a.resolvedLink,
body.book-viewer a.resolvedLink * {
    color: var(--acs-link-clause, #2e7d32);
}
body.book-viewer a.resolvedLink:hover {
    text-decoration: underline;
}

body.book-viewer a.externalLink,
body.book-viewer a.externalLink * {
    color: var(--acs-link-document, #7a5c2e);
}
body.book-viewer a.externalLink:hover {
    text-decoration: underline;
}

body.book-viewer a.notprovidedLink,
body.book-viewer a.notprovidedLink * {
    color: var(--acs-link-document, #7a5c2e);
}
body.book-viewer a.notprovidedLink:hover {
    text-decoration: underline;
}

body.book-viewer .defn_source a,
body.book-viewer .defn_source a:link,
body.book-viewer .defn_source a:visited,
body.book-viewer .defn_source a:active,
body.book-viewer .defn_source a:hover {
    color: var(--acs-link-definition, #1565c0);
}

/* Definition links inside the book content itself. popup.css (loaded by the
   ExtJS widget bundle) colours `.popup` with the legacy indigo
   hsl(240,60%,50%) = #3333cc, which is a different blue from the one the
   obligation-finder's extraction-session content uses for the same
   definition links. Bring them onto the shared palette token so a definition
   reads identically in the viewer, in the extraction session and in an
   AffiniAI answer. Scoped to body.book-viewer so other ExtJS pages that load
   popup.css keep their current appearance. */
body.book-viewer a.popup,
body.book-viewer a.popup:link,
body.book-viewer a.popup:visited,
body.book-viewer a.popup:active {
    color: var(--acs-link-definition, #1565c0);
}
body.book-viewer a.popup:hover {
    color: var(--acs-link-definition-hover, #0d4a94);
    text-decoration: underline;
}

/* "Hide links" toolbar button: annotation links read as plain text, underlined on hover. */
body.book-viewer.links-hidden a.popup,
body.book-viewer.links-hidden a.popup:link,
body.book-viewer.links-hidden a.popup:visited,
body.book-viewer.links-hidden a.popup:active,
body.book-viewer.links-hidden a.popup:hover,
body.book-viewer.links-hidden a.unresolvedLink,
body.book-viewer.links-hidden a.unresolvedLink *,
body.book-viewer.links-hidden a.resolvedLink,
body.book-viewer.links-hidden a.resolvedLink *,
body.book-viewer.links-hidden a.externalLink,
body.book-viewer.links-hidden a.externalLink *,
body.book-viewer.links-hidden a.notprovidedLink,
body.book-viewer.links-hidden a.notprovidedLink * {
    color: inherit;
    text-decoration: none;
}
body.book-viewer.links-hidden a.popup:hover,
body.book-viewer.links-hidden a.unresolvedLink:hover,
body.book-viewer.links-hidden a.resolvedLink:hover,
body.book-viewer.links-hidden a.externalLink:hover,
body.book-viewer.links-hidden a.notprovidedLink:hover {
    text-decoration: underline;
}

/* ============================================================================
   Book viewer — Search tab (form fields + grid toolbar)
   ============================================================================
   The Search tab uses the same widget classes as the startpage search panel
   (.search-wrap, .x-form-twin-triggers, .srch_expand, .clear_grid_filters,
   .srch_resize_expand) but startpage.css is not loaded on the book viewer
   page. This block re-declares the relevant patterns scoped to
   body.book-viewer so the search tab matches the startpage search experience.

   Form field geometry follows the startpage compact-25px pattern (the panel
   is space-constrained at ~440px). Grid toolbar icons follow the Phase-6
   mask-image pattern used throughout ext-acs-startpage.css S4b.
   ============================================================================ */

/* ---- Search form — compact 25px geometry (mirrors .search_panel rules) ---- */
body.book-viewer #search .x-form-text {
    padding: 1px 6px !important;
    height: 25px !important;
    line-height: 23px !important;
    box-sizing: border-box !important;
}

/* Fix the x-form-field-wrap height to match compact input */
body.book-viewer #search .x-form-field-wrap {
    height: 25px !important;
    overflow: visible !important;
}

/* Triggers fill wrap height */
body.book-viewer #search .x-form-field-wrap .x-form-trigger,
body.book-viewer #search .x-form-field-wrap .x-form-arrow-trigger {
    height: 25px !important;
}

/* ---- Search field — twin triggers side-by-side ----
   .x-form-twin-triggers is display:block by default which stacks the two
   buttons vertically; switch to inline-flex so clear + search sit in a row.
   Each trigger is 20px wide so the pair is 40px. The input inline width
   must shrink from the ExtJS-computed 366px to leave room — override with
   flex so it fills the remaining space in the wrap. */
body.book-viewer #search .x-form-twin-triggers {
    display: inline-flex !important;
    flex-direction: row !important;
    height: 100% !important;
    width: auto !important;
}

body.book-viewer #search .x-form-twin-triggers .x-form-trigger {
    height: 100% !important;
    width: 20px !important;
    flex: 0 0 20px !important;
}

/* Make the search-wrap a flex container so the input shrinks to fill */
body.book-viewer #search .search-wrap {
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

body.book-viewer #search .search-wrap .x-form-text {
    flex: 1 1 0% !important;
    width: 0 !important;
    min-width: 0 !important;
}

/* ---- Modifier + Include combos — full-width flex ----
   ExtJS sets inline width:134px which crops the value text. Stretch to fill
   the available column width using flex, exactly as .search_panel does on
   the startpage for the same #search_modifier / #filter_type fields. */
body.book-viewer #search .x-form-field-wrap:has(#search_modifier),
body.book-viewer #search .x-form-field-wrap:has(#filter_type) {
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    height: 25px !important;
}

body.book-viewer #search .x-form-field-wrap:has(#search_modifier) .x-form-text,
body.book-viewer #search .x-form-field-wrap:has(#filter_type) .x-form-text {
    flex: 1 1 0% !important;
    width: 0 !important;
    min-width: 0 !important;
}

body.book-viewer #search .x-form-field-wrap:has(#search_modifier) .x-form-trigger,
body.book-viewer #search .x-form-field-wrap:has(#filter_type) .x-form-trigger {
    position: relative !important;
    flex: 0 0 auto !important;
}

/* ---- Search-tab grids — drop redundant right/bottom/left borders -------
   The search-results-grid and search-books-grid panel-body inherit a
   1px azzurra-legacy border on all four sides. Inside the Search tab the
   tab body + the tab-strip-wrap separator already provide containment,
   so the right/bottom/left borders read as redundant chrome (boxes
   inside boxes). Drop them; keep the top border because it visually
   separates the grid from the search-form area above. */
body.book-viewer.acs-new-theme #search .search-results-grid > .x-panel-bwrap > .x-panel-body,
body.book-viewer.acs-new-theme #search .search-books-grid > .x-panel-bwrap > .x-panel-body {
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
}

/* ---- Search panel — breathing room above first label --------------------
   The first item inside the FormPanel ("Type in the word(s) to search for:")
   sits only 5px below the tab strip's bottom border, which reads as cramped
   next to the rest of the right-rail rhythm. Push it down with margin-top
   on the first child of the form's panel-body. This grows the FormPanel by
   16px, which in turn pushes the ExtJS center-region (grid wrapper) down —
   but ExtJS does not shrink the grid wrapper's cached inline height, so the
   grid pagination toolbar would overflow the tab body by 8px. Pin the grid
   wrapper to `bottom: 8px` with `height: auto` so it fills the available
   space from its (recomputed) top to the parent's content edge, regardless
   of ExtJS's stale inline height. */
body.book-viewer.acs-new-theme #search .srch_small_font > .x-panel-bwrap > .x-panel-body > div:first-child {
    margin-top: 16px !important;
}
body.book-viewer.acs-new-theme #search > .x-panel-bwrap > .x-panel-body > .x-border-panel:not(.srch_small_font) {
    bottom: 8px !important;
    height: auto !important;
}

/* Grid footer toolbar (paging). The horizontal inset belongs on the inner
   `.x-toolbar`, never on the bbar: ExtJS hands both the same panel-body
   width and subtracts only each element's own border and padding, so an
   inset on the bbar pushes the toolbar past the `.x-panel-bwrap` that
   clips it and shears the status text. The bbar's own padding comes from
   the shell rule in ext-acs-theme.css; do not restate it here. */
body.book-viewer.acs-new-theme #search .search-results-grid > .x-panel-bwrap > .x-panel-bbar,
body.book-viewer.acs-new-theme #search .search-books-grid > .x-panel-bwrap > .x-panel-bbar {
    overflow: visible !important;
}
body.book-viewer.acs-new-theme #search .search-results-grid > .x-panel-bwrap > .x-panel-bbar .x-toolbar,
body.book-viewer.acs-new-theme #search .search-books-grid > .x-panel-bwrap > .x-panel-bbar .x-toolbar {
    overflow: visible !important;
    padding: 2px 6px !important;
}

/* Separator between the grid and its footer pagination (STYLING_PATTERNS
   25.6), as the audit and task-report grids carry it. The `:has` guard
   comes with the pattern; no code path hides these toolbars today. */
body.book-viewer.acs-new-theme #search .search-results-grid > .x-panel-bwrap > .x-panel-bbar:not(:has(> .x-toolbar.x-hide-display)),
body.book-viewer.acs-new-theme #search .search-books-grid > .x-panel-bwrap > .x-panel-bbar:not(:has(> .x-toolbar.x-hide-display)) {
    border-top: 1px solid var(--acs-border, #e2e6ec) !important;
}

/* ---- Search results grid toolbar — SVG icon migration ----
   Replace legacy PNG backgrounds (details.png, tb_clear_filter.png,
   expand.gif) with mask-image SVG icons, matching the Phase-6 pattern
   used in ext-acs-startpage.css S4b for the same button classes.

   3D chrome (x-btn-tl/tr/bl/br etc.) stripped; hover wash via brand cyan. */

/* Strip legacy 3D chrome from grid toolbar buttons */
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn .x-btn-tl,
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn .x-btn-tc,
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn .x-btn-tr,
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn .x-btn-bl,
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn .x-btn-bc,
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn .x-btn-br,
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn .x-btn-ml,
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn .x-btn-mr {
    display: none !important;
}
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn .x-btn-mc {
    background-image: none !important;
    padding: 0 !important;
}
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 4px !important;
    transition: background-color 0.15s !important;
}

/* Grid toolbar flat chrome */
body.book-viewer #search .search-results-grid .x-panel-tbar .x-toolbar {
    background: #fff !important;
    background-image: none !important;
    border: none !important;
    border-bottom: 1px solid var(--acs-border-light, #ecf0f6) !important;
    padding: 4px 6px !important;
    height: auto !important;
    min-height: 32px !important;
}

/* Grid toolbar buttons — give the click target a proper height so the hover
   wash paints a normal-sized pill, not a thin 16px strip. The button table
   is set to height auto and the inner em gets padding to match the standard
   toolbar button geometry used elsewhere. */
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn,
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn em {
    height: 24px !important;
    line-height: 24px !important;
    vertical-align: middle !important;
}
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn em {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 8px !important;
}
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn button {
    height: 24px !important;
    line-height: 24px !important;
    font-size: 13px !important;
    color: var(--acs-text-secondary, #5a6370) !important;
    transition: color 0.15s !important;
}
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn.x-btn-over button {
    color: var(--acs-brand-cyan, #00aeef) !important;
}
/* The srch_resize_expand button is icon-only (mask on the button itself);
   keep its 16×16 size but center inside a 24px-tall cell. */
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn em:has(> .srch_resize_expand),
body.book-viewer #search .search-results-grid .x-panel-tbar .x-btn em:has(> .srch_resize_collapse) {
    padding: 0 4px !important;
}

/* Hide/Preview button — icon-eye ::before (mirrors startpage .srch_expand) */
body.book-viewer #search .srch_expand .x-btn-text {
    background-image: none !important;
}
body.book-viewer #search .srch_expand .x-btn-text::before {
    content: '' !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
    vertical-align: -3px !important;
    -webkit-mask-image: var(--icon-eye) !important;
            mask-image: var(--icon-eye) !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
}
body.book-viewer #search .srch_expand.x-btn-over .x-btn-text::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Clear Filters button — icon-filter-x ::before */
body.book-viewer #search button.clear_grid_filters {
    background-image: none !important;
}
body.book-viewer #search button.clear_grid_filters::before {
    content: '' !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
    vertical-align: -3px !important;
    -webkit-mask-image: var(--icon-filter-x) !important;
            mask-image: var(--icon-filter-x) !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
}
body.book-viewer #search .x-btn-over button.clear_grid_filters::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Expand / collapse panel-width button — chevron icons (sidebar widen/narrow
   is more semantic than maximize/minimize for a left-docked search panel).
   JS swaps the iconCls between `srch_resize_expand` (default, panel narrow)
   and `srch_resize_collapse` (after click, panel wide). */
body.book-viewer #search button.srch_resize_expand,
body.book-viewer #search button.srch_resize_collapse {
    background-image: none !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    padding: 0 !important;
    width: 16px !important;
    height: 16px !important;
    transition: background-color 0.15s !important;
}
body.book-viewer #search button.srch_resize_expand {
    -webkit-mask-image: var(--icon-chevrons-right) !important;
            mask-image: var(--icon-chevrons-right) !important;
}
body.book-viewer #search button.srch_resize_collapse {
    -webkit-mask-image: var(--icon-chevrons-left) !important;
            mask-image: var(--icon-chevrons-left) !important;
}
body.book-viewer #search .x-btn-over button.srch_resize_expand,
body.book-viewer #search .x-btn-over button.srch_resize_collapse {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Unsearchable files button — alert-triangle ::before */
body.book-viewer #search button.srch_not_indexed {
    background-image: none !important;
}
body.book-viewer #search button.srch_not_indexed::before {
    content: '' !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
    vertical-align: -3px !important;
    -webkit-mask-image: var(--icon-alert-triangle) !important;
            mask-image: var(--icon-alert-triangle) !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
}
body.book-viewer #search .x-btn-over button.srch_not_indexed::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* ============================================================================
   Definition popup — copy tool icon fix
   ============================================================================
   azzurra-legacy.css sets `.acs-new-theme .x-window .x-tool-copy {
   background-color: white !important; opacity: 0.5 }` which overwrites the
   mask-image fill colour from popup.css, making the copy icon invisible.
   Restore the themed fill scoped to the definition popup window.
   ============================================================================ */
body.book-viewer .x-window.definition-popup-window .x-tool-copy,
body.book-viewer .x-window.definition-popup-window .x-tool-left,
body.book-viewer .x-window.definition-popup-window .x-tool-right {
    background-color: var(--acs-text-secondary, #5a6370) !important;
    opacity: 1 !important;
}
body.book-viewer .x-window.definition-popup-window .x-tool-copy-over,
body.book-viewer .x-window.definition-popup-window .x-tool-left-over,
body.book-viewer .x-window.definition-popup-window .x-tool-right-over {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    opacity: 1 !important;
}

/* ============================================================================
   TOC tree — icon vertical alignment
   ============================================================================
   The `.x-tree-node-el` is `display: flex` (set by azzurra-legacy.css) but
   `align-items` defaults to `normal` which lets flex items size to their own
   height — icons (12–16 px) and the anchor text (30 px for multi-line items)
   align to the top edge. Force `align-items: center` so icons sit mid-height
   of the row regardless of whether the anchor wraps to two lines. The
   `margin-top: -3px` hack on `.x-tree-node-anchor` (also from azzurra-legacy)
   is cancelled here too — centering makes it unnecessary.
   ============================================================================ */
body.book-viewer #ext-acs-book-tabpanel .x-tree-node-el {
    align-items: center !important;
}
body.book-viewer #ext-acs-book-tabpanel .x-tree-node-el .x-tree-node-anchor {
    margin-top: 0 !important;
}

/* ============================================================================
   Note dialog (book viewer) — full theme parity with notes-page dialog
   ============================================================================
   The book viewer opens note dialogs with cls: 'note-dialog border-content'
   (JS line 3558). The notes page opens with 'edit-note-dialog border-content'
   (JS line 1649). ext-acs-notes-widgets.css scopes most rules to
   .edit-note-dialog. Mirror those rules here for .note-dialog so the
   book-viewer dialog is visually identical.

   Rules covered:
     1. Placeholder color — ExtJS adds .x-form-empty-field when showing
        emptyText; color it tertiary-grey so it looks like a placeholder,
        not real content.
     2. Note-type combo — icon hidden, wrap border/radius, borderless input.
     3. Attach file fieldset — SVG paperclip, themed link, trash icon.
     4. Save button — primary cyan fill (formBind keeps it disabled until
        form is valid, providing the validation gate).
   ============================================================================ */

/* 1. Placeholder (emptyText) color */
.x-window.note-dialog .x-form-text.x-form-empty-field {
    color: var(--acs-text-tertiary, #9aa5b4) !important;
}
/* Also ensure focused empty field keeps placeholder color until user types */
.x-window.note-dialog .x-form-text.x-form-empty-field:focus {
    color: var(--acs-text-tertiary, #9aa5b4) !important;
}

/* Add placeholder color to theme shell-wide for any dialog using emptyText */
.x-window .x-form-text.x-form-empty-field {
    color: var(--acs-text-tertiary, #9aa5b4) !important;
}

/* 2. Note-type combo — hide legacy bitmap icon, borderless inner input,
      themed wrap border (mirrors .edit-note-dialog rules in notes-widgets.css) */
.x-window.note-dialog .ux-icon-combo-icon {
    display: none !important;
}
.x-window.note-dialog .ux-icon-combo-input,
.x-window.note-dialog .x-form-field-wrap input.ux-icon-combo-input {
    padding-left: 10px !important;
}
.x-window.note-dialog .x-form-field-wrap .x-form-text {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
}
.x-window.note-dialog .x-form-field-wrap:has(.ux-icon-combo-input),
.x-window.note-dialog .x-form-field-wrap:has(#note_type) {
    border: 1px solid var(--acs-border-input, #dce2ef) !important;
    border-radius: 6px !important;
    background: #fff !important;
    box-sizing: border-box !important;
}
.x-window.note-dialog .x-form-field-wrap .x-form-trigger {
    border-left: 1px solid var(--acs-border-light, #ecf0f6) !important;
    border-radius: 0 6px 6px 0 !important;
    background: #fff !important;
    height: auto !important;
    align-self: stretch !important;
}

/* 3. Attach file fieldset — SVG paperclip + themed link */
.x-window.note-dialog fieldset.x-fieldset div:has(> .acs-img-paperclip) {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.x-window.note-dialog fieldset.x-fieldset div > img[src$="paperclip.png"] {
    content: var(--icon-paperclip) !important;
    width: 14px !important;
    height: 14px !important;
    color: var(--acs-link-color, #00aeef) !important;
    vertical-align: middle !important;
}
.x-window.note-dialog fieldset.x-fieldset a {
    color: var(--acs-link-color, #00aeef) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    line-height: 1 !important;
}
.x-window.note-dialog fieldset.x-fieldset a b {
    font-weight: inherit !important;
}
.x-window.note-dialog fieldset.x-fieldset a:hover {
    text-decoration: underline !important;
}
.x-window.note-dialog fieldset.x-fieldset .x-fieldset-body > div {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
}
.x-window.note-dialog fieldset.x-fieldset .x-fieldset-body > .fileuploader_widget {
    margin-bottom: 12px !important;
}
.x-window.note-dialog fieldset.x-fieldset .fileuploader_widget > img[src$="paperclip.png"] {
    content: var(--icon-paperclip) !important;
    width: 14px !important;
    height: 14px !important;
    color: var(--acs-text-secondary, #5a6370) !important;
    vertical-align: middle !important;
}
.x-window.note-dialog fieldset.x-fieldset img[src$="del_small.png"] {
    content: var(--icon-trash) !important;
    width: 16px !important;
    height: 16px !important;
    color: currentColor !important;
    cursor: pointer !important;
    vertical-align: middle !important;
}

/* 4. Save button — primary cyan (matches .edit-note-dialog save rules) */
.x-window.note-dialog .x-panel-btns #save,
.x-window.note-dialog .x-panel-fbar #save,
.x-window.note-dialog .x-btn#save {
    background: var(--acs-brand-cyan-muted, #0e8bb0) !important;
    background-color: var(--acs-brand-cyan-muted, #0e8bb0) !important;
    background-image: none !important;
    border-color: var(--acs-brand-cyan-muted, #0e8bb0) !important;
}
.x-window.note-dialog .x-panel-btns #save button,
.x-window.note-dialog .x-panel-fbar #save button,
.x-window.note-dialog .x-btn#save button.x-btn-text {
    color: #fff !important;
}
.x-window.note-dialog .x-panel-btns #save.x-btn-over,
.x-window.note-dialog .x-panel-fbar #save.x-btn-over,
.x-window.note-dialog .x-btn#save.x-btn-over {
    background: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    background-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    border-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
}
.x-window.note-dialog .x-panel-btns .x-item-disabled#save,
.x-window.note-dialog .x-panel-fbar .x-item-disabled#save,
.x-window.note-dialog .x-btn.x-item-disabled#save {
    opacity: 0.55 !important;
}

/* ============================================================================
   Search tab — container top padding
   ============================================================================
   The x-border-layout-ct that wraps the search form has padding: 0, which
   presses the "Type in the word(s)..." label flush against the tab strip.
   Add top padding so it breathes. */
body.book-viewer #search .x-border-layout-ct {
    padding-top: 8px !important;
}

/* ============================================================================
   book_page_panel — remove content-area border
   ============================================================================
   The .x-panel-body inside #book_page_panel carries a 1px solid border on
   top, right and bottom (left was already 0 from the sidebar). The breadcrumb
   above and the sidebar to the left already provide the visual boundary — the
   extra border is redundant and conflicts with the theme. */
body.book-viewer #book_page_panel > .x-panel-bwrap > .x-panel-body {
    border: none !important;
}

/* ============================================================================
   Breadcrumb info button — SVG icon
   ============================================================================
   #bread_crumb_info renders a legacy book_info.png as its button background.
   Replace with the themed --icon-info mask. Strip 3D chrome. */
body.book-viewer #bread_crumb_info .x-btn-tl,
body.book-viewer #bread_crumb_info .x-btn-tc,
body.book-viewer #bread_crumb_info .x-btn-tr,
body.book-viewer #bread_crumb_info .x-btn-ml,
body.book-viewer #bread_crumb_info .x-btn-mr,
body.book-viewer #bread_crumb_info .x-btn-bl,
body.book-viewer #bread_crumb_info .x-btn-bc,
body.book-viewer #bread_crumb_info .x-btn-br {
    display: none !important;
}
body.book-viewer #bread_crumb_info .x-btn-mc {
    background-image: none !important;
    padding: 0 !important;
}
body.book-viewer #bread_crumb_info {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 4px !important;
    transition: background-color 0.15s !important;
}
body.book-viewer #bread_crumb_info button.cmd_info {
    background-image: none !important;
    -webkit-mask-image: var(--icon-info) !important;
            mask-image: var(--icon-info) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    width: 16px !important;
    height: 16px !important;
    padding: 0 !important;
    transition: background-color 0.15s !important;
}
body.book-viewer #bread_crumb_info.x-btn-over button.cmd_info {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* ============================================================================
   Floating toolbar — modern card redesign
   ============================================================================
   Surfaces on text selection. Replaces the legacy dark #4A4A4A bar with a
   themed white card matching the rest of the viewer chrome. Each button is
   a 32×32+ hit-target with an SVG icon + label, theme-secondary by default,
   #F6F8FB wash on hover (canonical theme pattern — see
   ext-acs-theme.css:3630 "Toolbar-button chrome — shell-wide").

   Layout (left → right):
     [Print | Export]
     · [Notes | Tasks]              (annotation actions)
     · [Add-to-current/existing/new selection]
     · [Highlight | View Track]
     · {AffiniAI group}             (purple-tinted pill when expanded)
     · {Analysis Tracking group}    (cyan-tinted pill when expanded)

   AffiniAI and Analysis Tracking are togglable feature groups. The sub-
   panel sits BEFORE the toggle in DOM order; expanding the toggle reveals
   it. When expanded, the whole group (sub-buttons + toggle) renders as a
   feature-tinted pill so the relationship is obvious; when collapsed, only
   the toggle shows with a subtle feature-color edge.

   Icon ↔ button mapping:
     cmd_print           → --icon-printer
     cmd_export_to_pdf   → --icon-download
     cmd_note            → --icon-sticky-note
     cmd_task            → --icon-clipboard-list
     highlightButton     → --icon-highlighter
     trackViewButton     → --icon-eye
     addToCurrentButton  → --icon-circle-plus
     addToExistingButton → --icon-folder-plus
     addToNewButton      → --icon-plus
     analysysTrackingOff / ai-assist-icon → text-only with chevron ::after
   ============================================================================ */

/* ---- Container ---------------------------------------------------------- */
/* Display: don't `!important` it — ExtJS toggles .x-hide-display to hide. */
body.book-viewer div.floatingToolbar:not(.x-hide-display) {
    display: inline-flex;
    align-items: center;
}
body.book-viewer div.floatingToolbar {
    background: #fff !important;
    background-image: none !important;
    border: 1px solid var(--acs-border, #d8dde6) !important;
    border-radius: 10px !important;
    box-shadow:
        0 12px 32px rgba(28, 33, 39, 0.16),
        0 4px 12px rgba(28, 33, 39, 0.10),
        0 0 0 1px rgba(28, 33, 39, 0.02) !important;
    padding: 4px !important;
    overflow: visible !important;
    height: auto !important;
    color: var(--acs-text-primary, #1c2127) !important;
}
body.book-viewer div.floatingToolbar .x-panel-bwrap,
body.book-viewer div.floatingToolbar .x-panel-body {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
}

/* ---- Table layout (button row container) --------------------------------
   Convert the outer row from <tr>+<td> table-layout to a flex row so we
   can reorder the AffiniAI and Analysis Tracking pairs (sub-panel ↔
   toggle) without touching the JS DOM order. ExtJS renders the sub-panel
   cell BEFORE the toggle cell, but the user's mental model is "toggle
   anchor on the left, expand to the right" — flex `order` lets us match
   that visually without an intrusive JS edit. */
body.book-viewer div.floatingToolbar table.x-table-layout {
    margin: 0 !important;
    padding: 0 !important;
    height: 32px !important;
    vertical-align: middle !important;
}
body.book-viewer div.floatingToolbar table.x-table-layout > tbody,
body.book-viewer div.floatingToolbar table.x-table-layout > tbody > tr {
    display: flex !important;
    align-items: center !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
}
body.book-viewer div.floatingToolbar td.x-table-layout-cell {
    border: none !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    vertical-align: middle !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    order: 0 !important;
}
/* AffiniAI: pull the toggle (.ai-assist-cell) to BEFORE its sub-panel
   (.x-panel-extended). The toggle gets order 1; the sub-panel gets order 2;
   default cells around them stay at order 0 / unaffected. */
body.book-viewer div.floatingToolbar td.ai-assist-cell {
    order: 1 !important;
}
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-ai-panel-cell {
    order: 2 !important;
}
/* Analysis Tracking: same swap, orders 3 and 4 so they sit AFTER the AI
   group regardless of source order. */
body.book-viewer div.floatingToolbar td.analysysTracking {
    order: 3 !important;
}
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-at-panel-cell {
    order: 4 !important;
}

/* ---- Button — strip ExtJS 3D chrome cells ------------------------------- */
body.book-viewer div.floatingToolbar .x-btn-tl,
body.book-viewer div.floatingToolbar .x-btn-tc,
body.book-viewer div.floatingToolbar .x-btn-tr,
body.book-viewer div.floatingToolbar .x-btn-ml,
body.book-viewer div.floatingToolbar .x-btn-mr,
body.book-viewer div.floatingToolbar .x-btn-bl,
body.book-viewer div.floatingToolbar .x-btn-bc,
body.book-viewer div.floatingToolbar .x-btn-br {
    display: none !important;
}
/* Middle cell — the hit-target that paints hover wash. */
body.book-viewer div.floatingToolbar .x-btn-mc {
    background-image: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    border-radius: 6px !important;
    transition: background-color 0.12s ease !important;
}
body.book-viewer div.floatingToolbar td.x-table-layout-cell table.x-btn em {
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

/* ---- Button table wrap — transparent, no border ------------------------- */
body.book-viewer div.floatingToolbar .x-btn {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    border: none !important;
    margin: 0 1px !important;
    vertical-align: middle !important;
    height: 32px !important;
}

/* ---- Button label (the inner <button>) ---------------------------------- */
body.book-viewer div.floatingToolbar .x-btn button.x-btn-text {
    color: var(--acs-text-primary, #1c2127) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    height: 32px !important;
    line-height: 32px !important;
    padding: 0 10px !important;
    background-image: none !important;
    background-color: transparent !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: color 0.12s ease !important;
}

/* ---- Hover wash — soft cyan-tint on td.x-btn-mc ------------------------
   Paint a 6px-radius cyan-tint pill on the middle cell. The legacy
   `.floatingToolbar .x-btn :hover { background-color: #3b3b3b }` rule at
   line 339 (with a SPACE = descendant selector) paints a dark grey wash
   on EVERY descendant of .x-btn that's hovered — including the inner
   `<button>` text. That's what surfaces as a dark band when the cursor
   is over the text rather than the icon area. Kill it explicitly under
   the book-viewer scope below.

   Specificity boost (`.acs-new-theme` chained on body) to beat the
   shell-wide `.acs-new-theme .x-btn.x-btn-over` deep-cyan rule too. */
body.book-viewer.acs-new-theme div.floatingToolbar .x-btn:hover td.x-btn-mc,
body.book-viewer.acs-new-theme div.floatingToolbar .x-btn.x-btn-over td.x-btn-mc {
    background: rgba(0, 174, 239, 0.08) !important;
    background-color: rgba(0, 174, 239, 0.08) !important;
    background-image: none !important;
    border-radius: 6px !important;
}
body.book-viewer.acs-new-theme div.floatingToolbar .x-btn:hover,
body.book-viewer.acs-new-theme div.floatingToolbar .x-btn.x-btn-over {
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
/* Kill the legacy `.x-btn :hover { #3b3b3b }` descendant rule from
   line 339. Any descendant of a hovered .x-btn must stay transparent
   (the only painted surface is .x-btn-mc above). */
body.book-viewer div.floatingToolbar .x-btn :hover,
body.book-viewer div.floatingToolbar .x-btn:hover *,
body.book-viewer div.floatingToolbar .x-btn:hover em,
body.book-viewer div.floatingToolbar .x-btn:hover button {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.book-viewer div.floatingToolbar .x-btn:hover button.x-btn-text,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.x-btn-text {
    color: var(--acs-brand-cyan, #00aeef) !important;
}

/* ---- Feature-color hover for AI sub-panel buttons -----------------------
   Buttons inside the AffiniAI sub-panel (Explain Clause, Start Chat)
   adopt the AI feature colour on hover — text + wash both shift to
   purple tones so the whole group reads as a single AffiniAI surface. */
body.book-viewer.acs-new-theme div.floatingToolbar td.x-panel-extended.acs-ai-panel-cell .x-btn:hover td.x-btn-mc,
body.book-viewer.acs-new-theme div.floatingToolbar td.x-panel-extended.acs-ai-panel-cell .x-btn.x-btn-over td.x-btn-mc {
    background: rgba(178, 97, 213, 0.16) !important;
    background-color: rgba(178, 97, 213, 0.16) !important;
}
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-ai-panel-cell .x-btn:hover button.x-btn-text,
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-ai-panel-cell .x-btn.x-btn-over button.x-btn-text {
    color: var(--acs-ai-purple-muted, #9b50b8) !important;
}
/* Feature-color hover for AT sub-panel buttons. */
body.book-viewer.acs-new-theme div.floatingToolbar td.x-panel-extended.acs-at-panel-cell .x-btn:hover td.x-btn-mc,
body.book-viewer.acs-new-theme div.floatingToolbar td.x-panel-extended.acs-at-panel-cell .x-btn.x-btn-over td.x-btn-mc {
    background: rgba(0, 174, 239, 0.16) !important;
    background-color: rgba(0, 174, 239, 0.16) !important;
}
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-at-panel-cell .x-btn:hover button.x-btn-text,
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-at-panel-cell .x-btn.x-btn-over button.x-btn-text {
    color: var(--acs-brand-cyan-muted, #0e8bb0) !important;
}
/* Icon-only buttons (addToCurrent/Existing/New) — icon also adopts feature
   tone on hover. */
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-at-panel-cell .x-btn:hover button.addToCurrentButton::before,
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-at-panel-cell .x-btn:hover button.addToExistingButton::before,
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-at-panel-cell .x-btn:hover button.addToNewButton::before,
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-at-panel-cell .x-btn:hover button.highlightButton::before,
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-at-panel-cell .x-btn:hover button.trackViewButton::before {
    background-color: var(--acs-brand-cyan-muted, #0e8bb0) !important;
}

/* ---- Icon ::before — SVG mask, 16px, theme-secondary -------------------- */
body.book-viewer div.floatingToolbar button.cmd_print::before,
body.book-viewer div.floatingToolbar button.cmd_export_to_pdf::before,
body.book-viewer div.floatingToolbar button.cmd_note::before,
body.book-viewer div.floatingToolbar button.cmd_task::before,
body.book-viewer div.floatingToolbar button.highlightButton::before,
body.book-viewer div.floatingToolbar button.trackViewButton::before,
body.book-viewer div.floatingToolbar button.addToCurrentButton::before,
body.book-viewer div.floatingToolbar button.addToExistingButton::before,
body.book-viewer div.floatingToolbar button.addToNewButton::before {
    content: '' !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 6px !important;
    flex-shrink: 0 !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.12s ease !important;
}

/* Per-button icon assignment + clear any legacy bg-image on the button. */
body.book-viewer div.floatingToolbar button.cmd_print {
    background-image: none !important;
    padding-left: 10px !important;
}
body.book-viewer div.floatingToolbar button.cmd_print::before {
    -webkit-mask-image: var(--icon-printer) !important;
            mask-image: var(--icon-printer) !important;
}
body.book-viewer div.floatingToolbar button.cmd_export_to_pdf {
    background-image: none !important;
    padding-left: 10px !important;
}
body.book-viewer div.floatingToolbar button.cmd_export_to_pdf::before {
    -webkit-mask-image: var(--icon-download) !important;
            mask-image: var(--icon-download) !important;
}
body.book-viewer div.floatingToolbar button.cmd_note {
    background-image: none !important;
    padding-left: 10px !important;
}
body.book-viewer div.floatingToolbar button.cmd_note::before {
    -webkit-mask-image: var(--icon-sticky-note) !important;
            mask-image: var(--icon-sticky-note) !important;
}
body.book-viewer div.floatingToolbar button.cmd_task {
    background-image: none !important;
    padding-left: 10px !important;
}
body.book-viewer div.floatingToolbar button.cmd_task::before {
    -webkit-mask-image: var(--icon-clipboard-list) !important;
            mask-image: var(--icon-clipboard-list) !important;
}
body.book-viewer div.floatingToolbar button.highlightButton {
    background-image: none !important;
    padding-left: 10px !important;
}
body.book-viewer div.floatingToolbar button.highlightButton::before {
    -webkit-mask-image: var(--icon-highlighter) !important;
            mask-image: var(--icon-highlighter) !important;
}
body.book-viewer div.floatingToolbar button.trackViewButton {
    background-image: none !important;
    padding-left: 10px !important;
}
body.book-viewer div.floatingToolbar button.trackViewButton::before {
    -webkit-mask-image: var(--icon-eye) !important;
            mask-image: var(--icon-eye) !important;
}

/* Add-to-selection — icon-only buttons. ExtJS inserts `&nbsp;` into the
   button label when text is empty (legacy fallback), which takes ~4px
   width inside the flex button. With `justify-content: center` and
   `flex-direction: row`, the `::before` icon + `&nbsp;` text are centred
   as a pair, pushing the icon ~2px left of true centre. Add 4px of
   right-padding (matching the &nbsp; width) so the icon visually centres
   inside the button bounds. */
body.book-viewer div.floatingToolbar button.addToCurrentButton,
body.book-viewer div.floatingToolbar button.addToExistingButton,
body.book-viewer div.floatingToolbar button.addToNewButton {
    background-image: none !important;
    padding: 0 0 0 4px !important;
    width: 28px !important;
    justify-content: center !important;
}
body.book-viewer div.floatingToolbar button.addToCurrentButton::before,
body.book-viewer div.floatingToolbar button.addToExistingButton::before,
body.book-viewer div.floatingToolbar button.addToNewButton::before {
    margin-right: 0 !important;
    margin-left: 0 !important;
}
/* The icon-only buttons' wrapping table.x-btn has `margin: 0 1px` from
   the base rule which makes the hover wash sit asymmetrically inside
   the cell (1px from left, 2px from right). Zero out for these
   buttons so the wash is perfectly centered. */
body.book-viewer div.floatingToolbar td.x-table-layout-cell:has(.addToCurrentButton) .x-btn,
body.book-viewer div.floatingToolbar td.x-table-layout-cell:has(.addToExistingButton) .x-btn,
body.book-viewer div.floatingToolbar td.x-table-layout-cell:has(.addToNewButton) .x-btn {
    margin: 0 !important;
}
body.book-viewer div.floatingToolbar button.addToCurrentButton::before {
    -webkit-mask-image: var(--icon-circle-plus) !important;
            mask-image: var(--icon-circle-plus) !important;
}
body.book-viewer div.floatingToolbar button.addToExistingButton::before {
    -webkit-mask-image: var(--icon-folder-plus) !important;
            mask-image: var(--icon-folder-plus) !important;
}
body.book-viewer div.floatingToolbar button.addToNewButton::before {
    -webkit-mask-image: var(--icon-plus) !important;
            mask-image: var(--icon-plus) !important;
}

/* Hover — icons follow text colour (brand cyan). */
body.book-viewer div.floatingToolbar .x-btn:hover button.cmd_print::before,
body.book-viewer div.floatingToolbar .x-btn:hover button.cmd_export_to_pdf::before,
body.book-viewer div.floatingToolbar .x-btn:hover button.cmd_note::before,
body.book-viewer div.floatingToolbar .x-btn:hover button.cmd_task::before,
body.book-viewer div.floatingToolbar .x-btn:hover button.highlightButton::before,
body.book-viewer div.floatingToolbar .x-btn:hover button.trackViewButton::before,
body.book-viewer div.floatingToolbar .x-btn:hover button.addToCurrentButton::before,
body.book-viewer div.floatingToolbar .x-btn:hover button.addToExistingButton::before,
body.book-viewer div.floatingToolbar .x-btn:hover button.addToNewButton::before,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.cmd_print::before,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.cmd_export_to_pdf::before,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.cmd_note::before,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.cmd_task::before,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.highlightButton::before,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.trackViewButton::before,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.addToCurrentButton::before,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.addToExistingButton::before,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.addToNewButton::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* ---- Suppress legacy chrome on AT / AI buttons (text-only toggles) ------ */
body.book-viewer div.floatingToolbar button.analysysTrackingOff,
body.book-viewer div.floatingToolbar button.analysysTrackingOff.visibleButton,
body.book-viewer div.floatingToolbar button.ai-assist-icon,
body.book-viewer div.floatingToolbar button.ai-assist-icon.visibleButton {
    background-image: none !important;
    background: transparent !important;
    padding: 0 10px !important;
}
body.book-viewer div.floatingToolbar button.analysysTrackingOff::before,
body.book-viewer div.floatingToolbar button.ai-assist-icon::before {
    display: none !important;
    content: none !important;
}
body.book-viewer div.floatingToolbar td.x-table-layout-cell.analysysTracking.hiddenCell,
body.book-viewer div.floatingToolbar td.x-table-layout-cell.ai-assist-cell.hiddenCell {
    background: transparent !important;
    background-image: none !important;
}
body.book-viewer div.floatingToolbar .x-panel-extended div.x-panel {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    padding: 0 !important;
}
body.book-viewer div.floatingToolbar .x-panel-extended div.x-panel,
body.book-viewer div.floatingToolbar .x-panel-extended div.x-panel-bwrap,
body.book-viewer div.floatingToolbar .x-panel-extended div.x-panel-body {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Match the standard button row height (34px = 32px button + 1px
       top/bottom = 34px) so the sub-panel inner content centres at the
       same line as the rest of the toolbar buttons. */
    height: 34px !important;
    vertical-align: middle !important;
}
body.book-viewer div.floatingToolbar .x-panel-extended table.x-table-layout {
    margin: 0 !important;
    height: 34px !important;
    vertical-align: middle !important;
}
/* The cell itself also gets vertical-align: middle (table-cell semantics). */
body.book-viewer div.floatingToolbar td.x-table-layout-cell.x-panel-extended {
    vertical-align: middle !important;
}
body.book-viewer div.floatingToolbar .start-chat-btn td.x-btn-ml {
    border-left: none !important;
}

/* ---- Generic section dividers (between Print/Export and Notes/Tasks,
        Notes/Tasks and add-to-selection, etc) -----------------------------
   Notes is the only top-level group head that gets a generic divider.
   The AT and AI groups use feature-color pills (no generic dividers
   inside or around them). */
body.book-viewer div.floatingToolbar td.x-table-layout-cell:has(.cmd_note) {
    border-left: 1px solid var(--acs-border-light, #ecf0f6) !important;
    padding-left: 4px !important;
    margin-left: 4px !important;
}
/* Suppress generic dividers inside the AT / AI sub-panels (cells
   inheriting :has() rules from earlier passes). The pill background
   does the visual grouping; no internal hairlines needed. */
body.book-viewer div.floatingToolbar td.x-panel-extended td.x-table-layout-cell {
    border-left: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* ---- FEATURE GROUP PILL — AffiniAI (purple) and Analysis Tracking (cyan)
   When the sub-panel cell (`.x-panel-extended` directly followed by the
   toggle cell `.ai-assist-cell` / `.analysysTracking`) is expanded, paint
   the WHOLE group (sub-buttons + toggle) as one tinted pill. The two
   cells visually merge: sub-panel cell has rounded LEFT corners + left
   pill bg; toggle cell has rounded RIGHT corners + right pill bg.

   When collapsed, only the toggle cell shows — paint it with a subtle
   feature-color left accent (3px) so the user knows that's the AffiniAI /
   AT entry point. */

/* AffiniAI — expanded: sub-panel cell renders as the RIGHT half of the
   pill (via flex `order` swap above). Flat left edge (merges with the
   toggle), rounded right edge (pill ends). Per user spec: no right
   border and a 5px right margin as the gap to the next group. */
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-ai-panel-cell.acs-panel-open {
    background: var(--acs-ai-purple-tint, #ede3f2) !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-right: none !important;
    padding: 3px 10px 3px 6px !important;
    margin: 0 5px 0 0 !important;
    -webkit-background-clip: padding-box !important;
            background-clip: padding-box !important;
}
body.book-viewer div.floatingToolbar td.ai-assist-cell.hiddenCell {
    /* Toggle cell tint when expanded (visibleButton class is on the
       button when the panel is open). Fallback selector covers both
       state combinations ExtJS produces. */
}
/* AffiniAI toggle — always show, paint right-side of the pill when
   expanded, single feature-color edge when collapsed. Border-right of
   8px transparent creates a visible gap between the AI pill and the
   next group (Analysis Tracking) since <td> margins don't apply in
   table-layout. `background-clip: padding-box` keeps the purple pill
   bg from bleeding into the transparent border-right (so the gap
   actually shows). */
/* AffiniAI TOGGLE cell — the permanent visual anchor. Sits at the LEFT
   of the group (via flex order swap above). The 3px purple left-edge
   is ALWAYS visible (collapsed AND expanded), marking where the group
   starts.

   Collapsed: rounded on BOTH right corners + 8px transparent border-right
   spacer to the next group.
   Expanded: rounded on the LEFT only (the sub-panel cell, now flexed to
   appear immediately to the right, takes the rounded-right corners and
   the 8px spacer — see the `.acs-ai-panel-cell.acs-panel-open` rule
   above). The toggle's right corners flatten to merge with the
   sub-panel. */
body.book-viewer div.floatingToolbar td.ai-assist-cell {
    background: transparent !important;
    padding: 2px 10px 2px 8px !important;
    margin: 0 !important;
    border-left: 3px solid var(--acs-ai-purple, #b261d5) !important;
    border-right: 8px solid transparent !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    -webkit-background-clip: padding-box !important;
            background-clip: padding-box !important;
    transition: background-color 0.15s ease !important;
}
/* Expanded: flatten the toggle's right corners + replace the 8px solid
   transparent border-right with a 1px transparent hairline (just enough
   to keep the box geometry stable; the sub-panel cell takes over the
   visible right edge). Per user spec for this state. */
body.book-viewer div.floatingToolbar td.ai-assist-cell:not(.hiddenCell) {
    border-right: 1px solid transparent !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
/* Expanded — tint the toggle cell so it merges seamlessly with the
   sub-panel cell on its left into one continuous purple pill.
   State note: the JS puts `.hiddenCell` on the AT/AI toggle cell (and
   `.visibleButton` on its button) while the panel is COLLAPSED and removes
   both when it expands. So `:not(.hiddenCell)` = expanded. No `:has()` on
   this toolbar: it made every layout of the book many times slower.
   Re-declare `background-clip: padding-box` here — the `background`
   shorthand resets clip to default (border-box), which lets the purple
   bg bleed into the transparent border-right gap. */
body.book-viewer div.floatingToolbar td.ai-assist-cell:not(.hiddenCell) {
    background: var(--acs-ai-purple-tint, #ede3f2) !important;
    -webkit-background-clip: padding-box !important;
            background-clip: padding-box !important;
}

/* Analysis Tracking — same pattern as AffiniAI, cyan tones. */
body.book-viewer div.floatingToolbar td.x-panel-extended.acs-at-panel-cell.acs-panel-open {
    background: rgba(0, 174, 239, 0.08) !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-right: none !important;
    padding: 3px 10px 3px 6px !important;
    margin: 0 5px 0 0 !important;
    -webkit-background-clip: padding-box !important;
            background-clip: padding-box !important;
}
body.book-viewer div.floatingToolbar td.analysysTracking {
    background: transparent !important;
    padding: 2px 10px 2px 8px !important;
    margin: 0 !important;
    border-left: 3px solid var(--acs-brand-cyan, #00aeef) !important;
    border-right: 8px solid transparent !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    -webkit-background-clip: padding-box !important;
            background-clip: padding-box !important;
    transition: background-color 0.15s ease !important;
}
/* Expanded: flatten right + replace 8px solid transparent with 1px
   transparent hairline (per user spec — matches AI toggle behaviour). */
body.book-viewer div.floatingToolbar td.analysysTracking:not(.hiddenCell) {
    border-right: 1px solid transparent !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
body.book-viewer div.floatingToolbar td.analysysTracking:not(.hiddenCell) {
    background: rgba(0, 174, 239, 0.08) !important;
    -webkit-background-clip: padding-box !important;
            background-clip: padding-box !important;
}

/* ---- AT / AI toggle button — text + chevron ----------------------------- */
body.book-viewer div.floatingToolbar button.analysysTrackingOff,
body.book-viewer div.floatingToolbar button.ai-assist-icon {
    color: var(--acs-text-primary, #1c2127) !important;
    font-weight: 500 !important;
    font-size: 13px !important;
}
/* Hover wash on the AT/AI toggle uses the feature tint instead of grey. */
body.book-viewer.acs-new-theme div.floatingToolbar td.ai-assist-cell .x-btn:hover td.x-btn-mc,
body.book-viewer.acs-new-theme div.floatingToolbar td.ai-assist-cell .x-btn.x-btn-over td.x-btn-mc {
    background: var(--acs-ai-purple-tint, #ede3f2) !important;
    background-color: var(--acs-ai-purple-tint, #ede3f2) !important;
}
body.book-viewer div.floatingToolbar td.ai-assist-cell .x-btn:hover button,
body.book-viewer div.floatingToolbar td.ai-assist-cell .x-btn.x-btn-over button {
    color: var(--acs-ai-purple-muted, #9b50b8) !important;
}
body.book-viewer.acs-new-theme div.floatingToolbar td.analysysTracking .x-btn:hover td.x-btn-mc,
body.book-viewer.acs-new-theme div.floatingToolbar td.analysysTracking .x-btn.x-btn-over td.x-btn-mc {
    background: rgba(0, 174, 239, 0.16) !important;
    background-color: rgba(0, 174, 239, 0.16) !important;
}
body.book-viewer div.floatingToolbar td.analysysTracking .x-btn:hover button,
body.book-viewer div.floatingToolbar td.analysysTracking .x-btn.x-btn-over button {
    color: var(--acs-brand-cyan-muted, #0e8bb0) !important;
}

/* Chevron ::after on the AT/AI toggle button */
body.book-viewer div.floatingToolbar button.analysysTrackingOff::after,
body.book-viewer div.floatingToolbar button.ai-assist-icon::after {
    content: '' !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    margin-left: 6px !important;
    flex-shrink: 0 !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 12px 12px !important;
    /* Use chevron-down as the base glyph; rotate via transform to point
       in the direction the panel will open/close. Smooth transition. */
            mask-size: 12px 12px !important;
    -webkit-mask-image: var(--icon-chevron-down) !important;
            mask-image: var(--icon-chevron-down) !important;
    transition: transform 0.2s ease, background-color 0.15s ease !important;
    opacity: 0.6 !important;
}

/* AffiniAI chevron direction mapping:
     Collapsed (`.visibleButton` present) → ">" (rotate 270deg)
       — "click to expand the panel"
     Expanded (no `.visibleButton`)       → "<" (rotate 90deg)
       — "click to collapse the panel back into the toggle"

   Base glyph is `chevron-down` (V pointing down).
     rotate(90deg)  = points LEFT  (<)
     rotate(270deg) = points RIGHT (>) */
body.book-viewer div.floatingToolbar button.ai-assist-icon::after {
    background-color: var(--acs-ai-purple, #b261d5) !important;
    transform: rotate(270deg) !important;
}
body.book-viewer div.floatingToolbar button.ai-assist-icon.visibleButton::after {
    transform: rotate(270deg) !important;
}
body.book-viewer div.floatingToolbar button.ai-assist-icon:not(.visibleButton)::after {
    transform: rotate(90deg) !important;
}

/* Analysis Tracking chevron — same direction logic, cyan color. */
body.book-viewer div.floatingToolbar button.analysysTrackingOff::after {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    transform: rotate(270deg) !important;
}
body.book-viewer div.floatingToolbar button.analysysTrackingOff.visibleButton::after {
    transform: rotate(270deg) !important;
}
body.book-viewer div.floatingToolbar button.analysysTrackingOff:not(.visibleButton)::after {
    transform: rotate(90deg) !important;
}

/* Hover — boost chevron opacity */
body.book-viewer div.floatingToolbar .x-btn:hover button.ai-assist-icon::after,
body.book-viewer div.floatingToolbar .x-btn:hover button.analysysTrackingOff::after,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.ai-assist-icon::after,
body.book-viewer div.floatingToolbar .x-btn.x-btn-over button.analysysTrackingOff::after {
    opacity: 1 !important;
}

/* ---- AT / AffiniAI text spans — always keep them visible ---------------- */
body.book-viewer div.floatingToolbar #at-btn,
body.book-viewer div.floatingToolbar #ai-btn-text {
    display: inline-block !important;
    overflow: visible !important;
    transition: opacity 0.2s ease !important;
}

/* ============================================================================
   Page content — legend markers + breadcrumb separators
   ============================================================================
   The "legend marker" buttons (.btn_legend_marker) render small icons above
   the page content indicating which tracks/notes/tasks exist on this page.
   The breadcrumb separators (.xtb-sep) live in the .bread_crumb_panel.
   Both still rendered as legacy PNGs — migrate to SVG mask-image so they
   inherit the theme and respond to currentColor.

   Mapping:
     track_item       → --icon-circle-dot   (track marker)
     task_info        → --icon-clipboard-list (task legend)
     note-marker-img  → --icon-sticky-note  (note legend)
     xtb-sep          → --icon-chevron-right (breadcrumb separator)

   NOT migrated:
     book_loading_indicator  — animated GIF spinner, leave as-is.
     icon_button_red         — red badge wrapping a popup link, not an icon
                                button; keep its existing styling for now.
   ============================================================================ */

/* Strip 3D chrome on legend-marker buttons (table.x-btn wrap) */
body.book-viewer .btn_legend_marker .x-btn-tl,
body.book-viewer .btn_legend_marker .x-btn-tc,
body.book-viewer .btn_legend_marker .x-btn-tr,
body.book-viewer .btn_legend_marker .x-btn-ml,
body.book-viewer .btn_legend_marker .x-btn-mr,
body.book-viewer .btn_legend_marker .x-btn-bl,
body.book-viewer .btn_legend_marker .x-btn-bc,
body.book-viewer .btn_legend_marker .x-btn-br {
    display: none !important;
}
body.book-viewer .btn_legend_marker .x-btn-mc {
    background-image: none !important;
    padding: 0 !important;
}
body.book-viewer .btn_legend_marker {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 4px !important;
    transition: background-color 0.15s !important;
}

/* Legend-marker parent toolbar — ExtJS sets the wrapping .legend_marker div's
   inner .x-toolbar to a tight 20px height with `overflow: hidden`, which
   would clip our cyan-tinted pill (22×22). Expand the wrap and let it
   overflow visibly so the rounded pill paints fully. Also bump the legend
   container height so the pill has 2px breathing room top + bottom. */
body.book-viewer #book_page_panel .legend_marker {
    min-height: 24px !important;
    overflow: visible !important;
}
body.book-viewer #book_page_panel .legend_marker .x-toolbar {
    overflow: visible !important;
    height: auto !important;
    min-height: 24px !important;
    padding: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    /* Take the buttons' width: LegendToolbar._calculate_tbar_width is sized
       for the legacy icon and leaves no room for a dropdown arrow, so a
       multi-item marker spilled over the marker beside it. */
    width: auto !important;
}
body.book-viewer #book_page_panel .legend_marker .x-toolbar-ct,
body.book-viewer #book_page_panel .legend_marker .x-toolbar-left,
body.book-viewer #book_page_panel .legend_marker .x-toolbar-left-row,
body.book-viewer #book_page_panel .legend_marker .x-toolbar-cell {
    overflow: visible !important;
    height: auto !important;
    padding: 0 !important;
}

/* Legend-marker wrap — give the button a clickable "pill" with a soft cyan
   tint background so it stands out over the page text and reads as an
   actionable affordance, not decoration.

   Specificity note: ext-acs-theme.css carries `.acs-new-theme :not(#acs_top
   _menu_div):is(.x-toolbar, ...):not(.acs_top_menu) .x-btn:not(.toggleButtons)
   .x-btn-over { background: transparent !important; border-color: transparent
   !important }` at specificity (1 ID, 6 classes). To win we go (1 ID, 7
   classes) by chaining four classes on `body` and four on the marker. */
body.book-viewer.acs-new-theme #book_page_panel .legend_marker .x-toolbar .btn_legend_marker.x-btn.x-btn-icon {
    background: rgba(0, 174, 239, 0.08) !important;
    background-color: rgba(0, 174, 239, 0.08) !important;
    background-image: none !important;
    border: 1px solid rgba(0, 174, 239, 0.18) !important;
    border-color: rgba(0, 174, 239, 0.18) !important;
    border-radius: 6px !important;
    padding: 2px !important;
    margin: 0 2px !important;
    box-sizing: content-box !important;
}
/* Hover — keep the pill chrome; deepen the tint. Same specificity boost. */
body.book-viewer.acs-new-theme #book_page_panel .legend_marker .x-toolbar .btn_legend_marker.x-btn.x-btn-icon.x-btn-over {
    background: rgba(0, 174, 239, 0.18) !important;
    background-color: rgba(0, 174, 239, 0.18) !important;
    background-image: none !important;
    border: 1px solid rgba(0, 174, 239, 0.36) !important;
    border-color: rgba(0, 174, 239, 0.36) !important;
}

/* Legend marker buttons — SVG mask on the button itself. Default color is
   brand cyan (was secondary grey) so the markers stand out over the page
   body text and read as clickable affordances. */
body.book-viewer .btn_legend_marker button.track_item,
body.book-viewer .btn_legend_marker button.locked_track_item,
body.book-viewer .btn_legend_marker button.task_info,
body.book-viewer .btn_legend_marker button.note-marker-img,
body.book-viewer .btn_legend_marker button.task_info_root,
body.book-viewer .btn_legend_marker button.note-root-marker-img {
    background-image: none !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    width: 16px !important;
    height: 16px !important;
    padding: 0 !important;
    transition: background-color 0.15s !important;
}
body.book-viewer .btn_legend_marker button.track_item,
body.book-viewer .btn_legend_marker button.locked_track_item {
    /* --icon-shelf-book matches what startpage uses for its tracks/library
       sidebar tree (ext-acs-startpage.css:8138). Using the same icon in
       the page-content marker, the book-viewer tracks tree leaf, and the
       legend dropdown means all three contexts read as the same concept. */
    -webkit-mask-image: var(--icon-shelf-book) !important;
            mask-image: var(--icon-shelf-book) !important;
}
/* A track the user cannot edit adds a lock badge. The mask clips the
   button's own pseudo-elements, so the badge sits on its cell. */
body.book-viewer .btn_legend_marker.acs-locked-track td.x-btn-mc {
    position: relative;
}
body.book-viewer .btn_legend_marker.acs-locked-track td.x-btn-mc::before,
body.book-viewer .x-menu a.x-menu-item.acs-locked-track::before {
    content: '';
    position: absolute;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--acs-card-bg, #fff);
    pointer-events: none;
}
body.book-viewer .btn_legend_marker.acs-locked-track td.x-btn-mc::after,
body.book-viewer .x-menu a.x-menu-item.acs-locked-track::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 9px;
    background-color: var(--acs-text-secondary, #5a6370);
    -webkit-mask: var(--icon-lock) center / 9px 9px no-repeat;
            mask: var(--icon-lock) center / 9px 9px no-repeat;
    pointer-events: none;
}
body.book-viewer .btn_legend_marker.acs-locked-track td.x-btn-mc::before {
    right: -5px;
    bottom: -5px;
}
body.book-viewer .btn_legend_marker.acs-locked-track td.x-btn-mc::after {
    right: -4px;
    bottom: -4px;
}
body.book-viewer .btn_legend_marker button.task_info,
body.book-viewer .btn_legend_marker button.task_info_root {
    -webkit-mask-image: var(--icon-clipboard-list) !important;
            mask-image: var(--icon-clipboard-list) !important;
    width: 18px !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
}
body.book-viewer .btn_legend_marker button.note-marker-img,
body.book-viewer .btn_legend_marker button.note-root-marker-img {
    -webkit-mask-image: var(--icon-sticky-note) !important;
            mask-image: var(--icon-sticky-note) !important;
}
/* Hover — deepen the cyan tone */
body.book-viewer .btn_legend_marker.x-btn-over button.track_item,
body.book-viewer .btn_legend_marker.x-btn-over button.locked_track_item,
body.book-viewer .btn_legend_marker.x-btn-over button.task_info,
body.book-viewer .btn_legend_marker.x-btn-over button.task_info_root,
body.book-viewer .btn_legend_marker.x-btn-over button.note-marker-img,
body.book-viewer .btn_legend_marker.x-btn-over button.note-root-marker-img {
    background-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
}

/* ============================================================================
   Legend dropdown menu — themed container + SVG item icons
   ============================================================================
   When a legend marker has >1 item, clicking it spawns an Ext menu. The
   menu shell is already themed by ext-acs-theme.css (.x-menu:not(.header-menu)).
   What still needs attention:
     1. .legend_menu_title h3 — the menu title sits at the top with an
        outdated blue border + bitmap-era typography. Re-theme to match.
     2. Menu items' iconCls glyphs — task-img / repeating-task-img /
        track_item / locked_track_item are all PNG sprites. Migrate to SVG.
     3. Note menu items use `icon:` (direct image src) → swap via `content:`
        on the rendered `<img>` element.
   ============================================================================ */

/* Title header — flat themed band, no border, theme typography */
body.book-viewer .x-menu .legend_menu_title h3 {
    color: var(--acs-text-primary, #1c2127) !important;
    background-color: var(--acs-hover-bg, #f6f8fb) !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 16px !important;
    border: none !important;
    border-bottom: 1px solid var(--acs-border-light, #ecf0f6) !important;
    height: auto !important;
    margin: -4px -4px 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}

/* Menu item iconCls — task-img / repeating-task-img → SVG mask.
   The icon paints inside the .x-menu-item element via its background-image.
   These rules target the iconCls applied on the menu-item's `img` (Ext 3
   menu items render `<img class="x-menu-item-icon iconCls">` inside an `<a>`).
   Override the legacy PNG and paint an SVG mask in theme-secondary. */
body.book-viewer .x-menu img.x-menu-item-icon.task-img,
body.book-viewer .x-menu img.x-menu-item-icon.repeating-task-img,
body.book-viewer .x-menu img.x-menu-item-icon.track_item,
body.book-viewer .x-menu img.x-menu-item-icon.locked_track_item {
    background-image: none !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    width: 16px !important;
    height: 16px !important;
    transition: background-color 0.15s !important;
}
body.book-viewer .x-menu img.x-menu-item-icon.task-img {
    -webkit-mask-image: var(--icon-clipboard-list) !important;
            mask-image: var(--icon-clipboard-list) !important;
}
body.book-viewer .x-menu img.x-menu-item-icon.repeating-task-img {
    -webkit-mask-image: var(--icon-edit) !important;
            mask-image: var(--icon-edit) !important;
}
body.book-viewer .x-menu img.x-menu-item-icon.track_item,
body.book-viewer .x-menu img.x-menu-item-icon.locked_track_item {
    -webkit-mask-image: var(--icon-shelf-book) !important;
            mask-image: var(--icon-shelf-book) !important;
}
/* Active row — icon flips to brand cyan */
body.book-viewer .x-menu .x-menu-item-active img.x-menu-item-icon.task-img,
body.book-viewer .x-menu .x-menu-item-active img.x-menu-item-icon.repeating-task-img,
body.book-viewer .x-menu .x-menu-item-active img.x-menu-item-icon.track_item,
body.book-viewer .x-menu .x-menu-item-active img.x-menu-item-icon.locked_track_item {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}
/* Lock badge on the icon's bottom-right corner (icon at 8px, 5px; 16px). */
body.book-viewer .x-menu a.x-menu-item.acs-locked-track::before {
    left: 18px;
    top: 15px;
}
body.book-viewer .x-menu a.x-menu-item.acs-locked-track::after {
    left: 19px;
    top: 16px;
}

/* Note menu items use `icon:` (direct src on the <img>) — content-swap. */
body.book-viewer .x-menu img.x-menu-item-icon[src*="/note"],
body.book-viewer .x-menu img.x-menu-item-icon[src$="note.png"] {
    content: var(--icon-sticky-note) !important;
    color: var(--acs-text-secondary, #5a6370) !important;
    width: 16px !important;
    height: 16px !important;
    transition: color 0.15s !important;
}
body.book-viewer .x-menu .x-menu-item-active img.x-menu-item-icon[src*="/note"],
body.book-viewer .x-menu .x-menu-item-active img.x-menu-item-icon[src$="note.png"] {
    color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Breadcrumb separator — chevron-right SVG instead of source-arrow.png.
   .xtb-sep is a SPAN, so use mask-image (no replaced-element pseudo issue). */
body.book-viewer .bread_crumb_panel .xtb-sep {
    background-image: none !important;
    -webkit-mask-image: var(--icon-chevron-right) !important;
            mask-image: var(--icon-chevron-right) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-text-tertiary, #9aa5b4) !important;
    width: 16px !important;
    height: 16px !important;
    vertical-align: middle !important;
}

/* ============================================================================
   Page-panel resize handles — invisible hit-targets
   ============================================================================
   ExtJS wraps `#book_page_panel` (and the outer window) in 6px-wide
   `.x-resizable-handle` strips on each edge + 6×6 squares on each corner.
   The legacy azzurra-legacy theme paints them white with a PNG sprite
   handle image. While resizing the sidebar (or hovering near an edge),
   they become visible and read as a thick white band — the "bold border"
   the user sees around the page content.

   We keep the elements (they're the resize hit-targets) but strip their
   visual chrome so they're truly invisible. */
body.book-viewer .x-resizable-handle,
body.book-viewer .x-resizable-handle-north,
body.book-viewer .x-resizable-handle-south,
body.book-viewer .x-resizable-handle-east,
body.book-viewer .x-resizable-handle-west,
body.book-viewer .x-resizable-handle-northeast,
body.book-viewer .x-resizable-handle-northwest,
body.book-viewer .x-resizable-handle-southeast,
body.book-viewer .x-resizable-handle-southwest {
    background-image: none !important;
    background-color: transparent !important;
    border: none !important;
}

/* ============================================================================
   Breadcrumb panel — bottom border only
   ============================================================================
   The .bread_crumb_panel sits at the top of #book_page_panel. With the
   panel-body border removed, the breadcrumb visually merged with the page
   content below — restore a single bottom border so it reads as a separated
   header row. Also strip the azzurra-legacy 1px border-right (rgb 174,182,190)
   which competes with the theme's split-line on the sidebar. */
body.book-viewer .bread_crumb_panel {
    border-top: none !important;
    border-right: none !important;
    border-left: none !important;
    border-bottom: 1px solid var(--acs-border-light, #ecf0f6) !important;
}

/* ============================================================================
   #mockTurtle — page content "paper" — remove default 1px border
   ============================================================================
   The element has inline `border-width: 1px` (set in HTML), which combined
   with the default `border-style: none → solid` cascade gives it a visible
   1px ring. Force border off so the paper sits flat inside the panel without
   competing with the breadcrumb / sidebar lines. */
body.book-viewer #mockTurtle {
    border: none !important;
}

/* ============================================================================
   Tab scroller buttons (left/right) — appear when tab strip overflows
   ============================================================================
   ExtJS injects .x-tab-scroller-left / .x-tab-scroller-right when the tab
   strip is wider than its container, with inline `position: absolute`,
   `left: 0` or `right: 0`, and `height` matching the header. We MUST NOT
   override those layout properties — only restyle the visual chrome.

   The default ExtJS sprite background paints chevron PNGs at fixed coords.
   Clear the bg-image, keep the existing positioning, paint our SVG via ::after.
   ============================================================================ */
body.book-viewer .x-tab-scroller-left,
body.book-viewer .x-tab-scroller-right {
    background-image: none !important;
    /* Solid white bg so the scroller occludes the tab beneath. Without a
       solid fill the scrolled-off tab edges show through (e.g. the
       Contents tab visible behind the left scroller). */
    background-color: #fff !important;
    border: none !important;
    width: 22px !important;
    /* No height override: ExtJS sizes the chip to the strip wrap, which
       ends exactly at the header's bottom border. Forcing it taller makes
       the opaque chip overhang and cover that border at both ends. */
    cursor: pointer !important;
    transition: background-color 0.15s !important;
    /* DO NOT override position/top/left/right — ExtJS sets these inline
       based on header dimensions and which side the scroller is on. */
}
body.book-viewer .x-tab-scroller-left {
    border-right: 1px solid var(--acs-border-light, #ecf0f6) !important;
}
body.book-viewer .x-tab-scroller-right {
    border-left: 1px solid var(--acs-border-light, #ecf0f6) !important;
}

/* Tab-strip wrap — reserve the scroller-chip gutter on each side with
   MARGIN, which is the only spacing ExtJS can account for.

   Do not use padding or an author width here. ExtJS sizes this element
   itself (`autoScrollTabs` does `tw -= wrap.getMargins('lr')` then
   `wrap.setWidth(tw)`) and then measures the same element back to decide
   how far the strip may scroll (`getScrollArea` returns `clientWidth`).
   clientWidth INCLUDES padding and ignores an author width override, so
   either one inflates the scrollable area, the right chip disables early
   and the last tab cannot be reached.

   ext-acs-theme.css zeroes this element's margins shell-wide; this rule
   outranks that on specificity, which restores the inset ExtJS expects. */
body.book-viewer #ext-acs-book-tabpanel .x-tab-scrolling .x-tab-strip-wrap {
    margin-left: 22px !important;
    margin-right: 22px !important;
}

/* Suppress the shell-wide `ul.x-tab-strip-top` border-bottom on this
   panel. The tab-panel header already carries a full-width bottom border,
   so the strip list drawing its own would double the line. */
body.book-viewer #ext-acs-book-tabpanel ul.x-tab-strip-top {
    border-bottom: none !important;
}

/* SVG glyph via ::after — absolute-positioned inside the scroller. ExtJS
   sets the scroller to position:absolute, so the pseudo positions relative
   to the scroller itself. */
body.book-viewer .x-tab-scroller-left::after,
body.book-viewer .x-tab-scroller-right::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 14px !important;
    height: 14px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
}
body.book-viewer .x-tab-scroller-left::after {
    -webkit-mask-image: var(--icon-chevron-left) !important;
            mask-image: var(--icon-chevron-left) !important;
}
body.book-viewer .x-tab-scroller-right::after {
    -webkit-mask-image: var(--icon-chevron-right) !important;
            mask-image: var(--icon-chevron-right) !important;
}

/* Hover wash + cyan glyph */
body.book-viewer .x-tab-scroller-left-over,
body.book-viewer .x-tab-scroller-right-over,
body.book-viewer .x-tab-scroller-left:hover,
body.book-viewer .x-tab-scroller-right:hover {
    background-color: var(--acs-hover-bg, #f6f8fb) !important;
}
body.book-viewer .x-tab-scroller-left-over::after,
body.book-viewer .x-tab-scroller-right-over::after,
body.book-viewer .x-tab-scroller-left:hover::after,
body.book-viewer .x-tab-scroller-right:hover::after {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Disabled state */
body.book-viewer .x-tab-scroller-left-disabled::after,
body.book-viewer .x-tab-scroller-right-disabled::after {
    background-color: var(--acs-text-tertiary, #9aa5b4) !important;
    opacity: 0.5 !important;
}
body.book-viewer .x-tab-scroller-left-disabled,
body.book-viewer .x-tab-scroller-right-disabled {
    cursor: default !important;
}
body.book-viewer .x-tab-scroller-left-disabled:hover,
body.book-viewer .x-tab-scroller-right-disabled:hover {
    background-color: transparent !important;
}
