/* Scoped reader styles. The TextLayer rules below adapt Mozilla PDF.js 6.3.289
 * web/pdf_viewer.css (Apache-2.0, see vendor/pdfjs/6.3.289/LICENSE). */
#pdf-evidence-dialog { width: calc(100vw - 24px); max-width: none; height: calc(100dvh - 24px); max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; overflow: hidden; }
#pdf-evidence-dialog[open] { display: flex; flex-direction: column; }
#pdf-evidence-dialog::backdrop { background: #152a28a6; }
.pdf-preview-header { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.pdf-preview-header h2 { font-size: 17px; margin: 0; }
.pdf-preview-header .button { flex: none; }
.pdf-preview-layout { display: grid; grid-template-columns: minmax(420px, calc(var(--pdf-reader-share, 52%) - 5px)) 10px minmax(420px, 1fr); flex: 1; min-height: 0; }
#pdf-divider { background: #e9f0ed; cursor: col-resize; touch-action: none; position: relative; }
#pdf-divider::after { content: ''; position: absolute; width: 3px; height: 44px; border-radius: 3px; background: #9fb8af; left: 3px; top: calc(50% - 22px); }
#pdf-divider:is(:hover,:focus-visible,.dragging) { background: #c9e1d7; }
.pdf-field-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 9px 14px; border-bottom: 1px solid var(--line); background: #f0f7f4; font-size: 12px; }
.pdf-field-nav label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pdf-field-nav select { min-width: 130px; max-width: 320px; width: min(35vw,320px); }
.pdf-field-nav :is(select,button), .field-source-button { border: 1px solid #b9d2c8; border-radius: 6px; background: #fff; color: #176e5b; padding: 6px 9px; min-height: 34px; font: inherit; cursor: pointer; }
.pdf-field-nav button { margin-left: auto; }
.pdf-field-nav button:disabled { cursor: default; opacity: .5; }
.field-source-button { display: block; margin: 8px 0; font-size: 12px; white-space: nowrap; }
.field-source-button:hover { background: #e0f2e9; }
.field-review-row.pdf-active-field > th { box-shadow: inset 4px 0 #187561; background: #edf7f1; }
#pdf-field-evidence-note { font-size: 11px; color: #735720; line-height: 1.5; margin: 6px 0; }
#pdf-field-evidence-note:empty { display: none; }
#pdf-show-all-evidence { font-size: 11px; padding: 3px 7px; margin-bottom: 5px; }
#pdf-match-explanation { font-size: 11px; color: #63746c; margin-top: 4px; }
#pdf-match-explanation summary { cursor: pointer; }
#pdf-match-detail { margin: 5px 0; line-height: 1.6; }
#pdf-reader-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f7faf9; border-right: 1px solid var(--line); }
.pdf-controls { flex: none; padding: 12px 14px 7px; max-height: 47%; overflow: auto; }
.pdf-controls label { font-size: 12px; color: #405c56; }
.pdf-file-label, .pdf-evidence-label { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.pdf-file-label select, .pdf-evidence-label select { flex: 1; min-width: 0; text-overflow: ellipsis; }
.pdf-controls select, .pdf-controls input, .pdf-controls button { font: inherit; border: 1px solid #bfcfc9; border-radius: 6px; background: white; color: #294840; padding: 6px 8px; min-height: 32px; }
.pdf-controls button { cursor: pointer; }
.pdf-controls button:disabled { opacity: .4; cursor: default; }
.pdf-controls :is(button,input,select):focus-visible { outline: 2px solid #187561; outline-offset: 1px; }
.pdf-navigation { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12px; margin-bottom: 8px; }
#pdf-evidence-dialog [hidden] { display: none !important; }
#pdf-tools-toggle { font-size: 12px; }
#pdf-current-source { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; color: #48665d; }
#pdf-page-number { width: 56px; padding: 5px; }
#pdf-zoom { margin-left: auto; }
.pdf-quote-details { font-size: 12px; margin: 4px 0 7px; }
.pdf-quote-details summary { cursor: pointer; }
#pdf-anchor { margin: 5px 0; color: #80612e; }
#pdf-quote { margin: 0; padding: 7px; max-height: 110px; overflow: auto; white-space: pre-wrap; border-left: 3px solid #a1c8bd; line-height: 1.6; }
#pdf-search-form { display: flex; gap: 6px; }
#pdf-search-input { flex: 1; min-width: 0; font-size: 12px; }
#pdf-match-status { font-size: 12px; line-height: 1.5; margin-top: 8px; padding: 7px 8px; border-radius: 5px; background: #e9f0f8; }
#pdf-match-status[data-kind="success"] { background: #e2f3eb; color: #125843; }
#pdf-match-status[data-kind="warning"] { background: #fff1d5; color: #76531d; }
#pdf-match-list { max-height: 135px; overflow: auto; }
#pdf-match-list .pdf-match-choice { display: block; text-align: left; width: 100%; margin-top: 5px; font-size: 12px; line-height: 1.5; }
#pdf-match-list .pdf-match-choice[aria-current="true"] { background: #e2f3eb; border-color: #187561; }
#pdf-match-results { margin-top: 7px; font-size: 12px; }
#pdf-match-results summary { cursor: pointer; color: #486354; padding: 5px 0; }
#pdf-match-nav { display: flex; align-items: center; gap: 8px; padding-top: 5px; font-size: 12px; }
#pdf-match-nav button { flex: 1; }
#pdf-render-status { padding: 5px 14px; min-height: 26px; color: #40685b; font-size: 12px; }
#pdf-viewport { flex: 1; min-height: 80px; overflow: auto; background: #dfe5e3; padding: 16px; overscroll-behavior: contain; }
#pdf-page { position: relative; margin: 0 auto; background: white; box-shadow: 0 1px 5px #233c3830; --scale-round-x: 1px; --scale-round-y: 1px; }
#pdf-page canvas { display: block; }
#pdf-source-note { flex: none; font-size: 11px; line-height: 1.5; margin: 0; padding: 7px 14px; color: #647a73; }
.pdf-source-details { flex: none; font-size: 11px; color: #48665d; padding: 5px 14px; }
.pdf-source-details summary { cursor: pointer; }
.pdf-source-details #pdf-source-note { padding: 5px 0; }
.pdf-review-shortcuts { flex: none; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #f7faf9; }
.pdf-review-shortcuts nav { display: flex; gap: 6px; }
.pdf-review-shortcuts button { flex: 1; border: 1px solid #bfcfc9; border-radius: 6px; background: white; color: #294840; min-height: 36px; font: inherit; font-size: 12px; cursor: pointer; }
.pdf-review-shortcuts button[aria-current="location"] { background: #e2f3eb; border-color: #187561; }
.pdf-review-shortcuts button:disabled { opacity: .4; cursor: default; }
#pdf-draft-feedback { display: block; font-size: 12px; color: #386455; line-height: 1.5; padding-top: 5px; }
#pdf-review-pane .final-value-input { min-height: 200px; max-height: 45dvh; font-size: 14px; line-height: 1.65; }
#pdf-evidence-dialog :is(button,summary,select,input,textarea,[tabindex]):focus-visible { outline: 2px solid #187561; outline-offset: 2px; }
#pdf-review-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#pdf-review-pane #drawer-body { flex: 1; min-height: 0; }
#pdf-review-pane #drawer-footer { flex: none; flex-wrap: wrap; }
#pdf-review-pane .evidence-preview-entry { display: none; }
#pdf-review-pane .candidate-grid { grid-template-columns: minmax(0, 1fr); }
.pdf-mobile-tabs { display: none; }
.evidence-preview-entry { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; padding: 10px 12px; background: #eff7f4; border: 1px solid #d4e4de; border-radius: 8px; }
.evidence-preview-entry p { font-size: 12px; margin: 0; color: #557468; }
.evidence-item .pdf-evidence-button { margin-top: 8px; }
#pdf-page .textLayer { color-scheme: only light; position: absolute; text-align: initial; inset: 0; overflow: clip; opacity: 1; line-height: 1; letter-spacing: normal; word-spacing: normal; text-size-adjust: none; forced-color-adjust: none; transform-origin: 0 0; caret-color: CanvasText; z-index: 1; --min-font-size: 1; --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size)); --min-font-size-inv: calc(1 / var(--min-font-size)); }
#pdf-page .textLayer :is(span, br) { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; user-select: text; }
#pdf-page .textLayer > :not(.markedContent), #pdf-page .textLayer .markedContent span:not(.markedContent) { z-index: 1; --font-height: 0; font-size: calc(var(--text-scale-factor) * var(--font-height)); --scale-x: 1; --rotate: 0deg; transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv)); }
#pdf-page .textLayer .markedContent { display: contents; }
#pdf-page .textLayer ::selection { background: #507bec55; color: transparent; }
#pdf-page .textLayer[data-main-rotation="90"] { transform: rotate(90deg) translateY(-100%); }
#pdf-page .textLayer[data-main-rotation="180"] { transform: rotate(180deg) translate(-100%, -100%); }
#pdf-page .textLayer[data-main-rotation="270"] { transform: rotate(270deg) translateX(-100%); }
.pdf-highlights { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.pdf-highlight { position: absolute; background: #ffca2870; box-shadow: 0 0 0 1px #c88e2c55; border-radius: 1px; }
@media (max-width: 1000px) {
  #pdf-evidence-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .pdf-preview-header { padding: 9px 12px; }
  .pdf-preview-header h2 { font-size: 15px; }
  .pdf-mobile-tabs { display: flex; flex: none; gap: 6px; padding: 7px 12px; border-bottom: 1px solid var(--line); }
  .pdf-mobile-tabs button { flex: 1; border: 0; border-radius: 6px; background: #f0f3f2; color: #405d54; padding: 9px; font: inherit; cursor: pointer; }
  .pdf-mobile-tabs button[aria-selected="true"] { background: #176e5b; color: white; }
  .pdf-preview-layout { display: flex; }
  #pdf-divider { display: none; }
  .pdf-field-nav { gap: 6px; padding: 7px 12px; }
  .pdf-field-nav label { flex: 1; }
  .pdf-field-nav select { flex: 1; max-width: none; }
  #pdf-field-progress { order: 3; flex-basis: 100%; }
  #pdf-reader-pane, #pdf-review-pane { flex: 1; border: 0; }
  #pdf-evidence-dialog[data-view="pdf"] #pdf-review-pane, #pdf-evidence-dialog[data-view="review"] #pdf-reader-pane { display: none; }
  #pdf-review-pane #drawer-body { padding: 12px; }
  .pdf-controls :is(button,input,select) { min-height: 36px; }
  .pdf-review-shortcuts { padding: 7px 12px; }
}
