ai-chatbot/app/globals.css

316 lines
8.9 KiB
CSS

@import "tailwindcss";
@import "katex/dist/katex.min.css";
/* include utility classes in streamdown */
@source '../node_modules/streamdown/dist/index.js';
/* custom variant for setting dark mode programmatically */
@custom-variant dark (&:is(.dark, .dark *));
/* include plugins */
@plugin "tailwindcss-animate";
@plugin "@tailwindcss/typography";
/* define design tokens (light mode) */
:root {
color-scheme: light;
--font-geist: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
"Helvetica Neue", Arial, sans-serif;
--font-geist-mono: "SFMono-Regular", "SF Mono", Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
--background: hsl(0 0% 100%);
--foreground: hsl(240 10% 3.9%);
--card: hsl(0 0% 100%);
--card-foreground: hsl(240 10% 3.9%);
--popover: hsl(0 0% 100%);
--popover-foreground: hsl(240 10% 3.9%);
--primary: hsl(240 5.9% 10%);
--primary-foreground: hsl(0 0% 98%);
--secondary: hsl(240 4.8% 95.9%);
--secondary-foreground: hsl(240 5.9% 10%);
--muted: hsl(240 4.8% 95.9%);
--muted-foreground: hsl(240 3.8% 46.1%);
--accent: hsl(240 4.8% 95.9%);
--accent-foreground: hsl(240 5.9% 10%);
--destructive: hsl(0 84.2% 60.2%);
--destructive-foreground: hsl(0 0% 98%);
--border: hsl(240 5.9% 90%);
--input: hsl(240 5.9% 90%);
--ring: hsl(240 10% 3.9%);
--chart-1: hsl(12 76% 61%);
--chart-2: hsl(173 58% 39%);
--chart-3: hsl(197 37% 24%);
--chart-4: hsl(43 74% 66%);
--chart-5: hsl(27 87% 67%);
--sidebar-background: hsl(0 0% 98%);
--sidebar-foreground: hsl(240 5.3% 26.1%);
--sidebar-primary: hsl(240 5.9% 10%);
--sidebar-primary-foreground: hsl(0 0% 98%);
--sidebar-accent: hsl(240 4.8% 95.9%);
--sidebar-accent-foreground: hsl(240 5.9% 10%);
--sidebar-border: hsl(220 13% 91%);
--sidebar-ring: hsl(217.2 91.2% 59.8%);
/* border radius unit */
--radius: 0.5rem;
--sidebar: hsl(0 0% 98%);
--chat-user-bubble-bg: hsl(214 100% 50%);
--chat-user-bubble-foreground: hsl(0 0% 100%);
--chat-user-bubble-border: hsl(214 100% 46%);
}
/* define design tokens (dark mode) */
.dark {
color-scheme: dark;
--background: hsl(240 10% 3.9%);
--foreground: hsl(0 0% 98%);
--card: hsl(240 10% 3.9%);
--card-foreground: hsl(0 0% 98%);
--popover: hsl(240 10% 3.9%);
--popover-foreground: hsl(0 0% 98%);
--primary: hsl(0 0% 98%);
--primary-foreground: hsl(240 5.9% 10%);
--secondary: hsl(240 3.7% 15.9%);
--secondary-foreground: hsl(0 0% 98%);
--muted: hsl(240 3.7% 15.9%);
--muted-foreground: hsl(240 5% 64.9%);
--accent: hsl(240 3.7% 15.9%);
--accent-foreground: hsl(0 0% 98%);
--destructive: hsl(0 62.8% 30.6%);
--destructive-foreground: hsl(0 0% 98%);
--border: hsl(240 3.7% 15.9%);
--input: hsl(240 3.7% 15.9%);
--ring: hsl(240 4.9% 83.9%);
--chart-1: hsl(220 70% 50%);
--chart-2: hsl(160 60% 45%);
--chart-3: hsl(30 80% 55%);
--chart-4: hsl(280 65% 60%);
--chart-5: hsl(340 75% 55%);
--sidebar-background: hsl(240 5.9% 10%);
--sidebar-foreground: hsl(240 4.8% 95.9%);
--sidebar-primary: hsl(224.3 76.3% 48%);
--sidebar-primary-foreground: hsl(0 0% 100%);
--sidebar-accent: hsl(240 3.7% 15.9%);
--sidebar-accent-foreground: hsl(240 4.8% 95.9%);
--sidebar-border: hsl(240 3.7% 15.9%);
--sidebar-ring: hsl(217.2 91.2% 59.8%);
--sidebar: hsl(240 5.9% 10%);
--chat-user-bubble-bg: hsl(217 92% 58%);
--chat-user-bubble-foreground: hsl(0 0% 100%);
--chat-user-bubble-border: hsl(217 92% 66% / 0.42);
}
/* define theme */
@theme {
--font-sans: var(--font-geist);
--font-mono: var(--font-geist-mono);
--breakpoint-toast-mobile: 600px;
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-destructive-foreground: var(--destructive-foreground);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--color-sidebar: var(--sidebar);
--color-sidebar-background: var(--sidebar-background);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring);
--color-chart-1: var(--chart-1);
--color-chart-2: var(--chart-2);
--color-chart-3: var(--chart-3);
--color-chart-4: var(--chart-4);
--color-chart-5: var(--chart-5);
--radius-lg: var(--radius);
--radius-md: calc(var(--radius) - 2px);
--radius-sm: calc(var(--radius) - 4px);
--animate-accordion-down: accordion-down 0.2s ease-out;
--animate-accordion-up: accordion-up 0.2s ease-out;
--animate-caret-blink: caret-blink 1.25s ease-out infinite;
@keyframes accordion-down {
from {
height: 0;
}
to {
height: var(--radix-accordion-content-height);
}
}
@keyframes accordion-up {
from {
height: var(--radix-accordion-content-height);
}
to {
height: 0;
}
}
@keyframes caret-blink {
0%,
70%,
100% {
opacity: 1;
}
20%,
50% {
opacity: 0;
}
}
}
/* utility classes */
@utility container {
margin-inline: auto;
padding-inline: 2rem;
@media (width >= --theme(--breakpoint-sm)) {
max-width: none;
}
@media (width >= 1400px) {
max-width: 1400px;
}
}
/*
The default border color has changed to `currentColor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.
If we ever want to remove these styles, we need to add an explicit border
color utility to any element that depends on these defaults.
*/
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--border, currentColor);
}
}
@layer utilities {
@keyframes canvas-generated-pulse {
0% {
opacity: 0.9;
transform: scale(0.985);
box-shadow:
0 0 0 0 rgba(124, 156, 255, 0.3),
0 0 26px rgba(124, 156, 255, 0.2);
}
55% {
opacity: 0.35;
transform: scale(1.03);
box-shadow:
0 0 0 12px rgba(124, 156, 255, 0.02),
0 0 42px rgba(124, 156, 255, 0.1);
}
100% {
opacity: 0;
transform: scale(1.055);
box-shadow:
0 0 0 18px rgba(124, 156, 255, 0),
0 0 52px rgba(124, 156, 255, 0);
}
}
.agent-dark-scrollbar {
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.18) rgba(255, 255, 255, 0.04);
}
.agent-dark-scrollbar::-webkit-scrollbar {
width: 10px;
height: 10px;
}
.agent-dark-scrollbar::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.04);
border-radius: 999px;
}
.agent-dark-scrollbar::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.18);
border: 2px solid rgba(0, 0, 0, 0);
background-clip: padding-box;
border-radius: 999px;
}
.agent-dark-scrollbar::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.26);
background-clip: padding-box;
}
.chat-card-x-scroll {
min-width: 0;
max-width: 100%;
-webkit-overflow-scrolling: touch;
scrollbar-gutter: stable;
scrollbar-width: thin;
scrollbar-color: rgba(148, 163, 184, 0.42) rgba(148, 163, 184, 0.14);
}
.chat-card-x-scroll > table,
.chat-card-x-scroll > svg {
max-width: none;
}
.chat-card-x-scroll::-webkit-scrollbar {
width: 10px;
height: 10px;
}
.chat-card-x-scroll::-webkit-scrollbar-track {
background: rgba(148, 163, 184, 0.14);
border-radius: 999px;
}
.chat-card-x-scroll::-webkit-scrollbar-thumb {
background: rgba(148, 163, 184, 0.42);
border: 2px solid transparent;
background-clip: padding-box;
border-radius: 999px;
}
.chat-card-x-scroll::-webkit-scrollbar-thumb:hover {
background: rgba(148, 163, 184, 0.58);
background-clip: padding-box;
}
.step {
counter-increment: step;
}
.step:before {
@apply absolute inline-flex h-9 w-9 items-center justify-center rounded-full border-4 border-white bg-zinc-100 text-center font-mono text-base font-medium text-zinc-700 -indent-px;
@apply ml-[-50px] mt-[-4px];
content: counter(step);
}
.pattern-grid-lg {
background-image: linear-gradient(to right, currentColor 1px, transparent 1px),
linear-gradient(to bottom, currentColor 1px, transparent 1px);
background-size: 40px 40px;
}
}