/* Chat App Container Layout */ .chat-app-container { display: flex; flex-direction: column; height: 100%; width: 100%; min-height: 0; /* Belangrijk voor flexbox overflow */ padding: 20px; /* Algemene padding voor alle kanten */ box-sizing: border-box; } /* Gemeenschappelijke container voor consistente breedte */ .chat-component-container { width: 100%; max-width: 1000px; /* Optimale breedte */ margin-left: auto; margin-right: auto; display: flex; flex-direction: column; flex: 1; /* Neemt beschikbare verticale ruimte in */ } /* Message Area - neemt alle beschikbare ruimte */ .chat-messages-area { flex: 1; /* Neemt alle beschikbare ruimte */ overflow: hidden; /* Voorkomt dat het groter wordt dan container */ display: flex; flex-direction: column; min-height: 0; /* Belangrijk voor nested flexbox */ margin-bottom: 20px; /* Ruimte tussen messages en input */ border-radius: 15px; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 4px 20px rgba(0,0,0,0.1); width: 100%; max-width: 1000px; /* Optimale breedte */ margin-left: auto; margin-right: auto; /* Horizontaal centreren */ align-self: center; /* Extra centrering in flexbox context */ } /* Chat Input - altijd onderaan */ .chat-input-area { flex: none; /* Neemt alleen benodigde ruimte */ border-radius: 15px; background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 4px 20px rgba(0,0,0,0.1); z-index: 10; width: 100%; max-width: 1000px; /* Optimale breedte */ margin-left: auto; margin-right: auto; /* Horizontaal centreren */ align-self: center; /* Extra centrering in flexbox context */ } /* Zorg dat de MessageHistory container ook flexbox gebruikt */ .message-history-container { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 20px; /* Interne padding voor MessageHistory */ box-sizing: border-box; width: 100%; max-width: 1000px; /* Optimale breedte */ margin-left: auto; margin-right: auto; /* Horizontaal centreren */ } .chat-messages { flex: 1; overflow-y: auto; padding-right: 10px; /* Ruimte voor scrollbar */ margin-right: -10px; /* Compenseer voor scrollbar */ scroll-behavior: smooth; } /* Chat Input styling */ .chat-input-container { width: 100%; position: relative; padding: 20px; /* Interne padding voor ChatInput */ box-sizing: border-box; max-width: 1000px; /* Optimale breedte */ margin-left: auto; margin-right: auto; /* Horizontaal centreren */ } .chat-input { display: flex; align-items: flex-end; gap: 12px; padding: 20px; background: white; border-radius: 15px; box-shadow: 0 2px 15px rgba(0,0,0,0.1); border: 1px solid rgba(0,0,0,0.05); } .input-main { flex: 1; position: relative; } .message-input { width: 100%; min-height: 45px; max-height: 120px; padding: 12px 18px; border: 1px solid #ddd; border-radius: 25px; resize: none; font-family: inherit; font-size: 14px; line-height: 1.4; outline: none; transition: all 0.2s ease; box-sizing: border-box; } .message-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1); } .message-input.over-limit { border-color: #dc3545; background-color: rgba(220, 53, 69, 0.05); } .input-actions { display: flex; align-items: center; gap: 8px; } .send-btn { width: 45px; height: 45px; border: none; border-radius: 50%; background: var(--primary-color); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: all 0.2s ease; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } .send-btn:hover:not(:disabled) { background: var(--secondary-color); transform: scale(1.05); box-shadow: 0 4px 15px rgba(0,0,0,0.2); } .send-btn:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; } /* Character counter */ .character-counter { position: absolute; bottom: -25px; right: 15px; font-size: 12px; color: #666; padding: 2px 6px; background: rgba(255,255,255,0.9); border-radius: 10px; backdrop-filter: blur(5px); } .character-counter.over-limit { color: #dc3545; font-weight: bold; background: rgba(220, 53, 69, 0.1); } /* Loading spinner */ .loading-spinner { font-size: 16px; animation: spin 1s linear infinite; } /* Mobile responsiveness */ @media (max-width: 768px) { .chat-app-container { padding: 10px; /* Kleinere padding op mobiel */ } .chat-messages-area { margin-bottom: 15px; max-width: 100%; /* Op mobiel volledige breedte gebruiken */ } .chat-input-area { max-width: 100%; /* Op mobiel volledige breedte gebruiken */ } .message-history-container { padding: 15px; max-width: 100%; /* Op mobiel volledige breedte gebruiken */ } .chat-input-container { padding: 15px; max-width: 100%; /* Op mobiel volledige breedte gebruiken */ } .chat-input { padding: 15px; gap: 10px; } .action-btn { width: 40px; height: 40px; font-size: 16px; } .message-input { font-size: 16px; /* Voorkomt zoom op iOS */ padding: 10px 15px; min-height: 40px; } .chat-component-container { max-width: 100%; /* Op mobiel volledige breedte gebruiken */ } } /* Extra small screens */ @media (max-width: 480px) { .chat-app-container { padding: 8px; } .chat-messages-area { margin-bottom: 12px; } .message-history-container { padding: 12px; } .chat-input-container { padding: 12px; } } /* Loading states */ .chat-input.loading .message-input { opacity: 0.7; } .chat-input.loading .action-btn { animation: pulse 1.5s infinite; } @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } } /* Scrollbar styling voor webkit browsers */ .chat-messages::-webkit-scrollbar { width: 6px; } .chat-messages::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 3px; } .chat-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.3); border-radius: 3px; } .chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.5); } /* Verberg lege message bubbles tot er inhoud is */ .message-text:empty { display: none; } .progress-tracker .status-icon.error { color: #f44336; } .progress-tracker.error .progress-header { background-color: rgba(244, 67, 54, 0.1); border-color: #f44336; } /* Zorg dat de progress tracker goed wordt weergegeven in een lege message bubble */ .message-content:has(.message-text:empty) .message-progress { margin-bottom: 0; } /* Verberg de message content container als er geen inhoud is en de verwerking bezig is */ .message-content:has(.message-text:empty):not(:has(.message-progress.completed)):not(:has(.message-progress.error)) { background: transparent; box-shadow: none; border: none; padding: 0; margin: 0; } /* Focus binnen ChatInput voor toegankelijkheid */ .chat-input:focus-within { box-shadow: 0 2px 20px rgba(0, 123, 255, 0.2); border-color: rgba(0, 123, 255, 0.3); } /* Smooth transitions */ .chat-messages-area, .chat-input-area { transition: all 0.3s ease; } .chat-messages-area:hover, .chat-input-area:hover { box-shadow: 0 6px 25px rgba(0,0,0,0.15); } /* Message Bubbles Styling - Aangepast voor werkelijke template structuur */ /* Basis message container */ .message { display: flex; margin-bottom: 16px; padding: 0 20px; animation: messageSlideIn 0.3s ease-out; clear: both; } /* User message alignment - rechts uitgelijnd */ .message.user { justify-content: flex-end; } /* AI/Bot message alignment - links uitgelijnd */ .message.ai, .message.bot { justify-content: flex-start; } /* Message content wrapper - dit wordt de bubble */ .message-content { max-width: 70%; padding: 12px 16px; border-radius: 18px; word-wrap: break-word; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: all 0.2s ease; display: inline-block; } /* User message bubble styling */ .message.user .message-content { background: linear-gradient(135deg, #007bff, #0056b3); color: white; border-bottom-right-radius: 4px; } /* AI/Bot message bubble styling */ .message.ai .message-content, .message.bot .message-content { background: #f8f9fa; color: #212529; border: 1px solid #e9ecef; border-bottom-left-radius: 4px; margin-right: 60px; } /* Message text content */ .message-text { line-height: 1.4; font-size: 14px; margin-bottom: 6px; } .message-text p { margin: 0; } .message-text p + p { margin-top: 8px; } .btn-small { padding: 4px 12px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; transition: all 0.2s ease; } .btn-primary { background: #007bff; color: white; } .btn-primary:hover { background: #0056b3; } .btn-secondary { background: #6c757d; color: white; } .btn-secondary:hover { background: #545b62; } /* Special message types */ /* Form messages */ .form-message { justify-content: center; margin: 20px 0; } .form-message .message-content { max-width: 90%; background: white; border: 1px solid #e9ecef; border-radius: 12px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); } /* System messages */ .system-message { text-align: center; background: rgba(108, 117, 125, 0.1); color: #6c757d; padding: 8px 16px; border-radius: 20px; font-size: 13px; margin: 10px auto; max-width: 80%; display: flex; align-items: center; justify-content: center; gap: 8px; } .system-icon { font-size: 14px; } /* Error messages */ .error-message { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; border-radius: 8px; padding: 12px 16px; margin: 10px auto; max-width: 80%; display: flex; align-items: center; justify-content: space-between; gap: 12px; } .error-icon { font-size: 16px; color: #dc3545; } .retry-btn { background: #dc3545; color: white; border: none; padding: 4px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; transition: background-color 0.2s ease; } .retry-btn:hover { background: #c82333; } /* Message reactions */ .message-reactions { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; } .reaction { background: rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.1); border-radius: 12px; padding: 2px 8px; font-size: 12px; cursor: pointer; transition: all 0.2s ease; } .reaction:hover { background: rgba(0,0,0,0.1); transform: scale(1.05); } /* Image and file messages */ .message-image { max-width: 100%; max-height: 300px; border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: transform 0.2s ease; } .message-image:hover { transform: scale(1.02); } .image-caption { font-size: 13px; margin-bottom: 6px; opacity: 0.9; } .file-attachment { display: flex; align-items: center; gap: 12px; padding: 12px; background: rgba(0,0,0,0.03); border-radius: 8px; margin-bottom: 8px; } .file-icon { font-size: 24px; } .file-info { flex: 1; } .file-name { font-weight: 500; margin-bottom: 2px; } .file-size { font-size: 12px; opacity: 0.7; } .file-download { font-size: 20px; text-decoration: none; cursor: pointer; transition: transform 0.2s ease; } .file-download:hover { transform: scale(1.1); } /* Hover effects voor message bubbles */ .message-content:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); } /* Bestaande animation en date-separator blijven hetzelfde */ @keyframes messageSlideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* Empty state styling - blijft hetzelfde */ .empty-state { text-align: center; padding: 40px 20px; color: #6c757d; } .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; } .empty-text { font-size: 18px; font-weight: 500; margin-bottom: 8px; } .empty-subtext { font-size: 14px; opacity: 0.8; } /* Mobile responsiveness */ @media (max-width: 768px) { .message { padding: 0 15px; } .message-content { max-width: 85%; padding: 10px 14px; font-size: 14px; } .message.user .message-content { margin-left: 40px; } .message.ai .message-content, .message.bot .message-content { margin-right: 40px; } } @media (max-width: 480px) { .message { padding: 0 10px; } .message-content { max-width: 90%; margin-left: 20px !important; margin-right: 20px !important; } } /* Progress Tracker Styling */ .progress-tracker { margin: 8px 0; border: 1px solid #e9ecef; border-radius: 8px; background: #f8f9fa; overflow: hidden; transition: all 0.3s ease; font-size: 13px; } .progress-tracker.expanded { max-height: 200px; } .progress-tracker.completed { border-color: #28a745; background: #d4edda; } .progress-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; cursor: pointer; background: rgba(0,0,0,0.02); border-bottom: 1px solid transparent; transition: all 0.2s ease; } .progress-header:hover { background: rgba(0,0,0,0.05); } .progress-tracker.expanded .progress-header { border-bottom-color: #e9ecef; } .progress-title { display: flex; align-items: center; gap: 8px; font-weight: 500; color: #495057; } .status-icon { display: inline-block; width: 12px; height: 12px; border-radius: 50%; position: relative; } .status-icon.completed { background: #28a745; color: white; font-size: 8px; line-height: 12px; text-align: center; } .status-icon.in-progress { background: #007bff; animation: pulse 1.5s infinite; } .spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid #f3f3f3; border-top: 2px solid #007bff; border-radius: 50%; animation: spin 1s linear infinite; } .progress-toggle { color: #6c757d; font-size: 14px; transition: transform 0.2s ease; } .progress-tracker.expanded .progress-toggle { transform: rotate(180deg); } .progress-error { padding: 8px 12px; color: #721c24; background: #f8d7da; border-top: 1px solid #f5c6cb; font-size: 12px; } .progress-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; } .progress-tracker.expanded .progress-content { max-height: 150px; overflow-y: auto; } .progress-content.single-line { max-height: 30px; overflow: hidden; padding: 8px 12px; } .progress-line { padding: 4px 12px; border-bottom: 1px solid rgba(0,0,0,0.05); color: #6c757d; line-height: 1.3; } .progress-line:last-child { border-bottom: none; } /* Animaties */ @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } } /* Integratie met message bubbles */ .message.ai .progress-tracker, .message.bot .progress-tracker { margin-bottom: 8px; } /* Mobile responsiveness */ @media (max-width: 768px) { .progress-tracker { font-size: 12px; } .progress-header { padding: 6px 10px; } .progress-line { padding: 3px 10px; } .progress-content.single-line { padding: 6px 10px; } }