/* ============================================================
   PDF Markup Tool -- Phase 1 styles
   Full-bleed canvas, floating glass-morphism UI bars.
   All colors via tokens defined in platform/styles.css.
   ============================================================ */

/* -- Wrapper fills the tool overlay container -- */
.pdfm-wrap {
  position: relative;
  height: 100%;
  width: 100%;
  background: var(--bg);
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  overflow: hidden;
}

/* -- Glass-morphism shared base (mirrors annotation tool) -- */
.pdfm-glass {
  background: rgba(18, 18, 22, 0.88);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  color: #f0f0f4;
}
[data-theme="light"] .pdfm-glass {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
              0 0 0 1px rgba(0, 0, 0, 0.04) inset;
  color: #1a1a2e;
}

/* -- Scroll surface fills the wrap below the ribbon. PDF + SVG sit
      inside. The ribbon is non-floating and takes its own height; the
      scroller's top inset is computed via a custom property so the
      property strip can grow when it has selection content. -- */
.pdfm-scroller {
  position: absolute;
  top: var(--pdfm-topbar-h, 44px);
  bottom: 0;
  left: var(--pdfm-sidebar-w, 280px);
  right: 0;
  overflow: auto;
  overscroll-behavior-x: contain;
  background: #232328;
  display: flex;
  align-items: flex-start;
  justify-content: safe center;
  padding: 24px 24px 56px;
  transition: left 0.18s ease;
}
[data-theme="light"] .pdfm-scroller { background: #d8d8e0; }
/* Hand tool: space held (armed) shows an open grab hand; while actually
   dragging, .pdfm-panning wins (below) and shows the closed grabbing hand. */
.pdfm-scroller.pdfm-hand,
.pdfm-scroller.pdfm-hand .pdfm-overlay {
  cursor: grab;
}
.pdfm-scroller.pdfm-panning,
.pdfm-scroller.pdfm-panning .pdfm-overlay {
  cursor: grabbing;
}

.pdfm-stage {
  position: relative;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  /* Hint the GPU that we'll be transforming this on pinch-zoom -- avoids
     a layer-promotion stutter on the first wheel event. */
  will-change: transform;
}
.pdfm-pdf-canvas {
  display: block;
  pointer-events: none;
  width: 100%;
  height: auto;
}
.pdfm-overlay {
  position: absolute;
  top: 0; left: 0;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}
.pdfm-overlay[data-tool="text_callout"],
.pdfm-overlay[data-tool="arrow"] {
  cursor: crosshair;
}
.pdfm-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 13px;
  pointer-events: none;
}
.pdfm-loading[hidden] { display: none; }

.pdfm-place-pill {
  position: absolute;
  top: calc(var(--pdfm-topbar-h, 44px) + 12px);
  left: calc(var(--pdfm-sidebar-w, 280px) + (100% - var(--pdfm-sidebar-w, 280px)) / 2);
  transform: translateX(-50%);
  z-index: 13;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: min(620px, calc(100% - var(--pdfm-sidebar-w, 280px) - 32px));
  min-width: 0;
  padding: 6px 8px 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  box-sizing: border-box;
  pointer-events: auto;
}
.pdfm-place-pill[hidden] { display: none; }
.pdfm-wrap:not(:has(> .pdfm-sidebar)) .pdfm-place-pill {
  left: 50%;
  max-width: calc(100% - 32px);
}
.pdfm-wrap.pdfm-desk-hosted .pdfm-place-pill {
  top: 12px;
}
.pdfm-place-pill-copy {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}
.pdfm-place-pill-prefix {
  flex: none;
  font-weight: 650;
}
.pdfm-place-pill-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
}
.pdfm-place-pill-key {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text-secondary);
  font: inherit;
  font-size: 11px;
  line-height: 1.4;
}
.pdfm-place-pill-cancel {
  appearance: none;
  flex: none;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
}
.pdfm-place-pill-cancel:hover,
.pdfm-place-pill-cancel:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.pdfm-place-ghost {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: min(260px, calc(100% - 24px));
  min-height: 38px;
  max-height: 58px;
  padding: 8px 10px;
  box-sizing: border-box;
  border: 1px dashed var(--accent-line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text-primary);
  opacity: 0.72;
  pointer-events: none;
  overflow: hidden;
}
.pdfm-place-ghost[hidden] { display: none; }
.pdfm-place-ghost.is-blank {
  width: 220px;
  min-height: 36px;
}
.pdfm-place-ghost.is-arrow {
  width: 0;
  min-height: 0;
  max-height: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--strata-markup-primary);
  opacity: 0.42;
  overflow: visible;
}
.pdfm-place-ghost-arrow {
  position: absolute;
  display: block;
  overflow: visible;
}
.pdfm-place-ghost-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.pdfm-inline-editor {
  position: absolute;
  box-sizing: border-box;
  border: 1.5px solid var(--accent);
  background: #fff;
  color: #111;
  padding: 3px;
  font-size: 14px;
  font-family: Helvetica, Arial, sans-serif;
  resize: none;
  outline: none;
  z-index: 10;
}

/* -- Slim top bar (title + actions only) ---------------------------- */
.pdfm-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  z-index: 12;
  height: 44px;
  box-sizing: border-box;
}
.pdfm-topbar-spacer { flex: 1; }
.pdfm-sidebar-toggle {
  /* Inherits .pdfm-iconbtn but slightly larger so it reads as the
     primary chrome control. */
  width: 30px;
  height: 30px;
}
.pdfm-title {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.7;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdfm-title:empty { display: none; }
.pdfm-subtitle {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.55;
  white-space: nowrap;
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 1px solid currentColor;
  padding-left: 8px;
  margin-left: 2px;
}
.pdfm-subtitle:empty { display: none; }
.pdfm-dirty-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  align-self: center;
}
.pdfm-dirty-dot[hidden] { display: none; }

/* -- Sidebar (Bluebeam Tool Chest) --------------------------------- */
.pdfm-sidebar {
  position: absolute;
  top: var(--pdfm-topbar-h, 44px);
  left: 0;
  bottom: 0;
  width: var(--pdfm-sidebar-w, 280px);
  z-index: 11;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.18s ease;
}
[data-theme="light"] .pdfm-sidebar { border-top-color: rgba(0, 0, 0, 0.04); }
/* The sidebar uses a fixed-top / scrolling-bottom layout so the tool
   buttons and the active-tool format card stay visible while the
   chip sections scroll independently below. */
.pdfm-sidebar-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 10px 10px 0;
  gap: 12px;
}
/* Top-fixed cluster: search + tools + format card. */
.pdfm-sidebar-search,
.pdfm-sidebar-tools-section,
.pdfm-sidebar-format {
  flex: none;
}
/* Chip sections take the remaining height and scroll. */
.pdfm-sidebar-sections {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 16px;
}
.pdfm-callout-popover {
  display: contents;
}
.pdfm-callout-trigger,
.pdfm-recent-stock {
  display: none;
}
.pdfm-sidebar-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -3px;
  width: 6px;
  cursor: ew-resize;
  z-index: 12;
}
.pdfm-sidebar-resizer:hover {
  background: linear-gradient(to right,
    transparent, var(--accent), transparent);
  opacity: 0.4;
}
.pdfm-wrap.pdfm-sidebar-collapsed .pdfm-sidebar-resizer { cursor: pointer; }
.pdfm-wrap.pdfm-sidebar-collapsed .pdfm-sidebar-search,
.pdfm-wrap.pdfm-sidebar-collapsed .pdfm-sidebar-section-label,
.pdfm-wrap.pdfm-sidebar-collapsed .pdfm-sidebar-format,
.pdfm-wrap.pdfm-sidebar-collapsed .pdfm-sb-section,
.pdfm-wrap.pdfm-sidebar-collapsed .pdfm-tool-label {
  display: none;
}
.pdfm-wrap.pdfm-sidebar-collapsed .pdfm-tool {
  width: 32px;
  padding: 0;
  justify-content: center;
}
.pdfm-wrap.pdfm-sidebar-collapsed .pdfm-tools {
  align-items: center;
}
.pdfm-wrap.pdfm-sidebar-collapsed .pdfm-sidebar-inner {
  padding: 10px 6px;
}

.pdfm-wrap:not(:has(> .pdfm-sidebar)) .pdfm-scroller {
  left: 0;
}
.pdfm-wrap:not(:has(> .pdfm-sidebar)) .pdfm-sidebar-toggle {
  display: none;
}
.pdfm-wrap:not(:has(> .pdfm-sidebar)) .pdfm-propfloat {
  left: 50%;
  max-width: calc(100% - 32px);
}
.pdfm-wrap:not(:has(> .pdfm-sidebar)) .pdfm-pagebar {
  left: 16px;
}
.pdfm-wrap.pdfm-desk-hosted .pdfm-topbar {
  display: none;
}
.pdfm-wrap.pdfm-desk-hosted .pdfm-scroller {
  top: 0;
}
[data-sc-markup-chrome]:has(> .pdfm-sidebar.pdfm-chrome-hosted) {
  position: relative;
  z-index: 40;
  overflow: visible;
}
.pdfm-sidebar.pdfm-chrome-hosted {
  position: static;
  top: auto;
  left: auto;
  bottom: auto;
  width: auto;
  height: auto;
  z-index: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  transition: none;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-sidebar-inner {
  display: flex;
  flex: 0 1 auto;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: visible;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-sidebar-tools-section {
  order: 1;
  flex: none;
  display: flex;
  align-items: center;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-sidebar-section-label {
  display: none;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-tools {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-tool {
  width: 32px;
  min-height: 32px;
  padding: 0;
  justify-content: center;
  gap: 0;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-tool-label {
  display: none;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-sidebar-format {
  order: 3;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 280px;
  overflow: hidden;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-format-card {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-format-title,
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-fld-hint {
  display: none;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-format-body,
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-fld {
  flex-direction: row;
  align-items: center;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-callout-popover {
  order: 4;
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-callout-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-callout-trigger:hover,
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-callout-trigger.is-armed,
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-callout-popover.is-open .pdfm-callout-trigger {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-callout-trigger.is-armed {
  box-shadow: 0 0 0 1px var(--accent-line) inset;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-sidebar-sections {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  max-height: min(440px, calc(100vh - 180px));
  min-height: 0;
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  z-index: 45;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-callout-popover.is-open .pdfm-sidebar-sections {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-sidebar-sections > .pdfm-sidebar-search {
  position: sticky;
  top: 0;
  z-index: 1;
  display: block;
  flex: none;
  width: auto;
  margin: -10px -10px 0;
  padding: 10px 10px 8px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-sidebar-sections > .pdfm-sidebar-search input {
  width: 100%;
  min-width: 0;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-sb-section {
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  gap: 8px;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-sb-section-header {
  flex: none;
  padding: 2px 2px 4px;
  white-space: nowrap;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-sb-section.is-expanded .pdfm-sb-section-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-callout-popover .pdfm-chip {
  flex: 0 0 auto;
  width: 100%;
  padding: 7px 9px;
  gap: 2px;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-chip-preview {
  white-space: nowrap;
  -webkit-line-clamp: 1;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-chip-label,
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-chip-empty {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-sidebar-resizer {
  display: none;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-recent-stock:not([hidden]) {
  order: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-recent-label {
  flex: none;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-recent-chip-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 1px;
}
.pdfm-sidebar.pdfm-chrome-hosted .pdfm-recent-stock .pdfm-chip {
  flex: 0 0 auto;
  width: 128px;
  min-height: 32px;
  padding: 4px 7px;
  gap: 1px;
}

.pdfm-sidebar-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.55;
  margin-bottom: 6px;
}
.pdfm-sidebar-search input {
  width: 100%;
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 10px;
  color: inherit;
  font: inherit;
  font-size: 12px;
  box-sizing: border-box;
}
[data-theme="light"] .pdfm-sidebar-search input {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
.pdfm-sidebar-search input:focus {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

.pdfm-tools {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pdfm-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pdfm-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
[data-theme="light"] .pdfm-btn-ghost:hover { background: rgba(0, 0, 0, 0.05); }
.pdfm-btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pdfm-btn-primary:hover { filter: brightness(1.08); }

/* -- Tool buttons (full-width rows inside the sidebar) -------------- */
.pdfm-tool {
  appearance: none;
  background: transparent;
  border: none;
  color: inherit;
  width: 100%;
  min-height: 30px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border-radius: 5px;
  cursor: pointer;
  opacity: 0.85;
  font: inherit;
  font-size: 12px;
  text-align: left;
  transition: background 0.15s, opacity 0.15s;
}
.pdfm-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: none;
}
.pdfm-tool-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdfm-tool:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }
[data-theme="light"] .pdfm-tool:hover { background: rgba(0, 0, 0, 0.05); }
.pdfm-tool.is-active {
  background: var(--accent);
  color: var(--strata-markup-fill);
  opacity: 1;
}

/* -- Format card (active tool's options inside the sidebar) -------- */
.pdfm-sidebar-format:empty { display: none; }
.pdfm-format-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
[data-theme="light"] .pdfm-format-card {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.08);
}
.pdfm-format-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
}
.pdfm-format-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pdfm-fld {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pdfm-fld-label {
  font-size: 11px;
  opacity: 0.75;
}
.pdfm-fld-hint {
  font-size: 11px;
  opacity: 0.55;
  font-style: italic;
  margin: 2px 0 0;
}

/* -- Sidebar template sections + chips ----------------------------- */
.pdfm-sidebar-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pdfm-sb-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pdfm-sb-section-header {
  appearance: none;
  background: transparent;
  border: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font: inherit;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.65;
  cursor: pointer;
  text-align: left;
}
.pdfm-sb-section-header:hover { opacity: 0.9; }
.pdfm-sb-section-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.pdfm-sb-section.is-expanded .pdfm-sb-section-caret {
  transform: rotate(90deg);
}
.pdfm-sb-section-body {
  display: none;
  flex-direction: column;
  gap: 4px;
}
.pdfm-sb-section.is-expanded .pdfm-sb-section-body { display: flex; }

.pdfm-chip {
  appearance: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background 0.12s, border-color 0.12s;
}
[data-theme="light"] .pdfm-chip {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.08);
}
.pdfm-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}
[data-theme="light"] .pdfm-chip:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
}
.pdfm-chip.is-active:not(.is-armed) {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  box-shadow: 0 0 0 1px var(--accent-line) inset;
}
.pdfm-chip.is-armed {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--strata-markup-fill);
}
.pdfm-chip-preview {
  font-size: 11.5px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pdfm-chip-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
}
.pdfm-chip.is-armed .pdfm-chip-label { opacity: 0.85; }
.pdfm-chip-empty {
  font-size: 11px;
  opacity: 0.55;
  padding: 6px 8px;
}
/* Section subheader within the stock-note chip list (grouped library).
   Reads as a quiet trade-section label above its chips. */
.pdfm-chip-group-header {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.5;
  padding: 8px 2px 2px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
/* First group header has no divider above it. */
.pdfm-chip-blank + .pdfm-chip-group-header {
  border-top: none;
  margin-top: 0;
  padding-top: 2px;
}
/* Synthetic "Blank callout" chip: dashed border so it visually reads as
   "not a real template, just a starting point." */
.pdfm-chip-blank {
  border-style: dashed;
}
.pdfm-chip-blank.is-armed {
  border-style: solid;
}
.pdfm-chip-preview-blank {
  font-style: italic;
  opacity: 0.85;
}

/* -- Tool-options strip (the contextual middle region) ------------- */
.pdfm-quick-section {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.pdfm-quick-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
}
.pdfm-quick-hint {
  font-size: 11px;
  opacity: 0.55;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdfm-quick-select {
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 4px 24px 4px 8px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  max-width: 240px;
}
[data-theme="light"] .pdfm-quick-select {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}
.pdfm-quick-select:focus { outline: 1px solid var(--accent); outline-offset: 1px; }
.pdfm-template-preview-inline {
  font-size: 11px;
  opacity: 0.7;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Segmented control (used in quick + ctxbar) */
.pdfm-seg {
  display: inline-flex;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
[data-theme="light"] .pdfm-seg { border-color: rgba(0, 0, 0, 0.12); }
.pdfm-seg button {
  appearance: none;
  background: transparent;
  border: none;
  color: inherit;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .pdfm-seg button { border-right-color: rgba(0, 0, 0, 0.08); }
.pdfm-seg button:last-child { border-right: none; }
.pdfm-seg button:hover { background: rgba(255, 255, 255, 0.08); }
[data-theme="light"] .pdfm-seg button:hover { background: rgba(0, 0, 0, 0.05); }
.pdfm-seg button.is-active {
  background: var(--accent);
  color: #fff;
}

/* Template picker (party-confirmation + stock-note popovers).
   Lives inside the .pdfm-quick popover. Each item is a vertically-stacked
   button with a label and a one-line preview of the snapshot text. The
   active (armed) item gets the accent treatment. */
.pdfm-template-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 320px;
  overflow-y: auto;
  width: 240px;
}
.pdfm-template-item {
  appearance: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  border-radius: 4px;
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font: inherit;
}
[data-theme="light"] .pdfm-template-item {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.08);
}
.pdfm-template-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}
[data-theme="light"] .pdfm-template-item:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
}
.pdfm-template-item.is-active {
  background: var(--accent);
  border-color: var(--accent);
  /* --strata-markup-fill resolves to white in both themes; same treatment
     used by other accent-on-light controls in the tool. */
  color: var(--strata-markup-fill);
}
.pdfm-template-label {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdfm-template-preview {
  font-size: 10px;
  opacity: 0.65;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdfm-template-item.is-active .pdfm-template-preview { opacity: 0.85; }
.pdfm-template-empty {
  font-size: 11px;
  opacity: 0.65;
  padding: 8px 4px;
  width: 240px;
}
.pdfm-template-hint { padding-bottom: 4px; }
.pdfm-inline-editor-single {
  white-space: nowrap;
}

/* Refresh-from-template diff modal -- two side-by-side text panes so the
   designer can compare wording before accepting the template change.
   Lives inside the platform .strata-modal so we don't restyle the chrome. */
.pdfm-diff-intro {
  font-size: 13px;
  margin: 0 0 12px;
  opacity: 0.85;
}
.pdfm-diff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.pdfm-diff-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pdfm-diff-col-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
}
.pdfm-diff-text {
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.45;
  background: var(--input-bg);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 320px;
  overflow-y: auto;
  color: var(--text-primary);
}
.pdfm-diff-template { border-color: var(--success, #34d399); }
.pdfm-diff-instance { border-color: var(--warning, #fbbf24); }

/* Phase 3: review counter + diff toggle in the topbar. Counter sits between
   the title's dirty dot and the action buttons. */
.pdfm-review-counter {
  font-size: 11px;
  opacity: 0.75;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pdfm-review-counter[hidden] { display: none; }
.pdfm-btn-diff[hidden] { display: none; }
.pdfm-btn-diff.is-active {
  background: var(--accent);
  color: var(--strata-markup-fill);
  border-color: var(--accent);
}

/* Phase 3 review panel -- right-side drawer. Lists markups flagged by
   whitespace detection; tap a row to jump to the markup, click the o/x
   marker to toggle reviewed state. */
.pdfm-review-panel {
  position: absolute;
  top: calc(var(--pdfm-topbar-h, 44px) + 8px);
  right: 16px;
  width: 280px;
  max-height: calc(100% - var(--pdfm-topbar-h, 44px) - 80px);
  display: flex;
  flex-direction: column;
  z-index: 11;
  padding: 0;
  overflow: hidden;
}
.pdfm-review-panel[hidden] { display: none; }
.pdfm-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .pdfm-review-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
.pdfm-review-title {
  font-size: 12px;
  font-weight: 600;
}
.pdfm-review-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  overflow-y: auto;
  flex: 1;
}
.pdfm-review-empty {
  padding: 10px 12px;
  font-size: 11px;
  opacity: 0.7;
}
.pdfm-review-actions {
  padding: 6px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
}
[data-theme="light"] .pdfm-review-actions {
  border-top-color: rgba(0, 0, 0, 0.06);
}
.pdfm-flagged-row {
  appearance: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  border-radius: 4px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
[data-theme="light"] .pdfm-flagged-row {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.08);
}
.pdfm-flagged-row:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}
[data-theme="light"] .pdfm-flagged-row:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
}
.pdfm-flagged-row.is-reviewed {
  opacity: 0.55;
}
.pdfm-flagged-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}
.pdfm-flagged-snippet {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}
.pdfm-flagged-toggle {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  align-self: center;
  font-family: monospace;
  font-size: 12px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .pdfm-flagged-toggle {
  background: rgba(0, 0, 0, 0.04);
}
.pdfm-flagged-row.is-reviewed .pdfm-flagged-toggle {
  background: var(--success, #34d399);
  color: var(--strata-markup-fill);
}

/* Side-by-side diff layout. .pdfm-stage-diff signals the layout switch;
   the original canvas + overlay stay anchored on the right, and the
   .pdfm-diff-old block (containing canvas + readonly SVG overlay) renders
   to the left. The wrapper uses inline-flex so widths sum naturally. */
.pdfm-stage.pdfm-stage-diff {
  display: inline-flex;
  flex-direction: row;
  gap: 8px;
  background: transparent;
  box-shadow: none;
}
.pdfm-stage.pdfm-stage-diff > .pdfm-pdf-canvas,
.pdfm-stage.pdfm-stage-diff > .pdfm-overlay,
.pdfm-stage.pdfm-stage-diff > .pdfm-loading {
  /* Right pane: editable -- detach from stage's flex layout so canvas +
     overlay continue to share the same coordinate space. */
  position: relative;
  order: 2;
}
.pdfm-stage.pdfm-stage-diff > .pdfm-overlay {
  /* Overlay must keep absolute positioning over canvas. Stage now has two
     blocks; the editable canvas + overlay form the right block. We wrap
     them via order to preserve stacking. */
  position: absolute;
}
.pdfm-diff-old {
  position: relative;
  order: 1;
  background: var(--strata-markup-fill);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  display: inline-block;
}
.pdfm-diff-old canvas {
  display: block;
}
.pdfm-diff-old-overlay {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
}
.pdfm-diff-old-missing {
  padding: 32px;
  font-size: 12px;
  opacity: 0.7;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 6px;
}

/* Direction pad */
.pdfm-dirpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 96px;
}
.pdfm-dirpad button {
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  border-radius: 3px;
  height: 28px;
  font-size: 14px;
  cursor: pointer;
}
[data-theme="light"] .pdfm-dirpad button {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
.pdfm-dirpad button:hover { background: rgba(255, 255, 255, 0.12); }
[data-theme="light"] .pdfm-dirpad button:hover { background: rgba(0, 0, 0, 0.08); }
.pdfm-dirpad button.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* -- Bottom contextual properties bar ------------------------------
   Floats above the canvas, fixed at bottom-center of the canvas region
   (which excludes the sidebar). Hidden until a markup is selected via
   the [hidden] attribute set by properties.js. Inner layout is the
   existing .pdfm-ctx-* DSL -- unchanged. */
.pdfm-propfloat {
  position: absolute;
  bottom: 16px;
  left: calc(var(--pdfm-sidebar-w, 280px) + (100% - var(--pdfm-sidebar-w, 280px)) / 2);
  transform: translateX(-50%);
  z-index: 14;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
  max-width: calc(100% - var(--pdfm-sidebar-w, 280px) - 32px);
  transition: left 0.18s ease;
}
.pdfm-propfloat[hidden] { display: none; }
/* Slide left when the sidebar collapses so the bar stays centered over
   the visible canvas region. */
.pdfm-wrap.pdfm-sidebar-collapsed .pdfm-propfloat {
  left: calc(52px + (100% - 52px) / 2);
  max-width: calc(100% - 52px - 32px);
}
.pdfm-ctx-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .pdfm-ctx-group { border-right-color: rgba(0, 0, 0, 0.08); }
.pdfm-ctx-group:last-of-type { border-right: none; padding-right: 0; }
.pdfm-ctx-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
}
.pdfm-ctx-num {
  appearance: none;
  width: 50px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
  font-family: inherit;
}
[data-theme="light"] .pdfm-ctx-num {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}
.pdfm-ctx-iconbtn {
  appearance: none;
  background: transparent;
  border: none;
  color: inherit;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
}
.pdfm-ctx-iconbtn:hover {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
  color: var(--error, #f87171);
}
[data-theme="light"] .pdfm-ctx-iconbtn:hover { background: rgba(0, 0, 0, 0.05); }
.pdfm-ctx-multi { font-size: 12px; opacity: 0.85; }
.pdfm-ctx-actions { display: contents; }

/* -- A1: approval flag + party input on text callouts -------------- */
.pdfm-ctx-approval { gap: 6px; }
.pdfm-ctx-checklabel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  opacity: 0.85;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.pdfm-ctx-check {
  accent-color: var(--accent);
  margin: 0;
  cursor: pointer;
}
.pdfm-ctx-text {
  appearance: none;
  width: 130px;
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  color: inherit;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
  font-family: inherit;
}
[data-theme="light"] .pdfm-ctx-text {
  background: var(--input-bg);
  border-color: var(--border-strong);
}
.pdfm-ctx-text:disabled { opacity: 0.4; cursor: not-allowed; }
.pdfm-ctx-text:focus { outline: 1px solid var(--accent); outline-offset: 1px; }

/* Spec Desk hosts this panel vertically in its inspector. Keep these rules
   scoped to that host so the floating properties bar stays horizontal. */
[data-sc-markup-props] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
[data-sc-markup-props] .pdfm-ctx-group {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding-right: 0;
  border-right: none;
}
/* Multi-button groups (align / distribute) are NOT single-control field
   rows -- lay the label + its icon buttons out as a wrapping flex row so
   they stay grouped instead of auto-flowing across the 72px/1fr columns. */
[data-sc-markup-props] .pdfm-ctx-group-multi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
[data-sc-markup-props] .pdfm-ctx-group-multi .pdfm-ctx-label {
  flex: 0 0 72px;
}
[data-sc-markup-props] .pdfm-ctx-label,
[data-sc-markup-props] .pdfm-ctx-checklabel {
  align-self: center;
  line-height: 1.2;
}
[data-sc-markup-props] .pdfm-ctx-seg,
[data-sc-markup-props] .pdfm-ctx-num,
[data-sc-markup-props] .pdfm-ctx-text,
[data-sc-markup-props] .pdfm-ctx-iconbtn {
  box-sizing: border-box;
  height: 28px;
}
[data-sc-markup-props] .pdfm-ctx-seg,
[data-sc-markup-props] .pdfm-ctx-num,
[data-sc-markup-props] .pdfm-ctx-text {
  width: 100%;
}
[data-sc-markup-props] .pdfm-ctx-seg button {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 4px 7px;
}
[data-sc-markup-props] .pdfm-ctx-approval {
  gap: 10px;
}
[data-sc-markup-props] .pdfm-ctx-approval:has(.pdfm-ctx-check:not(:checked)) .pdfm-ctx-checklabel {
  opacity: 0.55;
}
[data-sc-markup-props] .pdfm-ctx-text:disabled {
  color: var(--text-tertiary);
  opacity: 1;
}
[data-sc-markup-props] .pdfm-ctx-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
[data-sc-markup-props] .pdfm-ctx-actions .pdfm-ctx-iconbtn {
  flex: 0 0 28px;
}

/* -- Page navigator (bottom-left, multi-page only) -- */
.pdfm-pagebar {
  position: absolute;
  bottom: 16px;
  left: calc(var(--pdfm-sidebar-w, 280px) + 16px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  z-index: 9;
  font-size: 12px;
  transition: left 0.18s ease;
}
.pdfm-pagebar[hidden] { display: none; }
.pdfm-pagelabel { font-variant-numeric: tabular-nums; padding: 0 4px; }

/* -- Zoom bar (bottom-right) -- */
.pdfm-zoombar {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  z-index: 9;
  font-size: 12px;
}
.pdfm-zoomlabel { font-variant-numeric: tabular-nums; min-width: 36px; text-align: center; padding: 0 4px; }
.pdfm-coordreadout {
  font-size: 10px;
  opacity: 0.5;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}
/* Coordinate readout is empty unless the dev-mode hash is present. The
   session writes to it directly; the empty string keeps the layout clean
   for production designers. */

.pdfm-iconbtn {
  appearance: none;
  background: transparent;
  border: none;
  color: inherit;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.pdfm-iconbtn:hover { background: rgba(255, 255, 255, 0.12); }
[data-theme="light"] .pdfm-iconbtn:hover { background: rgba(0, 0, 0, 0.05); }

/* -- Responsive: collapse some chrome on narrow viewports -- */
@media (max-width: 700px) {
  .pdfm-scroller { padding: 60px 12px 90px 60px; }
  .pdfm-quick { left: 56px; }
  .pdfm-title { max-width: 200px; }
}

/* -- Task 12: right-click Copy / Paste context menu. Body-mounted so it must
      sit above the tool overlay (8000) + fullscreen, below modal (9000) and
      toast. Reuses .pdfm-glass for the surface (both themes covered there);
      item colors come from platform tokens (no hardcoded colors). -- */
.pdfm-ctxmenu {
  position: fixed;
  z-index: 8900;
  min-width: 190px;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pdfm-ctxmenu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.pdfm-ctxmenu-item:hover,
.pdfm-ctxmenu-item:focus-visible {
  background: var(--hover-bg, rgba(127, 127, 127, 0.16));
  outline: none;
}
.pdfm-ctxmenu-label { flex: 1 1 auto; }
.pdfm-ctxmenu-kbd {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 11px;
}
