Files
OllaHub/app/globals.css
T

382 lines
8.9 KiB
CSS

@import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
@custom-variant hc (&:is([data-high-contrast=true] *));
/* Família visual de IA local: ver DESIGN.md. Os tokens do shadcn apontam para os papéis da família. */
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-surface: var(--surface);
--color-elevated: var(--elevated);
--color-hover: var(--hover);
--color-text-2: var(--text-2);
--color-success: var(--success);
--color-warning: var(--warning);
--color-accent: var(--accent);
--color-accent-fg: var(--accent-fg);
--color-accent-soft: var(--accent-soft);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive: var(--destructive);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-scrim: oklch(0.10 0.01 265 / 0.6);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--color-message-high-contrast: var(--message-high-contrast);
--font-sans: var(--font-geist-sans), system-ui, sans-serif;
--font-mono: var(--font-geist-mono), ui-monospace, monospace;
/* Escala 1,2 com base 14: 12 · 14 · 17 · 20 · 24 · 29. Os nomes do Tailwind encaixam no passo mais próximo. */
--text-xs: 0.75rem;
--text-xs--line-height: 1.5;
--text-sm: 0.875rem;
--text-sm--line-height: 1.5;
--text-base: 1.0625rem;
--text-base--line-height: 1.5;
--text-lg: 1.0625rem;
--text-lg--line-height: 1.5;
--text-xl: 1.25rem;
--text-xl--line-height: 1.25;
--text-2xl: 1.5rem;
--text-2xl--line-height: 1.25;
--text-3xl: 1.8125rem;
--text-3xl--line-height: 1.25;
/* Raio por hierarquia: 6 chip/badge, 8 botão/input, 12 painel/card/diálogo. */
--radius-xs: 6px;
--radius-sm: 6px;
--radius-md: 8px;
--radius-lg: 12px;
--radius-xl: 12px;
/* Sombra só no que flutua (menu, popover, modal). */
--shadow-float: 0 1px 2px oklch(0.10 0.01 265 / 0.30), 0 8px 24px oklch(0.10 0.01 265 / 0.35);
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--default-transition-duration: 150ms;
--default-transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
:root {
--bg: oklch(0.99 0.003 265);
--surface: oklch(0.97 0.004 265);
--elevated: oklch(1 0 0);
--hover: oklch(0.94 0.005 265);
--border: oklch(0.90 0.006 265);
--text: oklch(0.20 0.010 265);
--text-2: oklch(0.42 0.010 265);
--text-3: oklch(0.54 0.010 265);
--success: oklch(0.52 0.14 150);
--warning: oklch(0.60 0.13 75);
--danger: oklch(0.55 0.20 25);
--accent: oklch(0.62 0.15 60);
--accent-fg: oklch(0.20 0.04 60);
--accent-soft: color-mix(in oklab, var(--accent) 14%, var(--bg));
--background: var(--bg);
--foreground: var(--text);
--card: var(--surface);
--card-foreground: var(--text);
--popover: var(--elevated);
--popover-foreground: var(--text);
--primary: var(--accent);
--primary-foreground: var(--accent-fg);
--secondary: var(--hover);
--secondary-foreground: var(--text);
--muted: var(--surface);
--muted-foreground: var(--text-3);
--destructive: var(--danger);
--input: var(--border);
--ring: var(--accent);
--message-high-contrast: oklch(1 0 0);
}
.dark {
--bg: oklch(0.16 0.008 265);
--surface: oklch(0.20 0.009 265);
--elevated: oklch(0.24 0.010 265);
--hover: oklch(0.28 0.010 265);
--border: oklch(0.32 0.010 265);
--text: oklch(0.96 0.004 265);
--text-2: oklch(0.76 0.008 265);
--text-3: oklch(0.64 0.010 265);
--success: oklch(0.74 0.15 150);
--warning: oklch(0.82 0.15 85);
--danger: oklch(0.68 0.19 25);
--accent: oklch(0.80 0.16 70);
--accent-fg: oklch(0.20 0.04 60);
--message-high-contrast: oklch(0.12 0.008 265);
color-scheme: dark;
}
@layer base {
*,
*::before,
*::after {
@apply border-border;
box-sizing: border-box;
}
html {
overflow-x: hidden;
}
body {
@apply bg-background text-foreground font-sans text-sm;
overflow-x: hidden;
width: 100%;
max-width: 100vw;
caret-color: var(--accent);
font-variant-numeric: tabular-nums;
}
h1,
h2,
h3,
h4 {
line-height: 1.25;
text-wrap: balance;
}
::selection {
background: var(--accent-soft);
color: var(--text);
}
/* Foco visível: anel de 2 px no acento com 2 px de offset. */
:focus-visible {
outline: 2px solid var(--ring);
outline-offset: 2px;
}
a {
text-underline-offset: 3px;
}
:disabled {
cursor: not-allowed;
}
}
/* Barras de rolagem no neutro da família */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-3);
}
* {
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
@media (max-width: 640px) {
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
}
/* Responsive layout adjustments */
@media (max-width: 650px) {
/* Sidebar compact mode - hide labels, show only icons */
.sidebar-compact .sidebar-label {
display: none;
}
.sidebar-compact .sidebar-icon {
font-size: 24px;
}
}
/* Ensure proper spacing and padding at all resolutions */
@media (min-width: 320px) and (max-width: 2560px) {
/* Prevent layout breaking at extreme sizes */
.chat-container {
min-width: 320px;
max-width: 100vw;
}
.message-container {
padding-left: clamp(12px, 4vw, 24px);
padding-right: clamp(12px, 4vw, 24px);
}
}
/* Prevent text overflow in cards and messages */
.truncate-with-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Ensure cards never stick to edges */
.card-container {
padding: clamp(8px, 2vw, 16px);
}
/* Sidebar chat item - prevent overflow and ensure proper truncation */
.sidebar-chat-item {
width: 100%;
min-width: 0;
overflow: hidden;
}
.sidebar-chat-item-content {
display: flex;
align-items: flex-start;
gap: 0.75rem;
width: 100%;
min-width: 0;
}
.sidebar-chat-item-text {
flex: 1;
min-width: 0;
overflow: hidden;
}
.sidebar-chat-item-title {
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
}
.sidebar-chat-item-date {
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
}
/* Model name truncation - ensure long model names don't break layout */
.model-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 70vw;
display: inline-block;
vertical-align: middle;
}
@media (max-width: 600px) {
.model-name {
max-width: 54vw;
}
}
/* Select value truncation */
[data-radix-select-trigger] span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
display: block;
}
/* Ensure SelectItems also truncate properly */
[data-radix-select-item] {
min-width: 0;
}
[data-radix-select-item] span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 70vw;
display: block;
}
/* Scrollbar horizontal mínima para sources, some quando não há hover */
.sources-scrollbar::-webkit-scrollbar {
height: 4px;
}
.sources-scrollbar:not(:hover)::-webkit-scrollbar-thumb {
background: transparent;
}
/* Reasoning Chain animations */
@keyframes reasoning-fade-in {
from {
opacity: 0;
transform: translateY(4px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.reasoning-step {
animation: reasoning-fade-in 200ms var(--ease-out) forwards;
opacity: 0;
}
/* Staggered reveal para steps */
.reasoning-step:nth-child(1) { animation-delay: 0ms; }
.reasoning-step:nth-child(2) { animation-delay: 100ms; }
.reasoning-step:nth-child(3) { animation-delay: 200ms; }
.reasoning-step:nth-child(4) { animation-delay: 300ms; }
.reasoning-step:nth-child(5) { animation-delay: 400ms; }
.reasoning-step:nth-child(6) { animation-delay: 500ms; }
.reasoning-step:nth-child(7) { animation-delay: 600ms; }
.reasoning-step:nth-child(8) { animation-delay: 700ms; }
.reasoning-step:nth-child(n+9) { animation-delay: 800ms; }
/* Movimento reduzido: sem deslocamento; indicadores de carregamento viram pulso de opacidade. */
@keyframes reduced-pulse {
50% {
opacity: 0.45;
}
}
@media (prefers-reduced-motion: reduce) {
.reasoning-step {
animation: none;
opacity: 1;
}
.animate-spin,
.animate-bounce,
.animate-ping {
animation: reduced-pulse 1.6s ease-in-out infinite;
}
.animate-in,
.animate-out {
--tw-enter-translate-x: 0;
--tw-enter-translate-y: 0;
--tw-enter-scale: 1;
--tw-exit-translate-x: 0;
--tw-exit-translate-y: 0;
--tw-exit-scale: 1;
}
}