/* Docshar — PDF editor (#app): toolbar, pages, properties panel, signature pad. */

/* Toolbar buttons */
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; color: #52525b; flex-shrink: 0;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.tool-btn:hover { background: #f1f5f9; color: #18181b; }
.tool-btn:disabled { opacity: .35; pointer-events: none; }
.tool-btn[data-active="true"] { background: #eef2ff; color: #4f46e5; box-shadow: inset 0 0 0 1px #c7d2fe; }
.tool-sep { width: 1px; height: 22px; background: #e2e8f0; margin: 0 6px; flex-shrink: 0; }
#toolbar[data-disabled="true"] .needs-doc { opacity: .35; pointer-events: none; }

/* Pages */
.page-wrap { box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px -6px rgba(15,23,42,.14); outline: 1px solid rgba(15,23,42,.06); }
.page-wrap .canvas-container { position: absolute !important; inset: 0; }
.page-loader { pointer-events: none; }
.page-wrap[data-rendered="true"] .page-loader { display: none; }
/* Pages far from the viewport (PDFViewer observer) show no spinner: hundreds of off-screen spinning loaders made the browser
   recalculate styles on every frame, which slowed typing and scrolling in long documents. */
.page-wrap:not([data-near="true"]) .page-loader { display: none; }
.thumb[data-active="true"] .thumb-frame { box-shadow: 0 0 0 2px #6366f1; }
.thumb[data-active="true"] span { color: #4f46e5; }

/* Properties panel */
.prop-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #94a3b8; margin-bottom: 6px; }
.prop-input { width: 100%; height: 36px; border: 1px solid #e2e8f0; border-radius: 9px; padding: 0 10px; font-size: 13px; background: #fff; color: #27272a; }
.prop-input:focus { outline: none; border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.seg-btn { height: 34px; min-width: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #52525b; border: 1px solid #e2e8f0; background: #fff; transition: all .15s; }
.seg-btn:hover { background: #f8fafc; }
.seg-btn[data-on="true"] { background: #eef2ff; border-color: #a5b4fc; color: #4338ca; }
.swatch { width: 22px; height: 22px; border-radius: 9999px; box-shadow: inset 0 0 0 1px rgba(15,23,42,.15); transition: transform .12s; }
.swatch:hover { transform: scale(1.12); }
.swatch[data-on="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6366f1; }
/* "No highlight" swatch: white with a red diagonal */
.swatch-none { background: linear-gradient(135deg, #fff 45%, #ef4444 45%, #ef4444 55%, #fff 55%); }
/* Word-style formatting rows (text boxes): wrap instead of overflowing a narrow panel */
.fmt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fmt-sep { width: 1px; height: 24px; background: #e2e8f0; margin: 0 2px; }
.fmt-select { flex: 1 1 110px; width: auto; min-width: 0; height: 34px; padding: 0 8px; }
body.df-painting .canvas-container canvas { cursor: copy !important; }

/* Signature pad */
#sigPad { touch-action: none; cursor: crosshair; }

/* Find & replace */
.find-btn { width: 32px; height: 32px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #52525b; transition: background-color .15s, color .15s; }
.find-btn:hover { background: #f1f5f9; color: #18181b; }
.find-btn:disabled { opacity: .35; pointer-events: none; }
.find-btn[data-on="true"] { background: #eef2ff; color: #4f46e5; box-shadow: inset 0 0 0 1px #c7d2fe; }
#findToggleReplace svg { transition: transform .15s; transform: rotate(-90deg); }
#findToggleReplace[data-on="true"] svg { transform: none; }
#findInput::-webkit-search-cancel-button { display: none; }
.find-hl { position: absolute; z-index: 6; pointer-events: none; border-radius: 2px; background: rgba(250, 204, 21, .38); mix-blend-mode: multiply; }
.find-hl.current { background: rgba(249, 115, 22, .45); box-shadow: 0 0 0 2px rgba(249, 115, 22, .9); }

/* Signature upload preview: checkerboard shows what became transparent */
.sig-checker {
  background-color: #fff;
  background-image: linear-gradient(45deg, #f1f5f9 25%, transparent 25%), linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f1f5f9 75%), linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

/* Phone navigation pill: only on small screens, only with a document */
#mobileNav { display: none; }

/* Touch screens: bigger targets */
@media (pointer: coarse) {
  .tool-btn { width: 42px; height: 42px; }
  .find-btn { width: 38px; height: 38px; }
  .swatch { width: 28px; height: 28px; }
  .seg-btn { height: 40px; min-width: 40px; }
}

/* Phones */
@media (max-width: 639px) {
  #app > header { gap: 8px; }
  .mobile-hide { display: none !important; }
  #mobileNav[data-on="true"] { display: flex; }
  #mobileNav .tool-btn { width: 40px; height: 40px; }
  #pages { padding: 16px 10px 96px !important; }

  /* Properties panel becomes a bottom sheet */
  #props {
    position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: 58vh; z-index: 46;
    border-left: 0; border-top: 1px solid #e2e8f0; border-radius: 18px 18px 0 0;
    box-shadow: 0 -16px 40px -12px rgba(15, 23, 42, .28);
    padding-bottom: env(safe-area-inset-bottom);
  }
  #props::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: #cbd5e1; margin: 8px auto 0; }
  /* Thumbnails slide over the stage instead of squeezing it */
  #sidebar { position: absolute; left: 0; top: 0; bottom: 0; z-index: 25; box-shadow: 12px 0 32px -12px rgba(15, 23, 42, .3); }
}

/* ---------- Font picker (properties panel) ---------- */
.font-picker { position: relative; }
.font-picker-btn { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.font-picker-name { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-pop { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 16px 36px -12px rgba(15,23,42,.28); overflow: hidden; }
.font-pop[hidden] { display: none; }
.font-pop-search { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid #f1f5f9; color: #94a3b8; }
.font-pop-search input { flex: 1; min-width: 0; height: 30px; border: 0; outline: none; font-size: 13px; color: #27272a; background: transparent; }
.font-list { max-height: 300px; overflow-y: auto; padding: 4px; margin: 0; list-style: none; }
.font-list li[role="option"] { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.font-list li[role="option"]:hover, .font-list li.is-active { background: #eef2ff; }
.font-list li[aria-selected="true"] { box-shadow: inset 3px 0 0 #6366f1; }
.font-prev { display: block; max-width: 100%; background-image: url(../vendor/fonts/pdf/previews.png); background-repeat: no-repeat; background-size: auto; }
.font-prev-text { font-size: 15px; color: #18181b; }
.font-sub { font-size: 10.5px; color: #94a3b8; line-height: 1.3; }
.font-empty { padding: 12px; font-size: 12.5px; color: #64748b; }
.seg-btn:disabled { opacity: .35; cursor: not-allowed; }

/* =====================================================================
 * Ribbon (Word-style Home / Insert / Draw / View) — #toolbar.rb, built in index.html, driven by js/editor.js Ribbon
 * ===================================================================== */
.rb { flex-shrink: 0; background: #fff; border-bottom: 1px solid #e2e8f0; display: flex; flex-direction: column; min-width: 0; }
.rb-top { height: 34px; display: flex; align-items: center; gap: 2px; padding: 0 6px; background: #f8fafc; border-bottom: 1px solid #eef2f7; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.rb-top::-webkit-scrollbar { height: 0; }
.rb .tool-btn.rb-q, .rb .tool-btn.rb-mode { width: auto; min-width: 28px; height: 28px; border-radius: 6px; padding: 0 6px; gap: 5px; font-size: 12px; font-weight: 500; }
.rb-quick { display: flex; align-items: center; gap: 1px; padding-right: 6px; margin-right: 4px; border-right: 1px solid #e2e8f0; flex-shrink: 0; }
.rb-tabs { display: flex; align-items: stretch; height: 34px; flex-shrink: 0; }
.rb-tab { position: relative; padding: 0 12px; font-size: 13px; font-weight: 500; color: #3f3f46; white-space: nowrap; border-radius: 6px 6px 0 0; }
.rb-tab:hover { background: #eef2f7; color: #18181b; }
.rb-tab[aria-selected="true"] { color: #4338ca; font-weight: 600; }
.rb-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: #4f46e5; }
.rb-modes { margin-left: auto; display: flex; align-items: center; gap: 1px; flex-shrink: 0; }
.rb-mode span { display: none; }
@media (min-width: 1180px) { .rb-mode span { display: inline; } }
.rb-mode-split { display: inline-flex; align-items: center; border-radius: 6px; }
.rb-mode-split .rb-dd { height: 28px; }
#toolbar[data-disabled="true"] .rb-body .rb-panel { opacity: .45; pointer-events: none; }

.rb-body { height: 90px; display: flex; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding: 3px 2px 0; }
.rb[data-collapsed="true"] .rb-body { display: none; }
.rb-panel { display: flex; align-items: stretch; flex-shrink: 0; }
.rb-panel[hidden] { display: none; }
.rb-group { display: flex; flex-direction: column; padding: 0 7px; border-right: 1px solid #e5e7eb; flex-shrink: 0; min-width: 0; }
.rb-group:last-child { border-right: 0; }
.rb-g { flex: 1; display: flex; align-items: center; gap: 2px; min-height: 0; }
.rb-rows { flex-direction: column; justify-content: center; align-items: flex-start; gap: 5px; }
.rb-row { display: flex; align-items: center; gap: 1px; height: 26px; }
.rb-col { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 0; }
.rb-col-wide { min-width: 96px; }
.rb-label { font-size: 11px; line-height: 15px; color: #71717a; text-align: center; white-space: nowrap; padding: 1px 0 3px; }
.rb-sep { width: 1px; height: 18px; background: #e5e7eb; margin: 0 3px; flex-shrink: 0; }

.rb-btn { height: 26px; min-width: 26px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; border-radius: 4px; color: #27272a; font-size: 12px; white-space: nowrap; flex-shrink: 0; transition: background-color .12s; }
.rb-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.rb-btn svg.w-3 { width: 11px; height: 11px; color: #71717a; }
.rb-btn:hover, .rb-big:hover, .rb-big-dd:hover, .rb-dd:hover { background: #eef2f7; }
.rb-btn[data-on="true"], .rb-big[data-on="true"], .rb .tool-btn[data-active="true"] { background: #e0e7ff; color: #3730a3; box-shadow: inset 0 0 0 1px #a5b4fc; }
.rb-btn[data-sticky="true"] { box-shadow: inset 0 0 0 2px #6366f1; }
.rb-btn:disabled, .rb-big:disabled, .rb-dd:disabled, .rb-big-dd:disabled, .rb-input:disabled, .rb-select:disabled { opacity: .38; pointer-events: none; }
.rb-lbl { justify-content: flex-start; padding: 0 8px 0 5px; gap: 6px; }
.rb-big { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 50px; height: 68px; padding: 3px 6px; border-radius: 5px; font-size: 12px; color: #27272a; white-space: nowrap; flex-shrink: 0; }
.rb-big svg { width: 24px; height: 24px; }
.rb-big[data-active="true"] { background: #e0e7ff; color: #3730a3; box-shadow: inset 0 0 0 1px #a5b4fc; }
.rb-bigsplit { display: flex; flex-direction: column; align-items: stretch; border-radius: 5px; margin-right: 2px; }
.rb-bigsplit .rb-big { height: 50px; border-radius: 5px 5px 0 0; }
.rb-big-dd { height: 18px; border-radius: 0 0 5px 5px; display: flex; align-items: center; justify-content: center; color: #52525b; }
.rb-split { display: inline-flex; align-items: center; border-radius: 4px; flex-shrink: 0; }
.rb-split .rb-btn { border-radius: 4px 0 0 4px; }
.rb-dd { height: 26px; width: 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 0 4px 4px 0; color: #71717a; flex-shrink: 0; }
.rb-dd svg { width: 11px; height: 11px; }
.rb-split:hover { box-shadow: inset 0 0 0 1px #e2e8f0; }
.rb-split-lbl .rb-btn { min-width: 70px; }
.rb-ddbtn { gap: 1px; }
.rb-glyph { font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.rb-fx { font-size: 17px; font-weight: 800; color: #fff; -webkit-text-stroke: 1.1px #2563eb; text-shadow: 1.5px 1.5px 0 rgba(0,0,0,.25); font-family: Arial, sans-serif; }
.rb-colorbtn { flex-direction: column; gap: 0; padding-top: 2px; }
.rb-colorbtn svg { width: 15px; height: 15px; }
.rb-colorbtn.rb-lbl { flex-direction: row; }
.rb-bar { display: block; width: 16px; height: 4px; border-radius: 1px; background: #ff0000; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.rb-colorbtn.rb-lbl .rb-bar { width: 4px; height: 16px; }
.rb-svg { display: inline-flex; width: 16px; height: 16px; }
.rb-svg svg { width: 16px; height: 16px; }
.rb-input { height: 24px; border: 1px solid #d4d4d8; border-radius: 3px; font-size: 12px; background: #fff; color: #18181b; }
.rb-input:focus { outline: none; border-color: #818cf8; box-shadow: 0 0 0 2px rgba(99,102,241,.18); }
.rb-fontbox { position: relative; }
.rb-font-btn { width: 136px; display: flex; align-items: center; gap: 4px; padding: 0 4px 0 6px; text-align: left; cursor: pointer; }
.rb-font-btn .font-picker-name { font-size: 13px; }
.rb-font-btn svg { width: 11px; height: 11px; color: #71717a; }
.rb-font-pop { position: fixed; z-index: 56; width: 300px; right: auto; }
.rb-sizebox { display: inline-flex; align-items: center; margin-left: 2px; }
.rb-size { width: 38px; text-align: center; border-radius: 3px 0 0 3px; padding: 0 2px; }
.rb-size-dd { height: 24px; border: 1px solid #d4d4d8; border-left: 0; border-radius: 0 3px 3px 0; background: #fff; }
.rb-select { height: 24px; border: 1px solid #d4d4d8; border-radius: 3px; font-size: 12px; padding: 0 4px; background: #fff; }
.rb-fontbox[data-disabled="true"], .rb-sizebox[data-disabled="true"], .rb-split[data-disabled="true"], .rb-gallery[data-disabled="true"] { opacity: .38; pointer-events: none; }

/* Styles gallery */
.rb-styles-group .rb-g { align-items: stretch; padding: 3px 0 1px; gap: 0; }
.rb-gallery { display: flex; flex-wrap: wrap; width: 362px; height: 64px; overflow: hidden; border: 1px solid #e5e7eb; border-radius: 4px 0 0 4px; background: #fff; }
.rb-style { width: 72px; height: 62px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 2px 6px; border: 1px solid transparent; border-radius: 3px; overflow: hidden; text-align: left; }
.rb-style:hover { border-color: #c7d2fe; background: #f8faff; }
.rb-style[aria-selected="true"] { border-color: #6366f1; background: #eef2ff; }
.rb-style-prev { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; line-height: 1.15; color: #000; }
.rb-style-name { font-size: 10.5px; color: #52525b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rb-gal-nav { display: flex; flex-direction: column; border: 1px solid #e5e7eb; border-left: 0; border-radius: 0 4px 4px 0; overflow: hidden; }
.rb-gal-btn { flex: 1; width: 16px; display: flex; align-items: center; justify-content: center; color: #52525b; }
.rb-gal-btn:hover { background: #eef2f7; }
.rb-gal-btn svg { width: 11px; height: 11px; }

/* Ribbon menus (fixed popups) */
.rb-menu { position: fixed; z-index: 55; min-width: 190px; max-width: calc(100vw - 16px); max-height: calc(100vh - 24px); overflow: auto; background: #fff; border: 1px solid #d4d4d8; border-radius: 6px; box-shadow: 0 14px 34px -10px rgba(15,23,42,.3); padding: 4px; font-size: 13px; color: #27272a; }
.rb-menu[hidden] { display: none; }
.rb-mi { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 28px; padding: 3px 10px 3px 8px; border-radius: 4px; text-align: left; white-space: nowrap; }
.rb-mi:hover, .rb-mi:focus-visible { background: #eef2ff; outline: none; }
.rb-mi[aria-checked="true"] { background: #e0e7ff; }
.rb-mi .rb-mi-ic { width: 22px; display: inline-flex; justify-content: center; color: #3f3f46; flex-shrink: 0; }
.rb-mi .rb-mi-ic svg { width: 16px; height: 16px; }
.rb-mi kbd { margin-left: auto; padding-left: 16px; font-size: 11px; color: #94a3b8; background: none; border: 0; }
.rb-mh { padding: 6px 8px 4px; font-size: 11px; font-weight: 600; color: #64748b; }
.rb-msep { height: 1px; background: #e5e7eb; margin: 4px 2px; }
.rb-sws { display: grid; grid-template-columns: repeat(10, 18px); gap: 3px; padding: 2px 8px 6px; }
.rb-sws.rb-sws-shades { gap: 0 3px; }
.rb-sw { width: 18px; height: 18px; border-radius: 1px; box-shadow: inset 0 0 0 1px rgba(15,23,42,.18); }
.rb-sw:hover, .rb-sw:focus-visible { outline: 2px solid #f59e0b; outline-offset: 0; }
.rb-sw[aria-checked="true"] { outline: 2px solid #4f46e5; }
.rb-hls { display: grid; grid-template-columns: repeat(5, 26px); gap: 4px; padding: 4px 8px 6px; }
.rb-hls .rb-sw { width: 26px; height: 20px; }
.rb-lib { display: grid; grid-template-columns: repeat(4, 58px); gap: 4px; padding: 4px 6px 6px; }
.rb-lib-item { height: 58px; border: 1px solid #e5e7eb; border-radius: 4px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 4px 6px; font-size: 12px; line-height: 1.2; color: #18181b; background: #fff; overflow: hidden; }
.rb-lib-item:hover { border-color: #818cf8; background: #f5f7ff; }
.rb-lib-item[aria-checked="true"] { border-color: #4f46e5; box-shadow: inset 0 0 0 1px #4f46e5; }
.rb-lib-item.rb-lib-none { align-items: center; color: #71717a; }
.rb-tgrid { display: grid; grid-template-columns: repeat(10, 18px); gap: 2px; padding: 4px 8px 6px; }
.rb-tcell { width: 18px; height: 18px; border: 1px solid #cbd5e1; background: #fff; }
.rb-tcell.on { background: #fde68a; border-color: #f59e0b; }
.rb-menu .rb-styles-all { display: grid; grid-template-columns: repeat(4, 72px); gap: 4px; padding: 4px; }

/* Status bar */
.sb { height: 24px; flex-shrink: 0; display: flex; align-items: center; gap: 4px; padding: 0 8px; background: #f8fafc; border-top: 1px solid #e2e8f0; font-size: 12px; color: #52525b; overflow: hidden; }
.sb[data-disabled="true"] .needs-doc { opacity: .4; pointer-events: none; }
.sb-part { display: flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; }
.sb-btn { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; color: #52525b; }
.sb-btn:hover { background: #e2e8f0; color: #18181b; }
.sb-btn:disabled { opacity: .35; pointer-events: none; }
.sb-input { width: 36px; height: 18px; text-align: center; border: 1px solid #d4d4d8; border-radius: 3px; font-size: 12px; background: #fff; -moz-appearance: textfield; }
.sb-input::-webkit-inner-spin-button { display: none; }
.sb-sep { width: 1px; height: 12px; background: #cbd5e1; margin: 0 4px; }
.sb-text { white-space: nowrap; }
.sb-range { width: 110px; accent-color: #4f46e5; height: 14px; }
.sb-select { height: 18px; font-size: 11px; border: 1px solid #d4d4d8; border-radius: 3px; background: #fff; padding: 0 2px; }

/* Word-style dialogs (Find and Replace, Sort, Paragraph) */
.wd-dialog { background: #fff; border-radius: 8px; border: 1px solid #d4d4d8; box-shadow: 0 24px 60px -16px rgba(15,23,42,.4); overflow: hidden; }
.wd-title { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px 9px 16px; border-bottom: 1px solid #eef2f7; }
.wd-title h2 { font-size: 14px; font-weight: 600; color: #18181b; }
.wd-x { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: #64748b; }
.wd-x:hover { background: #f1f5f9; }
.wd-body { padding: 14px 16px; display: grid; gap: 10px; font-size: 13px; color: #27272a; }
.wd-field { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; }
.wd-field input, .wd-select, .wd-num { height: 30px; border: 1px solid #d4d4d8; border-radius: 4px; padding: 0 8px; font-size: 13px; background: #fff; }
.wd-field input:focus, .wd-select:focus, .wd-num:focus { outline: none; border-color: #818cf8; box-shadow: 0 0 0 2px rgba(99,102,241,.18); }
.wd-num { width: 76px; }
.wd-opts { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.wd-opts label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.wd-opts input { accent-color: #4f46e5; }
.wd-row { display: flex; align-items: center; gap: 8px; }
.wd-cap { min-width: 92px; color: #3f3f46; }
.wd-head { font-weight: 600; }
.wd-static { color: #18181b; }
.wd-status { min-height: 18px; font-size: 12px; color: #4338ca; }
.wd-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 10px 16px; border-top: 1px solid #eef2f7; background: #f8fafc; }
.wd-btn { height: 30px; padding: 0 14px; border: 1px solid #d4d4d8; border-radius: 4px; font-size: 13px; background: #fff; color: #27272a; }
.wd-btn:hover { background: #f1f5f9; }
.wd-btn.wd-primary { background: #4f46e5; border-color: #4f46e5; color: #fff; font-weight: 600; }
.wd-btn.wd-primary:hover { background: #4338ca; }

/* Word-style tooltips: a bold title line and a description */
#tooltip.tip-rich { white-space: normal; max-width: 280px; padding: 8px 10px; font-weight: 400; line-height: 1.35; }
#tooltip.tip-rich b { display: block; font-weight: 600; margin-bottom: 2px; }

@media (pointer: coarse) {
  .rb .tool-btn.rb-q, .rb .tool-btn.rb-mode { min-width: 32px; height: 30px; }
  .rb-btn { min-width: 30px; }
}
@media (max-width: 899px) {
  .rb-gallery { width: 218px; }
}
@media (max-width: 639px) {
  .rb-top { padding: 0 4px; }
  .rb-tab { padding: 0 9px; }
  .sb { padding: 0 6px; }
}

.rb-fx-prev { display: inline-block; width: 18px; font: 800 16px Arial, sans-serif; text-align: center; }
.rb-fx-outline { color: transparent; -webkit-text-stroke: 1px #18181b; }
.rb-fx-shadow { text-shadow: 1.5px 1.5px 1px rgba(0,0,0,.4); }
.rb-multi-prev { display: block; font-size: 11px; line-height: 1.35; color: #3f3f46; padding: 2px 0; }
.rb-more-color { width: 28px; height: 20px; margin-left: auto; border: 0; padding: 0; background: none; cursor: pointer; }
.rb-menu .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
