/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * Application-wide styles only. Agent-specific styles (competitive_intelligence,
 * consumer_intelligence) are loaded separately by their respective layouts.
 *

 */

/* Custom styles for Quill Rich Text Editor in Notebook Drawer */
.notebook-editor-container {
  display: flex;
  flex-direction: column;
  min-height: 0; /* Critical for flex overflow */
}

.notebook-editor-container .ql-toolbar {
  flex-shrink: 0; /* Toolbar stays fixed size */
}

.notebook-editor-container .ql-container {
  font-family: inherit;
  font-size: 16px !important;
  border: none;
  flex: 1;
  min-height: 0; /* Critical for flex overflow */
  overflow: hidden;
}

.notebook-editor-container .ql-editor {
  padding: 1rem;
  line-height: 1.6;
  height: 100%;
  overflow-y: auto;
}

.notebook-editor-container .ql-editor.ql-blank::before {
  color: #9CA3AF;
  font-style: normal;
}

.notebook-editor-container .ql-toolbar {
  border: none;
  border-bottom: 1px solid #E5E7EB;
  padding: 0.5rem;
  background-color: #FAFAFA;
}

.notebook-editor-container .ql-toolbar .ql-stroke {
  stroke: #6B7280;
}

.notebook-editor-container .ql-toolbar .ql-fill {
  fill: #6B7280;
}

.notebook-editor-container .ql-toolbar button:hover .ql-stroke,
.notebook-editor-container .ql-toolbar button.ql-active .ql-stroke {
  stroke: #7C3AED;
}

.notebook-editor-container .ql-toolbar button:hover .ql-fill,
.notebook-editor-container .ql-toolbar button.ql-active .ql-fill {
  fill: #7C3AED;
}

.notebook-editor-container .ql-toolbar .ql-picker-label {
  color: #6B7280;
}

.notebook-editor-container .ql-toolbar .ql-picker-label:hover,
.notebook-editor-container .ql-toolbar .ql-picker-label.ql-active {
  color: #7C3AED;
}

/* Content styling within Quill editor */
.notebook-editor-container .ql-editor h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #111827;
}

.notebook-editor-container .ql-editor h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #111827;
}

.notebook-editor-container .ql-editor h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #111827;
}

.notebook-editor-container .ql-editor p {
  margin-bottom: 0.75rem;
}

.notebook-editor-container .ql-editor ul,
.notebook-editor-container .ql-editor ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}

.notebook-editor-container .ql-editor li {
  margin-bottom: 0.25rem;
}

.notebook-editor-container .ql-editor blockquote {
  border-left: 4px solid #8B5CF6;
  margin: 1rem 0;
  color: #4B5563;
  background-color: #F3F0FF;
  padding: 0.875rem 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
}

.notebook-editor-container .ql-editor a {
  color: #7C3AED;
  text-decoration: underline;
}

.notebook-editor-container .ql-editor a:hover {
  color: #5B21B6;
}

/* Markdown Table Styles */
.markdown-table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  overflow-x: auto;
  display: block;
}

.markdown-table th,
.markdown-table td {
  padding: 0.5rem;
  border: 1px solid #D7DBEC;
  text-align: left;
}

.markdown-table th {
  background-color: #F5F6FA;
  font-weight: 600;
}

.markdown-table tr:nth-child(even) {
  background-color: #F9FAFB;
}

.prose-chat table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 1rem 0;
}

.prose-chat th,
.prose-chat td {
  padding: 0.5rem;
  border: 1px solid #D7DBEC;
  text-align: left;
  word-wrap: break-word;
}

.prose-chat th {
  background-color: #F5F6FA;
  font-weight: 600;
}

.prose-chat tr:nth-child(even) {
  background-color: #F9FAFB;
}

/* Thinking card styles for Claude-style reasoning UI */
/* No additional styles needed - card uses Tailwind classes */

/* ═══════════════════════════════════════════════════════════════════════════
   Chat Toggle Controls - Quiet utility style
   Secondary controls that recede until needed
   ═══════════════════════════════════════════════════════════════════════════ */

.chat-toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: opacity 0.15s ease;
}

.chat-toggle-control:hover {
  opacity: 1;
}

/* The toggle switch - compact and understated */
.chat-toggle {
  position: relative;
  width: 1.75rem;
  height: 1rem;
  border-radius: 9999px;
  background: #e4e4e7;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
  margin-top: -1px; /* Optical alignment with text */
}

.chat-toggle:focus {
  outline: none;
}

.chat-toggle.active {
  background: #8b5cf6;
}

/* The knob - simple and clean */
.chat-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.chat-toggle.active .chat-toggle-knob {
  transform: translateX(0.75rem);
}

/* Label text - quiet and secondary */
.chat-toggle-label {
  font-size: 0.75rem;
  font-weight: 400;
  color: #a1a1aa;
  letter-spacing: 0;
  transition: color 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.chat-toggle-control:hover .chat-toggle-label {
  color: #71717a;
}

/* When toggle is active, subtle emphasis via color only */
.chat-toggle.active + .chat-toggle-label {
  color: #52525b;
}

/* Send button - refined style */
.chat-send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem;
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
  color: white;
  border: none;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.chat-send-button:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.chat-send-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(139, 92, 246, 0.3);
}

/* Stop button state (during streaming) */
.chat-send-button.streaming {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.chat-send-button.streaming:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.4);
}
