/*
 * 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.
 */

/* Recommendation skeleton shimmer */
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.recommendation-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent 100%
  );
  animation: shimmer 2s ease-in-out infinite;
}

/* Recommendation reveal transition */
.recommendation-reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.recommendation-reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Chat markdown typography ── */

.chat-markdown p {
  margin-bottom: 0.5em;
}
.chat-markdown p:last-child {
  margin-bottom: 0;
}

.chat-markdown strong {
  font-weight: 600;
}
.chat-markdown em {
  font-style: italic;
}

.chat-markdown h1, .chat-markdown h2, .chat-markdown h3 {
  font-weight: 600;
  margin-top: 0.75em;
  margin-bottom: 0.25em;
}
.chat-markdown h1:first-child,
.chat-markdown h2:first-child,
.chat-markdown h3:first-child {
  margin-top: 0;
}

.chat-markdown ul, .chat-markdown ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}
.chat-markdown ul {
  list-style-type: disc;
}
.chat-markdown ol {
  list-style-type: decimal;
}
.chat-markdown li {
  margin-bottom: 0.25em;
}
.chat-markdown li:last-child {
  margin-bottom: 0;
}

.chat-markdown code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  padding: 0.15em 0.35em;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
}
.chat-markdown pre {
  margin: 0.5em 0;
  padding: 0.75em;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  overflow-x: auto;
}
.chat-markdown pre code {
  background: none;
  padding: 0;
}

.chat-markdown a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Assistant bubble links */
.chat-markdown a {
  color: #a5b4fc; /* indigo-300 */
}
.chat-markdown a:hover {
  color: #c7d2fe; /* indigo-200 */
}

/* User bubble overrides */
.chat-markdown.user-markdown a {
  color: rgba(255, 255, 255, 0.9);
}
.chat-markdown.user-markdown code {
  background: rgba(255, 255, 255, 0.15);
}

/* Show cards scrollbar */
.show-cards {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.show-cards::-webkit-scrollbar {
  height: 4px;
}
.show-cards::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* Prevent show card links from inheriting chat-markdown link styles */
a.show-card,
a.show-card:hover {
  text-decoration: none;
  color: inherit;
}
