/* Catalyst Legal AI - additional styles on top of Tailwind */
:root {
  --brand: #2563eb;
}

body {
  font-feature-settings: "rlig" 1, "calt" 1;
}

/* Drag-over state for the upload drop zone */
#drop-zone.dragging {
  border-color: #2563eb;
  background-color: #eff6ff;
}

/* Chat bubbles */
.chat-msg-user {
  background: #2563eb;
  color: white;
  border-radius: 0.75rem 0.75rem 0.125rem 0.75rem;
  padding: 0.5rem 0.75rem;
  align-self: flex-end;
  max-width: 90%;
}
.chat-msg-ai {
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 0.75rem 0.75rem 0.75rem 0.125rem;
  padding: 0.625rem 0.875rem;
  max-width: 95%;
}
.chat-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.chat-row.user { align-items: flex-end; }
.chat-row.ai   { align-items: flex-start; }

.chat-citation {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.25rem;
}
.chat-citation.high   { color: #047857; }
.chat-citation.medium { color: #b45309; }
.chat-citation.low    { color: #b91c1c; }

/* Inline [p. N] markers in chat answers - legacy, kept for back-compat */
.chat-msg-ai .pageref {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  padding: 0 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  margin: 0 0.125rem;
  font-weight: 500;
}

/* Language-switching loading overlay */
.lang-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

/* Clickable citation chips — used by both chat and report sections */
.pageref-chip {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  margin: 0 0.125rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s ease;
}
.pageref-chip:hover {
  background: #bfdbfe;
  border-color: #93c5fd;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  box-shadow: 0 10px 25px -10px rgba(0,0,0,0.3);
  z-index: 50;
}
