/* ============================================
   Crux Design System - Fonts & Semantic Vars
   ============================================ */

@font-face {
  font-family: "Nunito Sans";
  src: url("/assets/NunitoSans-Variable-8f7d376e.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("/assets/NunitoSans-Variable-Italic-aeca85b6.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: optional;
}

:root {
  --page-bg: #f7f7f7;
  --page-text: #262626;
  --page-text-secondary: #525252;
  --page-text-tertiary: #737373;
  --card-bg: #ffffff;
  --card-border: #e5e5e5;
  --input-bg: #ffffff;
  --input-border: #d4d4d4;
  --overlay-bg: #eeeeee;

  /* User chat bubble: light green in light mode */
  --color-primary: #ddf4d6;
  --color-primary-content: #1a2e14;
}

[data-theme="dark"] {
  --page-bg: #262626;
  --page-text: #f7f7f7;
  --page-text-secondary: #a3a3a3;
  --page-text-tertiary: #737373;
  --card-bg: #323232;
  --card-border: #4a4a4a;
  --input-bg: #323232;
  --input-border: #5a5a5a;
  --overlay-bg: #3d3d3d;

  /* User chat bubble */
  --color-primary: #2e3d29;
  --color-primary-content: #f7f7f7;
}

/* Remove chat bubble tail */
.chat-bubble::before {
  display: none;
}

/* Remove default padding from chat container */
.chat {
  padding-block: 0;
  padding-inline: 0;
}

/* Remove padding from transparent assistant bubble - prose handles its own spacing */
.chat-bubble-transparent {
  padding: 0;
}

/* Override DaisyUI's opinionated corner resets so all bubbles stay fully rounded */
.chat-end .chat-bubble,
.chat-start .chat-bubble {
  border-radius: 1.5rem;
}

/* Prose text - inline code uses crux green */
.prose {
  --tw-prose-code: #75e74e;
}

/* Prose text in dark mode - prevent primary color bleed onto bold/links */
[data-theme="dark"] .prose {
  --tw-prose-bold: #f7f7f7;
  --tw-prose-headings: #f7f7f7;
  --tw-prose-links: #75e74e;
  --tw-prose-body: #f7f7f7;
  --tw-prose-code: #75e74e;
  color: #f7f7f7;
}

[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="dark"]  .theme-icon-moon { display: none; }

/* Turbo progress bar */
.turbo-progress-bar {
  background-color: var(--color-crux-green, #75e74e);
  height: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
