AldawsariNLP's picture
Initial commit: Cleaned up project for HuggingFace Spaces deployment
df31088
.App {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
padding: 20px;
direction: rtl;
font-family: 'Segoe UI', 'Arial', 'Tahoma', 'Cairo', 'Noto Sans Arabic', sans-serif;
}
.chat-container {
width: 100%;
max-width: 900px;
height: 90vh;
background: white;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
overflow: hidden;
}
.chat-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 25px;
text-align: center;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.chat-header h1 {
margin: 0 0 10px 0;
font-size: 28px;
font-weight: 600;
}
.chat-header p {
margin: 0 0 15px 0;
opacity: 0.9;
font-size: 14px;
}
.messages-container {
flex: 1;
overflow-y: auto;
padding: 20px;
background: #f8f9fa;
}
.welcome-message {
text-align: center;
padding: 60px 20px;
color: #666;
}
.welcome-message h2 {
color: #333;
margin-bottom: 15px;
font-size: 24px;
}
.welcome-message p {
margin: 10px 0;
font-size: 16px;
}
.welcome-message .hint {
font-size: 14px;
color: #999;
font-style: italic;
}
.message {
margin-bottom: 20px;
display: flex;
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.message.user {
justify-content: flex-start;
}
.message.assistant {
justify-content: flex-start;
}
.message-content {
max-width: 70%;
padding: 15px 20px;
border-radius: 18px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.message.user .message-content {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-bottom-left-radius: 4px;
}
.message.assistant .message-content {
background: white;
color: #333;
border-bottom-right-radius: 4px;
}
.message-header {
font-size: 12px;
font-weight: 600;
margin-bottom: 8px;
opacity: 0.8;
}
.message-text {
font-size: 15px;
line-height: 1.8;
word-wrap: break-word;
text-align: right;
direction: rtl;
}
.message-text.error {
color: #d32f2f;
}
.message-text p {
margin: 0 0 10px 0;
}
.message-text strong {
font-weight: 700;
}
.message-text ul,
.message-text ol {
padding-right: 20px;
margin: 10px 0;
}
.message-text li {
margin-bottom: 6px;
}
.typing-indicator {
display: inline-block;
}
.typing-indicator::after {
content: '...';
animation: dots 1.5s steps(4, end) infinite;
}
@keyframes dots {
0%, 20% {
content: '.';
}
40% {
content: '..';
}
60%, 100% {
content: '...';
}
}
.sources {
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid rgba(0, 0, 0, 0.1);
font-size: 12px;
}
.message.user .sources {
border-top-color: rgba(255, 255, 255, 0.3);
}
.sources strong {
display: block;
margin-bottom: 6px;
opacity: 0.8;
}
.sources ul {
list-style: none;
padding: 0;
margin: 0;
}
.sources li {
padding: 4px 0;
opacity: 0.9;
display: flex;
flex-direction: column;
gap: 6px;
}
.source-name {
font-weight: 600;
color: #333;
}
.source-actions {
display: flex;
gap: 10px;
}
.source-link {
background: none;
border: none;
color: #4c6ef5;
cursor: pointer;
text-decoration: underline;
font-size: 14px;
font-weight: 600;
padding: 0;
direction: rtl;
text-align: right;
}
.source-link:hover {
color: #2a48c5;
}
.source-link.download {
color: #2f9e44;
}
.source-link.download:hover {
color: #1b6d2f;
}
.preview-panel {
margin: 20px;
padding: 15px;
border: 1px solid #e0e0e0;
border-radius: 12px;
background: #fdfdfd;
max-height: 300px;
overflow: auto;
direction: rtl;
}
.preview-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.preview-header h3 {
margin: 0;
}
.preview-filename {
font-size: 14px;
color: #555;
}
.close-preview {
background: none;
border: none;
font-size: 22px;
cursor: pointer;
color: #ff4d4f;
font-weight: bold;
}
.close-preview:hover {
color: #d9363e;
}
.preview-content pre {
white-space: pre-wrap;
direction: rtl;
text-align: right;
margin: 0;
font-size: 14px;
background: #f8f9fa;
padding: 10px;
border-radius: 8px;
}
.preview-content {
min-height: 200px;
display: flex;
justify-content: center;
align-items: center;
}
.pdf-frame {
width: 100%;
height: 400px;
border: none;
border-radius: 8px;
background: #fff;
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}
.input-container {
display: flex;
padding: 20px;
background: white;
border-top: 1px solid #e0e0e0;
gap: 10px;
}
.message-input {
flex: 1;
padding: 15px 20px;
border: 2px solid #e0e0e0;
border-radius: 25px;
font-size: 15px;
outline: none;
transition: border-color 0.3s ease;
text-align: right;
direction: rtl;
}
.message-input:focus {
border-color: #667eea;
}
.message-input:disabled {
background: #f5f5f5;
cursor: not-allowed;
}
.send-button {
padding: 15px 30px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 25px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.send-button:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.send-button:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
/* Scrollbar styling */
.messages-container::-webkit-scrollbar {
width: 8px;
}
.messages-container::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 10px;
}
.messages-container::-webkit-scrollbar-thumb {
background: #888;
border-radius: 10px;
}
.messages-container::-webkit-scrollbar-thumb:hover {
background: #555;
}
/* Responsive design */
@media (max-width: 768px) {
.chat-container {
height: 100vh;
border-radius: 0;
}
.message-content {
max-width: 85%;
}
.chat-header h1 {
font-size: 24px;
}
}