@use 'sass:color'; @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); // Dash color palette - updated to use Dash's blue colors $primary-color: #487af0; // Dash blue $primary-light: #e6f0fc; $secondary-color: #f7f7f9; $accent-color: #b5d9f3; // Light blue accent $bg-color: #ffffff; $text-color: #111827; $light-text-color: #6b7280; $border-color: #e5e7eb; $shadow-color: rgba(0, 0, 0, 0.06); $transition: all 0.2s ease-in-out; // Font size variables $font-size-small: 13px; $font-size-normal: 14px; $font-size-large: 16px; $font-size-xlarge: 18px; .chat-box { display: flex; flex-direction: column; height: 100%; width: 100%; background-color: $bg-color; font-family: 'Inter', sans-serif; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px $shadow-color; position: relative; transition: box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); &:hover { box-shadow: 0 8px 30px rgba($primary-color, 0.1); } .chat-header { background: $primary-color; color: white; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); z-index: 10; position: relative; h2 { margin: 0px; font-size: 1.25rem; font-weight: 600; letter-spacing: 0.01em; flex: 1; text-align: center; } .header-controls { display: flex; align-items: center; gap: 8px; } .canvas-mode-toggle, .font-size-control { display: flex; align-items: center; justify-content: center; background-color: rgba(255, 255, 255, 0.15); color: white; border-radius: 6px; padding: 6px; cursor: pointer; transition: background-color 0.2s ease; &:hover { background-color: rgba(255, 255, 255, 0.25); } svg { width: 20px; height: 20px; } } .canvas-mode-toggle { position: relative; // Visual indicator for active state &::after { content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.7); opacity: 0; transition: opacity 0.2s ease; } // Show indicator when canvas mode is active &.canvas-active::after { opacity: 1; } } .font-size-modal { position: absolute; top: 100%; right: 10px; background-color: white; border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); padding: 12px; width: 180px; z-index: 100; transform-origin: top right; animation: scaleIn 0.2s forwards; .font-size-option { display: flex; align-items: center; padding: 8px 12px; border-radius: 6px; cursor: pointer; transition: background-color 0.2s ease; color: $text-color; margin-bottom: 4px; &:last-child { margin-bottom: 0px; } &:hover { background-color: $primary-light; } &.active { background-color: $primary-light; color: $primary-color; font-weight: 500; } .option-label { flex: 1; } .size-preview { font-size: 10px; opacity: 0.7; &.small { font-size: 11px; } &.normal { font-size: 14px; } &.large { font-size: 16px; } &.xlarge { font-size: 18px; } } } } } .chat-messages { flex-grow: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; background-color: #f9fafb; background-image: radial-gradient(#e5e7eb 1px, transparent 1px), radial-gradient(#e5e7eb 1px, transparent 1px); background-size: 40px 40px; background-position: 0 0, 20px 20px; background-attachment: local; scroll-behavior: smooth; &::-webkit-scrollbar { width: 6px; } &::-webkit-scrollbar-track { background: transparent; } &::-webkit-scrollbar-thumb { background-color: rgba($primary-color, 0.2); border-radius: 10px; &:hover { background-color: rgba($primary-color, 0.3); } } } .chat-input { display: flex; padding: 16px 20px; border-top: 1px solid $border-color; background-color: white; box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05); position: relative; align-items: center; z-index: 5; transition: padding 0.2s ease; &::before { content: ''; position: absolute; top: -5px; left: 0px; right: 0px; height: 5px; background: linear-gradient(to top, rgba(0, 0, 0, 0.06), transparent); pointer-events: none; } .input-container { position: relative; flex-grow: 1; display: flex; align-items: center; border-radius: 24px; background-color: #f9fafb; border: 1px solid $border-color; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03); transition: all 0.25s ease; overflow: hidden; &:focus-within { border-color: $primary-color; box-shadow: 0 0 0 3px rgba($primary-color, 0.15); background-color: white; transform: translateY(-1px); } input { flex-grow: 1; padding: 14px 18px; border: none; background: transparent; font-size: 14px; transition: all 0.25s ease; width: 100%; &:focus { outline: none; } &:disabled { background-color: #f3f4f6; cursor: not-allowed; } &::placeholder { color: #9ca3af; } } } .submit-button { background: $primary-color; color: white; border: none; border-radius: 50%; width: 48px; height: 48px; min-width: 48px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 8px rgba($primary-color, 0.3); position: relative; overflow: hidden; &:hover { background-color: #3b6cd7; /* Slightly darker blue */ box-shadow: 0 3px 10px rgba($primary-color, 0.4); } &:active { background-color: #3463cc; /* Even darker for active state */ box-shadow: 0 2px 6px rgba($primary-color, 0.3); } &:disabled { background: #9ca3af; box-shadow: none; cursor: not-allowed; } svg { width: 20px; height: 20px; } .spinner { width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, 0.3); border-top: 3px solid #fff; border-radius: 50%; animation: spin 0.8s cubic-bezier(0.34, 0.61, 0.71, 0.97) infinite; } } } .citation-popup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 500px; max-height: 300px; border-radius: 8px; background-color: white; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25); z-index: 1000; display: flex; flex-direction: column; overflow: hidden; animation: popup-fade-in 0.3s ease-out; } .citation-popup-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background-color: #f5f5f5; border-bottom: 1px solid #ddd; } .citation-content { padding: 15px; overflow-y: auto; max-height: 240px; } .citation-close-button { background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: #666; transition: background-color 0.2s; &:hover { background-color: #ddd; } svg { width: 20px; height: 20px; stroke-width: 2.5; } } } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); } 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } } // Font size modifiers .font-size-small { .message-content, .chat-input input, .follow-up-button, .follow-up-questions h4, .processing-info, .processing-info .dropdown-item, .toggle-info { font-size: $font-size-small !important; } } .font-size-normal { .message-content, .chat-input input, .follow-up-button, .follow-up-questions h4, .processing-info, .processing-info .dropdown-item, .toggle-info { font-size: $font-size-normal !important; } } .font-size-large { .message-content, .chat-input input, .follow-up-button, .follow-up-questions h4, .processing-info, .processing-info .dropdown-item, .toggle-info { font-size: $font-size-large !important; } } .font-size-xlarge { .message-content, .chat-input input, .follow-up-button, .follow-up-questions h4, .processing-info, .processing-info .dropdown-item, .toggle-info { font-size: $font-size-xlarge !important; } } .message { max-width: 80%; padding: 16px; border-radius: 16px; font-size: 14px; line-height: 1.6; box-shadow: 0 2px 8px $shadow-color; word-wrap: break-word; display: flex; flex-direction: column; position: relative; transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); &:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } &.user { align-self: flex-end; background: $primary-color; color: white; border-bottom-right-radius: 4px; transform-origin: bottom right; animation: messageInUser 0.3s forwards; strong { color: rgba(255, 255, 255, 0.9); } } &.assistant { align-self: flex-start; background-color: white; color: $text-color; border-bottom-left-radius: 4px; border: 1px solid $border-color; transform-origin: bottom left; animation: messageInAssistant 0.3s forwards; .message-content { p, li, a { margin: 8px 0; &:first-child { margin-top: 0px; } &:last-child { margin-bottom: 0px; } } pre { background-color: #f3f4f6; padding: 12px; border-radius: 8px; overflow-x: auto; font-size: 13px; border: 1px solid $border-color; } code { background-color: #f3f4f6; padding: 2px 5px; border-radius: 4px; font-size: 13px; font-family: monospace; } } } @keyframes messageInUser { 0% { opacity: 0; transform: translateY(10px) scale(0.95); } 100% { opacity: 1; transform: translateY(0) scale(1); } } @keyframes messageInAssistant { 0% { opacity: 0; transform: translateY(10px) scale(0.95); } 100% { opacity: 1; transform: translateY(0) scale(1); } } .processing-info { margin: 0 0 12px 0; padding: 12px 16px; background-color: #f3f4f6; border-radius: 10px; font-size: 14px; transform-origin: top center; animation: fadeInExpand 0.3s forwards; .dropdown-item { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed #e5e7eb; &:last-child { margin-bottom: 0px; padding-bottom: 0px; border-bottom: none; } strong { color: $primary-color; font-weight: 600; } } .info-content { margin-top: 12px; max-height: 200px; overflow-y: auto; padding-right: 8px; &::-webkit-scrollbar { width: 4px; } &::-webkit-scrollbar-thumb { background-color: rgba($primary-color, 0.1); border-radius: 8px; } } } .toggle-info { background-color: rgba($primary-color, 0.05); color: $primary-color; border: 1px solid rgba($primary-color, 0.3); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; width: 100%; &:hover { background-color: rgba($primary-color, 0.1); border-color: rgba($primary-color, 0.4); } &:active { background-color: rgba($primary-color, 0.15); } &:focus { outline: none; box-shadow: 0 0 0 2px rgba($primary-color, 0.2); } } .message-content { background-color: inherit; padding: 0px; border-radius: 8px; font-size: 14px; line-height: 1.6; color: inherit; .citation-button { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background-color: rgba($primary-color, 0.1); color: $primary-color; font-size: 10px; font-weight: 600; margin-left: 3px; cursor: pointer; transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94); border: 1px solid rgba($primary-color, 0.2); vertical-align: super; &:hover { background-color: $primary-color; color: white; transform: scale(1.1); box-shadow: 0 2px 6px rgba($primary-color, 0.4); } &:active { transform: scale(0.95); } } a { color: $primary-color; text-decoration: none; transition: $transition; border-bottom: 1px dashed rgba($primary-color, 0.3); &:hover { border-bottom: 1px solid $primary-color; } } } } .follow-up-questions { margin-top: 14px; background-color: rgba($primary-color, 0.05); padding: 14px; border-radius: 10px; border: 1px solid rgba($primary-color, 0.1); animation: fadeInUp 0.4s forwards; transition: box-shadow 0.2s ease; &:hover { box-shadow: 0 4px 12px rgba($primary-color, 0.08); } h4 { font-size: 13px; font-weight: 600; margin: 0 0 10px 0; color: $primary-color; letter-spacing: 0.02em; } .questions-list { display: flex; flex-direction: column; gap: 8px; } .follow-up-button { background-color: white; color: $text-color; border: 1px solid rgba($primary-color, 0.2); border-radius: 8px; padding: 10px 14px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; text-align: left; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); position: relative; overflow: hidden; text-transform: none !important; /* Force no text transform */ &:hover { background-color: $primary-light; border-color: rgba($primary-color, 0.3); box-shadow: 0 2px 4px rgba($primary-color, 0.1); } &:active { background-color: color.adjust($primary-light, $lightness: -3%); } } } @keyframes fadeInUp { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } } @keyframes fadeInExpand { 0% { opacity: 0; transform: scaleY(0.9); } 100% { opacity: 1; transform: scaleY(1); } } .uploading-overlay { position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; background-color: rgba(255, 255, 255, 0.92); display: flex; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(4px); animation: fadeIn 0.3s ease; .progress-container { width: 80%; max-width: 400px; background-color: white; padding: 24px; border-radius: 12px; box-shadow: 0 10px 40px rgba($primary-color, 0.2); animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); .progress-bar-wrapper { height: 8px; background-color: #f3f4f6; border-radius: 4px; margin-bottom: 16px; overflow: hidden; .progress-bar { height: 100%; background: linear-gradient(90deg, $primary-color, $accent-color); border-radius: 4px; transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); } } .progress-details { display: flex; justify-content: space-between; align-items: center; .progress-percentage { font-weight: 600; color: $primary-color; font-size: 16px; } .step-name { color: $light-text-color; font-size: 14px; } } } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @keyframes scaleIn { 0% { transform: scale(0.9); opacity: 0; } 100% { transform: scale(1); opacity: 1; } } @keyframes popup-slide-up { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } } @keyframes popup-fade-in { from { opacity: 0; transform: translate(-50%, -45%); } to { opacity: 1; transform: translate(-50%, -50%); } } @media (max-width: 768px) { .chat-box { border-radius: 0px; } .message { max-width: 88%; padding: 14px; } .chat-input { padding: 12px; } } // Responsive scaling @media (max-width: 480px) { .chat-box .chat-input input { font-size: 13px; padding: 12px 14px; } .message { max-width: 95%; padding: 12px; font-size: 13px; } .follow-up-questions { padding: 12px; } } // Dark mode support .dark-mode .chat-box { background-color: #1f2937; .chat-header { background: $primary-color; .font-size-control { background-color: rgba(255, 255, 255, 0.2); &:hover { background-color: rgba(255, 255, 255, 0.3); } } .font-size-modal { background-color: #1f2937; border: 1px solid #374151; .font-size-option { color: #f9fafb; &:hover { background-color: #2d3748; } &.active { background-color: rgba($primary-color, 0.2); } } } } .chat-messages { background-color: #111827; background-image: radial-gradient(#374151 1px, transparent 1px), radial-gradient(#374151 1px, transparent 1px); } .chat-input { background-color: #1f2937; border-top-color: #374151; .input-container { background-color: #374151; border-color: #4b5563; &:focus-within { background-color: #2d3748; border-color: $primary-color; } input { color: white; &::placeholder { color: #9ca3af; } } } } .message { &.assistant { background-color: #1f2937; border-color: #374151; color: #f9fafb; .message-content { pre, code { background-color: #111827; border-color: #374151; } } } .processing-info { background-color: #111827; .dropdown-item { border-color: #374151; } } } .follow-up-questions { background-color: rgba($primary-color, 0.1); border-color: rgba($primary-color, 0.2); .follow-up-button { background-color: #1f2937; color: #f9fafb; border-color: #4b5563; &:hover { background-color: #2d3748; } } } .uploading-overlay { background-color: rgba(31, 41, 55, 0.9); .progress-container { background-color: #1f2937; .progress-bar-wrapper { background-color: #111827; } } } } /* Tool Reload Modal Styles */ .tool-reload-modal-overlay { position: fixed; top: 0px; left: 0px; right: 0px; bottom: 0px; background-color: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 10000; backdrop-filter: blur(4px); } .tool-reload-modal { background: white; border-radius: 12px; padding: 0px; min-width: 400px; max-width: 500px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); border: 1px solid #e2e8f0; animation: modalSlideIn 0.3s ease-out; } @keyframes modalSlideIn { from { opacity: 0; transform: scale(0.95) translateY(-20px); } to { opacity: 1; transform: scale(1) translateY(0); } } .tool-reload-modal-header { padding: 24px 24px 16px 24px; border-bottom: 1px solid #e2e8f0; h3 { margin: 0px; font-size: 18px; font-weight: 600; color: #1a202c; display: flex; align-items: center; &::before { content: '🛠️'; margin-right: 8px; font-size: 20px; } } } .tool-reload-modal-content { padding: 20px 24px; p { margin: 0 0 12px 0; line-height: 1.5; color: #4a5568; &:last-child { margin-bottom: 0px; } strong { color: #2d3748; font-weight: 600; } } } .tool-reload-modal-actions { padding: 16px 24px 24px 24px; display: flex; gap: 12px; justify-content: flex-end; button { padding: 10px 20px; border-radius: 6px; font-weight: 500; font-size: 14px; cursor: pointer; transition: all 0.2s ease; border: none; &.primary { background: #3182ce; color: white; &:hover { background: #2c5aa0; transform: translateY(-1px); } &:active { transform: translateY(0); } } &.secondary { background: #f7fafc; color: #4a5568; border: 1px solid #e2e8f0; &:hover { background: #edf2f7; border-color: #cbd5e0; } } } }