/* ==========================================================================
   AMBIATKSHI LIVE STOCK SENTIMENT & 8,192-TOKEN ANALYZER STYLES
   ========================================================================== */

.analyzer-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.analyzer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .analyzer-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Autonomous Financial Crawler Bar --- */
.crawler-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.crawler-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.crawler-sources {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.source-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.source-pill.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.crawler-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.crawler-input-group {
  display: flex;
  flex: 1;
  min-width: 260px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
}

.crawler-input-group:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.crawler-input-prefix {
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  border-right: 1px solid var(--border-color);
}

.crawler-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  outline: none;
  text-transform: uppercase;
}

.crawler-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b0f19;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.crawler-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.crawler-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.source-attribution-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.ticker-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.ticker-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.ticker-btn:hover, .ticker-btn.active {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
}

.transcript-input {
  width: 100%;
  height: 280px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: var(--transition-fast);
}

.transcript-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.sentiment-result-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.conviction-meter {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0;
}

.conviction-bar {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.conviction-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

.conviction-fill.bullish { background: linear-gradient(90deg, #10b981, #34d399); }
.conviction-fill.bearish { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.conviction-fill.neutral { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }

.reasoning-box {
  background: #06090e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: #38bdf8;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* --- Thinking Process (Chain-of-Thought) Box --- */
.thinking-container {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
}

.thinking-header {
  background: rgba(30, 41, 59, 0.6);
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  user-select: none;
}

.thinking-header:hover {
  background: rgba(30, 41, 59, 0.9);
}

.thinking-box {
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: #cbd5e1;
  max-height: 280px;
  overflow-y: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.3);
}

.thinking-box.collapsed {
  display: none;
}

.thought-step {
  margin-bottom: 0.85rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--accent-gold);
}

.thought-step:last-child {
  margin-bottom: 0;
}

.thought-step-title {
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}

.thought-step-body {
  color: #94a3b8;
}

.thought-step-body strong {
  color: #f8fafc;
}

.thought-tag {
  display: inline-block;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin: 0.15rem 0.2rem;
}

.sentiment-result-card.pulse-analyzing {
  animation: pulseCard 0.35s ease-in-out;
  border-color: var(--accent-gold);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
}

@keyframes pulseCard {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.01); opacity: 0.85; filter: brightness(1.2); }
  100% { transform: scale(1); opacity: 1; }
}


