/*
 * 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.
 *= require ./theme
 *= require ./command_palette
 */

/* Typing Indicator Animation */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
}

.typing-indicator span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  animation: typing-pulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(102, 126, 234, 0.4);
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-pulse {
  0%, 100% {
    transform: scale(0.8) translateY(0);
    opacity: 0.4;
    box-shadow: 0 0 4px rgba(102, 126, 234, 0.2);
  }
  50% {
    transform: scale(1.1) translateY(-6px);
    opacity: 1;
    box-shadow: 0 0 16px rgba(102, 126, 234, 0.6);
  }
}

.typing-label {
  margin-left: 8px;
  font-size: 0.85rem;
  color: #667eea;
  font-weight: 500;
  animation: typing-label-fade 2s ease-in-out infinite;
}

@keyframes typing-label-fade {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Tom Select - Custom Styles */
.tom-select-option-with-description {
  padding: 4px 0;
}

.tom-select-option-label {
  font-weight: 500;
}

.tom-select-option-description {
  font-size: 0.85rem;
  margin-top: 2px;
}

/* Context review — document upload card in review state */
.context-review-documents {
  background-color: var(--traqx-blue-50, #F0F7FF);
  border: 1px dashed var(--traqx-blue-200, #CCE0FF);
}

.context-review-documents .card-header {
  background: transparent;
  border-bottom-style: dashed;
  border-bottom-color: var(--traqx-blue-200, #CCE0FF);
}

.context-review-documents .card-title {
  color: var(--traqx-blue-600, #026CFF);
}

/* Ghost values inside markdown content — readable but visually distinct */
.ghost-value.markdown-content,
.ghost-value .markdown-content {
  color: var(--gxp-slate-600, #3E5068);
  font-style: normal;
  border-left: 3px solid var(--traqx-blue-200, #CCE0FF);
  padding-left: 1rem;
}

.ghost-value.markdown-content strong,
.ghost-value .markdown-content strong {
  color: var(--gxp-slate-700, #2A3A4F);
}

/* Markdown Content — rendered AI essay sections */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.markdown-content h1 { font-size: 1.25rem; }
.markdown-content h2 { font-size: 1.125rem; }
.markdown-content h3 { font-size: 1rem; }
.markdown-content h4 { font-size: 0.9375rem; }

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child,
.markdown-content h4:first-child {
  margin-top: 0;
}

.markdown-content p {
  margin-bottom: 0.75rem;
}

.markdown-content p:last-child {
  margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}

.markdown-content li {
  margin-bottom: 0.25rem;
}

.markdown-content strong {
  font-weight: 600;
}

.markdown-content blockquote {
  border-left: 3px solid var(--tblr-border-color, #e6e7e9);
  padding-left: 1rem;
  margin: 0.75rem 0;
  color: var(--tblr-secondary-color, #626976);
}

.markdown-content table {
  width: 100%;
  margin-bottom: 0.75rem;
  border-collapse: collapse;
}

.markdown-content th,
.markdown-content td {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--tblr-border-color, #e6e7e9);
  text-align: left;
}

.markdown-content th {
  background-color: var(--tblr-bg-surface-secondary, #f8f9fa);
  font-weight: 600;
}

.markdown-content code {
  padding: 0.125rem 0.375rem;
  background-color: var(--tblr-bg-surface-secondary, #f8f9fa);
  border-radius: 3px;
  font-size: 0.875em;
}

.markdown-content pre {
  padding: 0.75rem 1rem;
  background-color: var(--tblr-bg-surface-secondary, #f8f9fa);
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.markdown-content pre code {
  padding: 0;
  background: none;
}

.markdown-content hr {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid var(--tblr-border-color, #e6e7e9);
}
