/*
 * This is a manifest file that'll be compiled into application.css.
 */

/* AI markdown prose styles */
.ai-prose h1,
.ai-prose h2,
.ai-prose h3,
.ai-prose h4 {
  color: var(--color-text-primary, #e2e8f0);
  font-weight: 600;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.ai-prose h1 { font-size: 1.25em; }
.ai-prose h2 { font-size: 1.125em; }
.ai-prose h3 { font-size: 1em; }

.ai-prose p {
  margin-bottom: 0.75em;
}

.ai-prose p:last-child {
  margin-bottom: 0;
}

.ai-prose strong {
  color: var(--color-text-primary, #e2e8f0);
  font-weight: 600;
}

.ai-prose ul,
.ai-prose ol {
  margin-top: 0.25em;
  margin-bottom: 0.75em;
  padding-left: 1.5em;
}

.ai-prose ul { list-style-type: disc; }
.ai-prose ol { list-style-type: decimal; }

.ai-prose li {
  margin-bottom: 0.25em;
}

.ai-prose li > ul,
.ai-prose li > ol {
  margin-top: 0.25em;
  margin-bottom: 0;
}

.ai-prose code {
  background: rgba(99, 102, 241, 0.15);
  padding: 0.15em 0.4em;
  border-radius: 0.25em;
  font-size: 0.875em;
}

.ai-prose pre {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--color-border-primary, #323648);
  border-radius: 0.5em;
  padding: 0.75em 1em;
  overflow-x: auto;
  margin-bottom: 0.75em;
}

.ai-prose pre code {
  background: none;
  padding: 0;
}

.ai-prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75em;
}

.ai-prose th,
.ai-prose td {
  border: 1px solid var(--color-border-primary, #323648);
  padding: 0.4em 0.75em;
  text-align: left;
}

.ai-prose th {
  background: rgba(99, 102, 241, 0.1);
  font-weight: 600;
  color: var(--color-text-primary, #e2e8f0);
}

.ai-prose hr {
  border: none;
  border-top: 1px solid var(--color-border-primary, #323648);
  margin: 1em 0;
}

.ai-prose a {
  color: #818cf8;
  text-decoration: underline;
}

.ai-prose a:hover {
  color: #a5b4fc;
}

.ai-prose blockquote {
  border-left: 3px solid #6366f1;
  padding-left: 1em;
  margin: 0.75em 0;
  opacity: 0.85;
}

/* Light theme AI prose overrides */
[data-theme="light"] .ai-prose pre {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .ai-prose code {
  background: rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .ai-prose th {
  background: rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .ai-prose a {
  color: #4f46e5;
}

[data-theme="light"] .ai-prose a:hover {
  color: #4338ca;
}

[data-theme="light"] .ai-prose blockquote {
  border-left-color: #4f46e5;
}

/* Crypto ticker — brief flash on channel-driven data refresh so the user
   notices new prices landed without being distracting. */
@keyframes ticker-pulse {
  0%   { background-color: rgba(99, 102, 241, 0.0); }
  35%  { background-color: rgba(99, 102, 241, 0.10); }
  100% { background-color: rgba(99, 102, 241, 0.0); }
}

.ticker-pulse {
  animation: ticker-pulse 600ms ease-out;
}

/* Crypto ticker — auto-scrolling marquee for the /crypto page strip.
   Chip stream is duplicated inside .ticker-track; animation translates
   half its width left, producing a seamless loop. */
@keyframes ticker-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-mask {
  position: relative;
  overflow: hidden;
  /* Soft fade at left/right edges so chips don't pop in/out abruptly. */
  -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
          mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  width: max-content;
  animation: ticker-marquee 60s linear infinite;
  will-change: transform;
}

.ticker-track:hover { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-mask  { overflow-x: auto; }
}
