/* Generated by build-style.py from Writing integration.css and combined-ui.css.
   Edit the Writing design source, regenerate, then verify both surfaces.
   Chat owns only positioning, hidden states, touch targets and playback state. */
#chat-reader-selection { position:fixed; z-index:1100; display:flex; align-items:center; flex-wrap:wrap; font:inherit; }
#chat-reader-selection[hidden], #chat-reader-selection button[hidden] { display:none !important; }
#chat-reader-selection button { position:relative; display:inline-flex; min-height:40px; font:inherit; line-height:1; text-decoration:none; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
#chat-reader-selection button span { line-height:1; }
#chat-reader-selection svg { fill:none; stroke:currentColor; stroke-width:1.7; }
#chat-reader-selection .chat-reader-dictionary-action::before { content:''; position:absolute; inset-inline-start:-1px; top:11px; bottom:11px; border-inline-start:1px solid #d5cec3; }
#chat-reader-selection { width:max-content !important; max-width:calc(100vw - 16px); box-sizing:border-box; gap:0 !important; padding:4px !important; border:1px solid #e8dfd5 !important; border-radius:14px !important; background:#fffcf8 !important; box-shadow:0 6px 18px #46362712,0 1px 3px #46362708 !important; }
#chat-reader-selection { transform:none !important; transition:opacity .12s ease !important; }
#chat-reader-selection > button { align-items:center; justify-content:center; height:40px !important; width:auto !important; min-width:0 !important; flex:0 0 auto !important; padding:0 12px !important; margin:0 !important; gap:6px !important; border:0 !important; border-radius:9px !important; color:#343c38 !important; background:transparent !important; font-size:13px !important; white-space:nowrap; transform:none !important; box-shadow:none !important; transition:background-color .12s !important; }
#chat-reader-selection > button svg { width:18px !important; height:18px !important; flex-shrink:0; stroke-linecap:round; stroke-linejoin:round; color:inherit !important; }
#chat-reader-selection > button span { display:inline !important; font-size:13px !important; font-weight:500; }
#chat-reader-selection > button:hover { background:#e8eee5 !important; }
#chat-reader-selection > button:active { background:#d9e3d6 !important; }
#chat-reader-selection > button:focus-visible { outline:none !important; background:#dce7d9 !important; text-decoration:underline; text-underline-offset:4px; }
@media(max-width:380px) { #chat-reader-selection > button { padding:0 8px !important; } }
html[data-theme="dark"] #chat-reader-selection {
  --sk-review-paper:#34312c;
  --sk-review-inset:#403b35;
  --sk-review-line:#655e54;
  --sk-review-ink:#eee9df;
  --sk-review-muted:#c4bdb2;
  --sk-review-green:#b9d4c5;
  --sk-review-soft:#344b3e;
}
html[data-theme="dark"] #chat-reader-selection {background:var(--sk-review-paper)!important;border-color:var(--sk-review-line)!important}
html[data-theme="dark"] #chat-reader-selection > button {color:var(--sk-review-ink)!important}
html[data-theme="dark"] #chat-reader-selection > button:is(:hover,:focus-visible) {background:var(--sk-review-inset)!important}
/* Keep Chat's real touch targets at least 44px, without invisible overlap. */
@media(max-width:767px) { #chat-reader-selection > button { min-height:44px; min-width:44px !important; } }
@media(prefers-reduced-motion:reduce) { #chat-reader-selection, #chat-reader-selection > button { transition:none !important; } }
@media(forced-colors:active) { #chat-reader-selection { border-color:CanvasText !important; } #chat-reader-selection button:focus-visible { border:2px solid Highlight !important; } }
html[data-theme="dark"] .chat-reader-dictionary {
  --dv-paper: #292b27;
  --dv-ink: #eeeae1;
  --dv-muted: #c5bdb1;
  --dv-green: #b6d4c1;
  --dv-soft: #34483b;
  --dv-line: #53574f;
  --dv-hover: #3c4038;
}
/* Keep the hidden live region inside the viewport, not below the full-height chat. */
.chat-reader-dictionary .dv-sr { position: fixed; top: 0; left: 0; }

html[data-theme="dark"] .chat-reader-dictionary .dv-visible-forms,
html[data-theme="dark"] .chat-reader-dictionary [role="tabpanel"]:focus-visible { background: var(--dv-hover); }

/* Match Writing's native text selection, including dark and forced-colour modes. */
#chat-app { --sk-selection-bg: #cbdccd; --sk-selection-text: #243d30; }
[data-theme="dark"] #chat-app { --sk-selection-bg: #526d5a; --sk-selection-text: #fffaf0; }
#chat-app .chat-message .chat-bubble::selection,
#chat-app .chat-message .chat-bubble *::selection { background: var(--sk-selection-bg) !important; color: var(--sk-selection-text) !important; }
@media (forced-colors: active) {
  #chat-app { --sk-selection-bg: Highlight !important; --sk-selection-text: HighlightText !important; }
}
