/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* User dropdown chevron rotation */
.dropdown[open] .chevron-icon {
  transform: rotate(180deg);
}

/* PDF.js text layer — invisible text overlay for selection and highlighting */
.pdf-text-layer {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  opacity: 0.3;
  line-height: 1;
}

.pdf-text-layer span {
  color: transparent;
  white-space: pre;
  cursor: text;
}

.pdf-text-layer .pdf-highlight {
  background-color: oklch(0.905 0.182 98.111 / 0.5); /* warning/50 */
  color: transparent;
  border-radius: 2px;
}

/* QA Copilot: constrain TipTap editor height so it scrolls internally */
.qa-copilot-answer .ProseMirror {
  max-height: 60vh;
  overflow-y: auto;
}

/* QA Copilot: subtle background tint + gradient border around editor in edit mode */
.qa-copilot-answer [data-answer-editor-target="editView"]:not(.hidden) {
  position: relative;
  margin: -6px;
  padding: 6px;
  background: oklch(from currentColor l c h / 0.03);
  border-radius: 12px;
}
.qa-copilot-answer [data-answer-editor-target="editView"]:not(.hidden):has(.ProseMirror-focused)::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1.5px;
  background: linear-gradient(135deg, oklch(0.585 0.233 277), oklch(0.585 0.233 330), oklch(0.646 0.222 41));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
