@import "tailwindcss";

/* Theme colours (config/theme.ts) are applied via runtime-interpolated arbitrary classes
   `bg-[${BG_*}]`; the JIT scanner only sees the literal `bg-[${BG_*}]` template (invalid)
   and never emits the real `bg-[#......]` rule, so they are force-listed here. Every
   config/theme.ts colour is listed (covers bg/border/divide variants used across the
   editor shell, panels, modals, research and assistant surfaces app-wide).
   GUARD: __tests__/theme/tailwind_safelist.test.ts asserts every theme hex stays listed —
   adding/renaming a colour in theme.ts without updating this line fails that test. */
@source inline("bg-[#1a1a2e] bg-[#22223a] bg-[#2a2a3e] bg-[#3a3a4e] bg-[#111223] bg-[#141428] bg-[#10101f] bg-[#0f1020] bg-[#0d0e1c] border-[#3a3a4e] border-[#2a2a3e] divide-[#3a3a4e]");

/* Thin dark scrollbar matching chart style */
.styled-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 transparent;
}
.styled-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.styled-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.styled-scrollbar::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 3px;
}
.styled-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #60a5fa;
}

.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Hide number input spinners (hour/minute in date range) */
.number-no-spinner::-webkit-inner-spin-button,
.number-no-spinner::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.number-no-spinner {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Tab bar: drop target highlight when dragging */
.tab-drop-target {
  outline: 2px solid rgba(59, 130, 246, 0.8);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Native <dialog> modals are their own full-screen dark overlay via utility
   classes (fixed inset-0 bg-black/70) rather than a ::backdrop rule — a deliberate mechanism
   choice (recorded in spec Delta). That author `fixed inset-0` would override the UA default
   `dialog:not([open]) { display: none }`, so a dialog accidentally rendered while closed would
   become an invisible full-screen click-blocker; this rule restores the closed-hidden invariant
   defensively (today all dialog markup is rendered only when open). */
dialog:not([open]) {
  display: none !important;
}

/* Assistant markdown: DOMPurify strips class from md tags, so typography
   is styled by descendant selectors from the .assistant-md wrapper (utility classes on
   the wrapper do not cascade into bare h1/ul/table). */
.assistant-md > :first-child {
  margin-top: 0;
}
.assistant-md > :last-child {
  margin-bottom: 0;
}
.assistant-md p {
  margin: 0.5rem 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.assistant-md h1,
.assistant-md h2,
.assistant-md h3,
.assistant-md h4 {
  font-weight: 600;
  line-height: 1.3;
  margin: 0.75rem 0 0.4rem;
}
.assistant-md h1 {
  font-size: 1.15rem;
}
.assistant-md h2 {
  font-size: 1.05rem;
}
.assistant-md h3 {
  font-size: 0.98rem;
}
.assistant-md h4 {
  font-size: 0.9rem;
}
.assistant-md ul,
.assistant-md ol {
  margin: 0.5rem 0;
  padding-left: 1.4rem;
}
.assistant-md ul {
  list-style: disc;
}
.assistant-md ol {
  list-style: decimal;
}
.assistant-md li {
  margin: 0.2rem 0;
}
.assistant-md a {
  color: rgb(147, 197, 253);
  text-decoration: underline;
  word-break: break-all;
}
.assistant-md code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1em 0.3em;
  border-radius: 0.25rem;
}
.assistant-md pre {
  margin: 0.5rem 0;
  padding: 0.75rem;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 0.5rem;
}
.assistant-md pre code {
  background: none;
  padding: 0;
}
.assistant-md blockquote {
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  padding-left: 0.75rem;
  margin: 0.5rem 0;
  color: rgba(255, 255, 255, 0.75);
}
.assistant-md table {
  border-collapse: collapse;
  margin: 0.5rem 0;
  display: block;
  overflow-x: auto;
}
.assistant-md th,
.assistant-md td {
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.6rem;
  text-align: left;
}
.assistant-md hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 0.75rem 0;
}
