moelove's picture
refactor: completely remove PWA functionality
ce51672
/* Import MCP styles */
@import './styles/mcp.css';
@import './styles/mcp-settings.css';
@tailwind base;
@tailwind components;
@tailwind utilities;
/* Enterprise Design System */
:root {
/* Primary Brand Colors */
--primary-color: #2563eb;
--primary-hover: #1d4ed8;
--primary-light: #dbeafe;
--primary-dark: #1e3a8a;
/* Secondary Colors */
--secondary-color: #64748b;
--secondary-hover: #475569;
--secondary-light: #f1f5f9;
/* Neutral Palette */
--text-color: #0f172a;
--text-secondary: #334155;
--text-muted: #64748b;
--text-light: #94a3b8;
--text-disabled: #cbd5e1;
/* Background System */
--background-primary: #ffffff;
--background-secondary: #f8fafc;
--background-tertiary: #f1f5f9;
--background-elevated: #ffffff;
/* Border System */
--border-color: #e2e8f0;
--border-light: #f1f5f9;
--border-dark: #cbd5e1;
--border-accent: #3b82f6;
/* Status Colors */
--success-color: #059669;
--success-light: #d1fae5;
--warning-color: #d97706;
--warning-light: #fef3c7;
--error-color: #dc2626;
--error-light: #fee2e2;
--info-color: #0284c7;
--info-light: #e0f2fe;
/* Layout Variables */
--sidebar-width: 320px;
--header-height: 64px;
--border-radius: 8px;
--border-radius-lg: 12px;
--border-radius-xl: 16px;
/* Shadow System */
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
/* Message Specific */
--reasoning-background: var(--background-tertiary);
--user-message-bg: var(--primary-color);
--user-message-color: #ffffff;
--assistant-message-bg: var(--background-elevated);
--assistant-message-color: var(--text-color);
--hover-color: var(--background-secondary);
--active-color: var(--primary-light);
/* Responsive sidebar width */
--mobile-sidebar-width: 100%;
--tablet-sidebar-width: 280px;
/* Animation System */
--transition-fast: 150ms ease-out;
--transition-normal: 250ms ease-out;
--transition-slow: 350ms ease-out;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
color: var(--text-color);
line-height: 1.5;
background-color: var(--background-color);
}
@layer components {
/* App container */
.app-container {
@apply flex flex-col h-screen w-full overflow-hidden;
}
/* Header styles */
.app-header {
@apply flex justify-between items-center px-5 h-header border-b border-border bg-background;
}
.left-section {
@apply flex items-center;
}
.right-section {
@apply flex items-center gap-2.5;
}
.app-title {
@apply text-xl font-semibold text-text;
}
}
@layer components {
/* Profile dropdown */
.profile-dropdown-container {
@apply relative;
}
.profile-dropdown-button {
@apply py-1.5 px-3 bg-background border border-border rounded text-sm text-text cursor-pointer flex items-center gap-1.5;
}
.profile-dropdown-menu {
@apply absolute top-full right-0 w-[200px] bg-background border border-border rounded shadow-md z-10 mt-1.5;
}
.profile-option {
@apply p-3 cursor-pointer transition-colors duration-200 text-sm;
}
.profile-option:hover {
@apply bg-hover;
}
.profile-option.active {
@apply bg-active font-medium;
}
}
@layer components {
.settings-button {
@apply py-1.5 px-3 bg-background border border-border rounded text-sm text-text cursor-pointer;
}
.settings-button:hover {
@apply bg-hover;
}
/* Main content area */
.app-content {
@apply flex flex-1 overflow-hidden;
}
}
@layer components {
/* Sidebar */
.sidebar {
@apply w-sidebar border-r border-border flex flex-col transition-[width] duration-300 ease-in-out bg-background;
}
.sidebar.collapsed {
@apply w-[50px] overflow-hidden;
}
.sidebar.collapsed .chat-list {
@apply hidden;
}
.sidebar.collapsed .sidebar-header h2 {
@apply hidden;
}
.sidebar.collapsed .sidebar-header {
@apply justify-center;
}
.sidebar-header {
@apply flex justify-between items-center py-3 px-4 border-b border-border;
}
.sidebar.collapsed .sidebar-header {
@apply py-3 px-[5px];
}
.sidebar-header h2 {
@apply text-sm font-semibold text-light-text m-0;
}
.toggle-sidebar-button {
@apply bg-transparent border-0 text-base text-lightest-text cursor-pointer flex items-center justify-center z-10 w-6 h-6;
}
.toggle-sidebar-button:hover {
@apply text-text;
}
/* Ensure the toggle button is always visible and clickable */
.sidebar.collapsed .toggle-sidebar-button {
@apply opacity-100 visible;
}
/* Floating expand button that appears when sidebar is collapsed */
.expand-sidebar-button {
@apply fixed left-[60px] top-[80px] bg-background border border-border rounded-full w-8 h-8 flex items-center justify-center cursor-pointer shadow-md z-20 opacity-0 invisible transition-all duration-300;
}
.sidebar.collapsed ~ .expand-sidebar-button {
@apply opacity-100 visible;
}
.expand-sidebar-button:hover {
@apply bg-hover text-text;
}
}
@layer components {
/* Chat list */
.chat-list {
@apply flex-1 overflow-y-auto p-2.5;
}
.new-chat {
@apply w-full py-2 px-3 bg-primary text-white border-none rounded cursor-pointer text-sm mb-4 transition-colors duration-200 flex items-center justify-center;
}
.new-chat:hover {
@apply bg-primary-hover;
}
.chat-item {
@apply flex justify-between items-center py-2 px-2.5 rounded cursor-pointer mb-0.5 transition-colors duration-200 text-sm text-light-text;
}
.chat-item:hover {
@apply bg-hover;
}
.chat-item.active {
@apply bg-active text-primary;
}
.chat-item.streaming {
@apply border-l-2 border-blue-500;
}
.streaming-dot {
@apply w-2 h-2 bg-blue-500 rounded-full;
animation: pulse 1.5s infinite;
}
.delete-btn {
@apply opacity-0 bg-transparent border-none text-lightest-text cursor-pointer text-xs transition-all duration-200 py-0.5 px-[5px];
}
.chat-item:hover .delete-btn {
@apply opacity-100;
}
.delete-btn:hover {
@apply text-red-600;
}
.empty-state {
@apply text-lightest-text text-center p-5 text-sm;
}
}
@layer components {
/* Main chat area */
.main-content {
@apply flex-1 flex flex-col overflow-hidden bg-background;
}
/* Welcome screen */
.welcome-screen {
@apply flex flex-col items-center justify-center h-full p-5 text-center;
}
.welcome-screen h2 {
@apply text-2xl font-semibold mb-2.5 text-text;
}
.welcome-screen p {
@apply text-light-text mb-5 text-sm;
}
.new-chat-button {
@apply py-2.5 px-5 bg-primary text-white border-none rounded cursor-pointer text-sm transition-colors duration-200;
}
.new-chat-button:hover {
@apply bg-primary-hover;
}
}
@layer components {
/* Chat window */
.chat-window {
@apply flex flex-col h-full overflow-hidden;
}
.chat-messages {
@apply flex-1 overflow-y-auto p-5 flex flex-col gap-6;
}
}
@layer components {
/* Message styles */
.message {
@apply flex flex-col max-w-[800px] mx-auto w-full;
}
.message.user {
@apply items-end;
}
.message.assistant {
@apply items-start;
}
.reasoning-container {
@apply w-full border border-border rounded-lg overflow-hidden mb-2.5 bg-reasoning-bg;
}
.reasoning-header {
@apply flex justify-between items-center py-2 px-3 cursor-pointer text-[0.8125rem] text-light-text bg-[#f5f5f5] border-b border-border;
}
.toggle-icon {
@apply text-[0.625rem];
}
.reasoning-content {
@apply p-3 text-[0.8125rem] whitespace-pre-wrap overflow-x-auto text-light-text max-h-[300px] overflow-y-auto;
}
.message-content {
@apply py-3 px-4 rounded-md text-[0.9375rem] leading-normal break-words max-w-[90%] relative;
}
.message.user .message-content {
@apply bg-user-message-bg text-user-message-color rounded-[6px_6px_0_6px];
}
.message.assistant .message-content {
@apply bg-assistant-message-bg text-assistant-message-color rounded-[6px_6px_6px_0];
}
}
@layer components {
.copy-button {
@apply absolute right-2 bottom-2 bg-white/80 border border-border rounded py-1 px-2 text-xs cursor-pointer opacity-0 transition-opacity duration-200;
}
.message-content:hover .copy-button {
@apply opacity-100;
}
.copy-button.copied {
@apply bg-emerald-500 text-white border-emerald-600;
}
.message.user .copy-button {
@apply bg-white/90 text-light-text;
}
.message.user .copy-button:hover {
@apply bg-white text-text;
}
.message.assistant .copy-button {
@apply bg-[rgba(249,249,249,0.9)] text-text;
}
.message.assistant .copy-button:hover {
@apply bg-background;
}
/* Add styles for markdown content */
.message-content p {
@apply mb-4;
}
.message-content p:last-child {
@apply mb-0;
}
.message-content pre {
@apply bg-black/5 p-3 rounded overflow-x-auto my-4;
}
.message-content code {
@apply bg-black/5 py-0.5 px-1 rounded font-mono;
}
.message-content pre code {
@apply bg-transparent p-0;
}
.message-content ul,
.message-content ol {
@apply my-4 pl-8;
}
.message-content li {
@apply my-2;
}
.message-content blockquote {
@apply border-l-4 border-border my-4 pl-4 text-light-text;
}
.message-content img {
@apply max-w-full h-auto my-4 rounded;
}
.message-content table {
@apply border-collapse w-full my-4;
}
.message-content th,
.message-content td {
@apply border border-border p-2 text-left;
}
.message-content th {
@apply bg-hover;
}
.message-time {
@apply text-xs text-lightest-text mt-1;
}
}
@layer components {
/* Input area */
.chat-input {
@apply flex p-4 border-t border-border gap-2.5 bg-background;
}
.message-input {
@apply flex-1 py-3 px-4 border border-border rounded-md text-[0.9375rem] resize-none min-h-[24px] max-h-[200px] text-text outline-none transition-colors duration-200;
}
.message-input:focus {
@apply border-primary;
}
.send-button {
@apply px-5 bg-primary text-white border-none rounded-md cursor-pointer text-[0.9375rem] transition-colors duration-200 flex items-center justify-center;
}
.send-button:hover:not(:disabled) {
@apply bg-primary-hover;
}
.send-button:disabled {
@apply bg-slate-400 cursor-not-allowed opacity-70;
}
/* New chat button in chat window */
.new-chat-button {
@apply flex items-center justify-center;
}
.new-chat-button:hover {
@apply bg-green-600;
}
/* Floating new chat button */
.floating-new-chat {
@apply fixed bottom-20 right-6 bg-green-500 hover:bg-green-600 text-white rounded-full w-12 h-12 flex items-center justify-center shadow-lg z-10;
}
@media (max-width: 768px) {
.floating-new-chat {
@apply bottom-24 right-4 w-10 h-10;
}
}
/* Streaming indicator */
.streaming-indicator {
@apply flex items-center justify-center py-2 px-4 my-4 bg-blue-50 rounded-md text-blue-600 w-max mx-auto;
}
.pulse-dot {
@apply w-2 h-2 bg-blue-500 rounded-full;
animation: pulse 1.5s infinite;
}
@keyframes pulse {
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
}
}
/* Loading cursor */
.loading-cursor {
@apply inline-block w-0.5 h-[1.2em] bg-current ml-0.5 animate-blink align-text-bottom;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
}
@layer components {
/* Settings modal */
.settings-overlay {
@apply fixed inset-0 bg-black/50 flex items-center justify-center z-[1000];
}
.settings-modal {
@apply bg-background rounded-lg w-[600px] max-w-[90%] max-h-[90vh] overflow-y-auto relative p-6 shadow-md;
}
.settings-panel h2 {
@apply text-xl font-semibold mb-5 text-text;
}
.close-settings-button {
@apply absolute top-4 right-4 bg-transparent border-none text-xl cursor-pointer text-lightest-text w-6 h-6 flex items-center justify-center rounded;
}
.close-settings-button:hover {
@apply bg-hover text-text;
}
/* Profile management in settings */
.profiles-section {
@apply mb-6 border-b border-border pb-5;
}
.profiles-header {
@apply flex justify-between items-center mb-3;
}
.profiles-header h3 {
@apply text-base font-semibold text-text;
}
.add-profile-button {
@apply py-1 px-2 bg-transparent border border-border rounded text-sm text-text cursor-pointer transition-all duration-200;
}
.add-profile-button:hover {
@apply bg-hover;
}
.profiles-list {
@apply flex flex-wrap gap-2 mb-4;
}
.profile-item {
@apply py-2 px-3 bg-background border border-border rounded text-sm cursor-pointer transition-all duration-200 flex items-center gap-2;
}
.profile-item:hover {
@apply bg-hover;
}
.profile-item.active {
@apply bg-active border-primary;
}
.delete-profile-button {
@apply bg-transparent border-none text-lightest-text cursor-pointer text-base transition-colors duration-200 flex items-center justify-center w-5 h-5;
}
.delete-profile-button:hover {
@apply text-red-600;
}
.current-profile-section h3 {
@apply text-base font-semibold text-text mb-4;
}
.setting-item {
@apply mb-4;
}
.setting-item label {
@apply block mb-1.5 text-sm text-light-text;
}
.setting-item input {
@apply w-full py-2 px-3 border border-border rounded text-sm transition-colors duration-200;
}
.setting-item input:focus {
@apply outline-none border-primary;
}
.setting-hint {
@apply mt-1;
}
.hint-toggle {
@apply bg-transparent border-none text-primary cursor-pointer text-xs p-0 text-left;
}
.hint-content {
@apply hidden mt-2 text-xs text-light-text bg-hover p-2 rounded;
}
.hint-content.expanded {
@apply block;
}
.hint-content p {
@apply mb-1.5;
}
.hint-content ul {
@apply ml-5;
}
.hint-content li {
@apply mb-1;
}
.settings-actions {
@apply flex justify-end gap-2.5 mt-6;
}
.save-button {
@apply py-2 px-4 bg-primary text-white border-none rounded cursor-pointer text-sm transition-colors duration-200;
}
.save-button:hover {
@apply bg-primary-hover;
}
.cancel-button {
@apply py-2 px-4 bg-transparent border border-border rounded cursor-pointer text-sm transition-all duration-200;
}
.cancel-button:hover {
@apply bg-hover;
}
}
@layer components {
/* Error and notification styles */
.error-message {
@apply fixed bottom-5 left-1/2 -translate-x-1/2 bg-red-100 text-red-600 py-2.5 px-5 rounded text-sm shadow-md z-[1000];
}
.loading {
@apply fixed bottom-5 left-1/2 -translate-x-1/2 bg-blue-50 text-blue-700 py-2.5 px-5 rounded text-sm shadow-md z-[1000];
}
}
@layer utilities {
/* Custom scrollbar */
::-webkit-scrollbar {
@apply w-1.5 h-1.5;
}
::-webkit-scrollbar-track {
@apply bg-transparent;
}
::-webkit-scrollbar-thumb {
@apply bg-gray-300 rounded-sm;
}
::-webkit-scrollbar-thumb:hover {
@apply bg-gray-400;
}
}
/* Responsive styles */
@media (max-width: 768px) {
.app-header {
padding: 0 1rem;
}
.app-title {
font-size: 1rem;
}
.sidebar {
position: fixed;
z-index: 50;
height: 100%;
width: 100%;
left: -100%;
transition: all 0.3s ease-in-out;
}
.sidebar.mobile-open {
left: 0;
}
/* Make sure the collapsed sidebar is still visible on mobile */
.sidebar.collapsed {
width: 50px;
left: 0;
}
/* Hide the floating expand button on mobile as it's not needed */
.expand-sidebar-button {
display: none;
}
.message-content {
max-width: 100%;
}
.settings-modal {
width: 95%;
max-height: 80vh;
}
.profiles-list {
flex-direction: column;
gap: 0.5rem;
}
.chat-input {
padding: 0.75rem;
}
.message-input {
font-size: 0.875rem;
}
.send-button {
padding: 0 1rem;
}
}
/* Small mobile devices */
@media (max-width: 480px) {
.app-header {
height: 50px;
}
.right-section {
gap: 0.5rem;
}
.profile-dropdown-button,
.settings-button {
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
}
.chat-messages {
padding: 0.75rem;
}
.message-content {
padding: 0.75rem;
font-size: 0.875rem;
}
.welcome-screen h2 {
font-size: 1.25rem;
}
}