Spaces:
Sleeping
Sleeping
| /* Chat Interface Styles */ | |
| .chat-container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| background: #ffffff; | |
| } | |
| .chat-header { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| padding: 1.5rem 2rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| box-shadow: 0 2px 10px rgba(0,0,0,0.1); | |
| } | |
| .header-content h1 { | |
| margin: 0; | |
| font-size: 2rem; | |
| font-weight: 700; | |
| } | |
| .header-content .subtitle { | |
| margin: 0.25rem 0 0 0; | |
| opacity: 0.9; | |
| font-size: 1rem; | |
| } | |
| .header-controls { | |
| display: flex; | |
| align-items: center; | |
| gap: 1rem; | |
| } | |
| .status-indicator { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| background: rgba(255,255,255,0.1); | |
| padding: 0.5rem 1rem; | |
| border-radius: 20px; | |
| backdrop-filter: blur(10px); | |
| } | |
| .status-dot { | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| background: #4ade80; | |
| animation: pulse 2s infinite; | |
| } | |
| .status-text { | |
| font-size: 0.875rem; | |
| font-weight: 500; | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { opacity: 1; } | |
| 50% { opacity: 0.5; } | |
| } | |
| .chat-main { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| .messages-container { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: 2rem; | |
| background: #f8fafc; | |
| } | |
| .welcome-message { | |
| text-align: center; | |
| max-width: 600px; | |
| margin: 0 auto; | |
| padding: 3rem 2rem; | |
| } | |
| .welcome-icon { | |
| font-size: 4rem; | |
| margin-bottom: 1rem; | |
| } | |
| .welcome-message h2 { | |
| color: #1e293b; | |
| margin-bottom: 1rem; | |
| font-size: 1.875rem; | |
| font-weight: 600; | |
| } | |
| .welcome-message p { | |
| color: #64748b; | |
| margin-bottom: 2rem; | |
| font-size: 1.125rem; | |
| line-height: 1.6; | |
| } | |
| .policy-topics { | |
| list-style: none; | |
| padding: 0; | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
| gap: 0.75rem; | |
| margin-top: 1.5rem; | |
| } | |
| .policy-topics li, | |
| .policy-suggestion-btn { | |
| background: white; | |
| padding: 1rem; | |
| border-radius: 8px; | |
| box-shadow: 0 1px 3px rgba(0,0,0,0.1); | |
| color: #475569; | |
| font-weight: 500; | |
| transition: transform 0.2s, box-shadow 0.2s; | |
| cursor: pointer; | |
| font-size: inherit; | |
| font-family: inherit; | |
| width: 100%; | |
| display: block; | |
| text-align: center; | |
| border: 1px solid #e2e8f0; | |
| } | |
| .policy-topics li:hover, | |
| .policy-suggestion-btn:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 4px 12px rgba(0,0,0,0.15); | |
| background: #f8fafc; | |
| } | |
| .policy-suggestion-btn:focus { | |
| outline: 2px solid #667eea; | |
| outline-offset: 2px; | |
| } | |
| .policy-suggestion-btn:active { | |
| transform: translateY(0px); | |
| box-shadow: 0 2px 6px rgba(0,0,0,0.1); | |
| } | |
| .message { | |
| margin-bottom: 1.5rem; | |
| animation: fadeInUp 0.3s ease-out; | |
| } | |
| .message-user { | |
| display: flex; | |
| justify-content: flex-end; | |
| } | |
| .message-assistant { | |
| display: flex; | |
| justify-content: flex-start; | |
| } | |
| .message-content { | |
| max-width: 70%; | |
| padding: 1rem 1.25rem; | |
| border-radius: 18px; | |
| position: relative; | |
| } | |
| .message-user .message-content { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| border-bottom-right-radius: 4px; | |
| } | |
| .message-assistant .message-content { | |
| background: white; | |
| color: #1e293b; | |
| border: 1px solid #e2e8f0; | |
| border-bottom-left-radius: 4px; | |
| box-shadow: 0 1px 3px rgba(0,0,0,0.1); | |
| } | |
| .message-text { | |
| line-height: 1.6; | |
| margin-bottom: 0; | |
| text-align: left; | |
| } | |
| /* Rich text formatting for assistant messages */ | |
| .message-text h1 { | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| color: #1e293b; | |
| margin: 1.25rem 0 0.75rem 0; | |
| line-height: 1.3; | |
| } | |
| .message-text h1:first-child { | |
| margin-top: 0; | |
| } | |
| .message-text h2 { | |
| font-size: 1.25rem; | |
| font-weight: 600; | |
| color: #1e293b; | |
| margin: 1rem 0 0.5rem 0; | |
| line-height: 1.3; | |
| } | |
| .message-text h2:first-child { | |
| margin-top: 0; | |
| } | |
| .message-text h3 { | |
| font-size: 1.125rem; | |
| font-weight: 600; | |
| color: #334155; | |
| margin: 0.75rem 0 0.5rem 0; | |
| line-height: 1.3; | |
| } | |
| .message-text h3:first-child { | |
| margin-top: 0; | |
| } | |
| .message-text p { | |
| margin: 0.75rem 0; | |
| color: #1e293b; | |
| line-height: 1.6; | |
| } | |
| .message-text p:first-child { | |
| margin-top: 0; | |
| } | |
| .message-text p:last-child { | |
| margin-bottom: 0; | |
| } | |
| .message-text ul, | |
| .message-text ol { | |
| margin: 0.75rem 0; | |
| padding-left: 1.5rem; | |
| color: #1e293b; | |
| } | |
| .message-text ul:first-child, | |
| .message-text ol:first-child { | |
| margin-top: 0; | |
| } | |
| .message-text ul:last-child, | |
| .message-text ol:last-child { | |
| margin-bottom: 0; | |
| } | |
| .message-text li { | |
| margin: 0.25rem 0; | |
| line-height: 1.5; | |
| } | |
| .message-text ul li { | |
| list-style-type: disc; | |
| } | |
| .message-text ol li { | |
| list-style-type: decimal; | |
| } | |
| .message-text strong { | |
| font-weight: 600; | |
| color: #0f172a; | |
| } | |
| .message-text em { | |
| font-style: italic; | |
| color: #334155; | |
| } | |
| .message-sources { | |
| margin-top: 1rem; | |
| padding-top: 1rem; | |
| border-top: 1px solid #e2e8f0; | |
| } | |
| .sources-header { | |
| font-size: 0.875rem; | |
| font-weight: 600; | |
| color: #64748b; | |
| margin-bottom: 0.5rem; | |
| } | |
| .source-citation { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| padding: 0.5rem; | |
| background: #f1f5f9; | |
| border-radius: 6px; | |
| margin-bottom: 0.5rem; | |
| font-size: 0.875rem; | |
| } | |
| .source-icon { | |
| width: 16px; | |
| height: 16px; | |
| color: #64748b; | |
| } | |
| .confidence-score { | |
| margin-top: 0.75rem; | |
| padding: 0.5rem; | |
| background: #f8fafc; | |
| border-radius: 6px; | |
| font-size: 0.875rem; | |
| color: #64748b; | |
| } | |
| .confidence-bar { | |
| height: 4px; | |
| background: #e2e8f0; | |
| border-radius: 2px; | |
| margin-top: 0.25rem; | |
| overflow: hidden; | |
| } | |
| .confidence-fill { | |
| height: 100%; | |
| background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%); | |
| border-radius: 2px; | |
| transition: width 0.3s ease; | |
| } | |
| .message-feedback { | |
| display: flex; | |
| gap: 0.75rem; | |
| margin-top: 1rem; | |
| padding-top: 0.75rem; | |
| border-top: 1px solid #e2e8f0; | |
| } | |
| .feedback-btn { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| background: #f8fafc; | |
| border: 1px solid #e2e8f0; | |
| border-radius: 20px; | |
| padding: 0.5rem 0.75rem; | |
| color: #64748b; | |
| font-size: 0.875rem; | |
| cursor: pointer; | |
| transition: all 0.2s; | |
| } | |
| .feedback-btn:hover { | |
| background: #f1f5f9; | |
| transform: translateY(-1px); | |
| box-shadow: 0 2px 4px rgba(0,0,0,0.05); | |
| } | |
| .feedback-btn svg { | |
| color: #94a3b8; | |
| } | |
| .feedback-thanks { | |
| color: #10b981; | |
| font-size: 0.875rem; | |
| font-style: italic; | |
| padding: 0.5rem 0; | |
| } | |
| .feedback-form { | |
| width: 100%; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.75rem; | |
| } | |
| .feedback-form p { | |
| margin: 0; | |
| font-size: 0.875rem; | |
| color: #64748b; | |
| } | |
| .feedback-select, .feedback-textarea { | |
| padding: 0.75rem; | |
| border: 1px solid #e2e8f0; | |
| border-radius: 6px; | |
| background: white; | |
| font-family: inherit; | |
| font-size: 0.875rem; | |
| color: #1e293b; | |
| width: 100%; | |
| } | |
| .feedback-textarea { | |
| resize: vertical; | |
| min-height: 80px; | |
| } | |
| .feedback-actions { | |
| display: flex; | |
| justify-content: flex-end; | |
| } | |
| .feedback-actions .primary-button { | |
| padding: 0.5rem 1rem; | |
| font-size: 0.875rem; | |
| } | |
| .input-container { | |
| padding: 1.5rem 2rem; | |
| background: white; | |
| border-top: 1px solid #e2e8f0; | |
| } | |
| .chat-form { | |
| max-width: 800px; | |
| margin: 0 auto; | |
| } | |
| .input-wrapper { | |
| display: flex; | |
| align-items: flex-end; | |
| gap: 0.75rem; | |
| background: #f8fafc; | |
| border: 2px solid #e2e8f0; | |
| border-radius: 12px; | |
| padding: 0.75rem; | |
| transition: border-color 0.2s; | |
| } | |
| .input-wrapper:focus-within { | |
| border-color: #667eea; | |
| box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); | |
| } | |
| #messageInput { | |
| flex: 1; | |
| border: none; | |
| background: transparent; | |
| resize: none; | |
| font-family: 'Inter', sans-serif; | |
| font-size: 1rem; | |
| line-height: 1.5; | |
| min-height: 20px; | |
| max-height: 120px; | |
| padding: 0; | |
| outline: none; | |
| color: #1e293b; | |
| } | |
| #messageInput::placeholder { | |
| color: #94a3b8; | |
| } | |
| .send-button { | |
| background: #667eea; | |
| color: white; | |
| border: none; | |
| border-radius: 8px; | |
| padding: 0.75rem; | |
| cursor: pointer; | |
| transition: all 0.2s; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| min-width: 44px; | |
| } | |
| .send-button:hover:not(:disabled) { | |
| background: #5a67d8; | |
| transform: translateY(-1px); | |
| } | |
| .send-button:disabled { | |
| background: #cbd5e1; | |
| cursor: not-allowed; | |
| transform: none; | |
| } | |
| .input-options { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| margin-top: 0.75rem; | |
| font-size: 0.875rem; | |
| } | |
| .checkbox-label { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| cursor: pointer; | |
| color: #64748b; | |
| user-select: none; | |
| } | |
| .checkbox-label input[type="checkbox"] { | |
| display: none; | |
| } | |
| .checkmark { | |
| width: 18px; | |
| height: 18px; | |
| border: 2px solid #cbd5e1; | |
| border-radius: 4px; | |
| position: relative; | |
| transition: all 0.2s; | |
| } | |
| .checkbox-label input[type="checkbox"]:checked + .checkmark { | |
| background: #667eea; | |
| border-color: #667eea; | |
| } | |
| .checkbox-label input[type="checkbox"]:checked + .checkmark::after { | |
| content: ''; | |
| position: absolute; | |
| left: 5px; | |
| top: 2px; | |
| width: 4px; | |
| height: 8px; | |
| border: solid white; | |
| border-width: 0 2px 2px 0; | |
| transform: rotate(45deg); | |
| } | |
| .char-counter { | |
| color: #94a3b8; | |
| font-size: 0.8rem; | |
| } | |
| .char-counter.warning { | |
| color: #f59e0b; | |
| } | |
| .char-counter.error { | |
| color: #ef4444; | |
| } | |
| .chat-footer { | |
| padding: 1rem 2rem; | |
| background: #f8fafc; | |
| border-top: 1px solid #e2e8f0; | |
| text-align: center; | |
| font-size: 0.875rem; | |
| color: #64748b; | |
| } | |
| .chat-footer a { | |
| color: #667eea; | |
| text-decoration: none; | |
| } | |
| .chat-footer a:hover { | |
| text-decoration: underline; | |
| } | |
| .loading-overlay { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| background: rgba(255,255,255,0.9); | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| z-index: 1000; | |
| backdrop-filter: blur(4px); | |
| } | |
| .loading-overlay.hidden { | |
| display: none; | |
| } | |
| .loading-spinner { | |
| width: 40px; | |
| height: 40px; | |
| border: 4px solid #e2e8f0; | |
| border-top: 4px solid #667eea; | |
| border-radius: 50%; | |
| animation: spin 1s linear infinite; | |
| margin-bottom: 1rem; | |
| } | |
| .loading-overlay p { | |
| color: #64748b; | |
| font-size: 1.125rem; | |
| margin: 0; | |
| } | |
| @keyframes spin { | |
| 0% { transform: rotate(0deg); } | |
| 100% { transform: rotate(360deg); } | |
| } | |
| @keyframes fadeInUp { | |
| from { | |
| opacity: 0; | |
| transform: translateY(20px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| /* Error message styles */ | |
| .error-message { | |
| background: #fef2f2; | |
| border: 1px solid #fecaca; | |
| color: #dc2626; | |
| padding: 1rem; | |
| border-radius: 8px; | |
| margin: 1rem 0; | |
| } | |
| .error-message strong { | |
| display: block; | |
| margin-bottom: 0.5rem; | |
| } | |
| /* Responsive design */ | |
| @media (max-width: 768px) { | |
| .chat-header { | |
| padding: 1rem; | |
| flex-direction: column; | |
| gap: 1rem; | |
| text-align: center; | |
| } | |
| .header-content h1 { | |
| font-size: 1.5rem; | |
| } | |
| .messages-container { | |
| padding: 1rem; | |
| } | |
| .welcome-message { | |
| padding: 2rem 1rem; | |
| } | |
| .policy-topics { | |
| grid-template-columns: 1fr; | |
| } | |
| .message-content { | |
| max-width: 85%; | |
| } | |
| .input-container { | |
| padding: 1rem; | |
| } | |
| .input-options { | |
| flex-direction: column; | |
| gap: 0.5rem; | |
| align-items: flex-start; | |
| } | |
| } | |
| /* Side Panel */ | |
| .side-panel { | |
| position: fixed; | |
| top: 0; | |
| right: -400px; | |
| width: 350px; | |
| max-width: 90vw; | |
| height: 100vh; | |
| background: white; | |
| box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1); | |
| z-index: 100; | |
| transition: right 0.3s ease; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .side-panel.show { | |
| right: 0; | |
| } | |
| .panel-header { | |
| padding: 1.5rem; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .panel-header h3 { | |
| margin: 0; | |
| font-size: 1.25rem; | |
| font-weight: 600; | |
| } | |
| .panel-body { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: 1rem; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| .panel-actions { | |
| padding: 0.5rem 0; | |
| border-bottom: 1px solid #e2e8f0; | |
| margin-bottom: 1rem; | |
| } | |
| .icon-button { | |
| background: transparent; | |
| border: none; | |
| color: currentColor; | |
| cursor: pointer; | |
| padding: 0.5rem; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| border-radius: 50%; | |
| transition: background-color 0.2s; | |
| } | |
| .icon-button:hover { | |
| background-color: rgba(255, 255, 255, 0.2); | |
| } | |
| .icon-button.small { | |
| padding: 0.25rem; | |
| } | |
| .primary-button { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| background: #667eea; | |
| color: white; | |
| border: none; | |
| padding: 0.75rem 1rem; | |
| border-radius: 8px; | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: all 0.2s; | |
| } | |
| .primary-button:hover { | |
| background: #5a67d8; | |
| transform: translateY(-1px); | |
| } | |
| .conversation-list { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.75rem; | |
| flex: 1; | |
| } | |
| .conversation-item { | |
| padding: 0.75rem; | |
| background: #f8fafc; | |
| border-radius: 8px; | |
| border: 1px solid #e2e8f0; | |
| cursor: pointer; | |
| transition: all 0.2s; | |
| position: relative; | |
| } | |
| .conversation-item.active { | |
| background: rgba(102, 126, 234, 0.1); | |
| border-color: #667eea; | |
| } | |
| .conversation-item:hover { | |
| background: #f1f5f9; | |
| transform: translateY(-1px); | |
| } | |
| .conversation-item h4 { | |
| margin: 0 0 0.5rem 0; | |
| font-size: 1rem; | |
| font-weight: 600; | |
| color: #1e293b; | |
| } | |
| .conversation-meta { | |
| font-size: 0.8rem; | |
| color: #64748b; | |
| } | |
| .conversation-actions { | |
| position: absolute; | |
| top: 0.75rem; | |
| right: 0.75rem; | |
| opacity: 0; | |
| transition: opacity 0.2s; | |
| } | |
| .conversation-item:hover .conversation-actions { | |
| opacity: 1; | |
| } | |
| .empty-state { | |
| text-align: center; | |
| padding: 2rem 1rem; | |
| color: #64748b; | |
| } | |
| @media (max-width: 480px) { | |
| .welcome-message h2 { | |
| font-size: 1.5rem; | |
| } | |
| .welcome-message p { | |
| font-size: 1rem; | |
| } | |
| .message-content { | |
| max-width: 95%; | |
| } | |
| } | |