darkmariam / static /css /style.css
kuro223's picture
yo
7bc796e
raw
history blame
16.3 kB
/* Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background-color: #FFFFFF;
color: #212121;
height: 100%;
overflow-x: hidden;
overflow-y: auto;
position: fixed;
width: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
/* App Container */
.app-container {
display: flex;
height: 100%;
width: 100%;
position: relative;
overflow: hidden;
}
/* Side Navigation Bar */
.side-nav {
width: 280px;
height: 100%;
background-color: #FFFFFF;
border-right: 1px solid #EEEEEE;
display: flex;
flex-direction: column;
position: absolute;
top: 0;
left: -280px; /* Hidden by default */
transition: left 0.3s ease;
z-index: 1000;
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}
.side-nav.active {
left: 0;
}
.side-nav-header {
display: flex;
align-items: center;
padding: 16px;
border-bottom: 1px solid #EEEEEE;
position: relative;
}
.side-nav-header .logo {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
background-color: #E3F2FD;
border-radius: 50%;
margin-right: 12px;
color: #2196F3;
}
.side-nav-header h1 {
font-size: 20px;
font-weight: 600;
color: #424242;
margin: 0;
}
.close-button {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
background-color: transparent;
color: #9E9E9E;
border: none;
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
}
.close-button:hover {
background-color: #F5F5F5;
color: #757575;
}
.side-nav-section {
flex: 1;
overflow-y: auto;
padding: 16px 0;
border-bottom: 1px solid #EEEEEE;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 16px 12px;
}
.section-header h3 {
font-size: 16px;
font-weight: 600;
color: #424242;
margin: 0;
}
.action-button-small {
background-color: transparent;
color: #2196F3;
border: 1px solid #2196F3;
border-radius: 4px;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
}
.action-button-small:hover {
background-color: #E3F2FD;
}
.history-list {
max-height: 100%;
overflow-y: auto;
}
.chat-history-item {
padding: 12px 16px;
cursor: pointer;
display: flex;
align-items: center;
transition: background-color 0.2s ease;
border-radius: 8px;
margin: 0 8px 8px;
}
.chat-history-item:hover {
background-color: #F5F5F5;
}
.chat-history-item .icon {
margin-right: 12px;
color: #757575;
}
.chat-history-item .details {
flex: 1;
}
.chat-history-item .timestamp {
font-size: 12px;
color: #9E9E9E;
margin-top: 4px;
}
.empty-state {
padding: 24px 16px;
text-align: center;
color: #9E9E9E;
font-size: 14px;
}
.side-nav-footer {
padding: 16px;
display: flex;
flex-direction: column;
gap: 8px;
}
.nav-button {
display: flex;
align-items: center;
padding: 10px 16px;
background-color: transparent;
color: #616161;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
font-size: 14px;
text-align: left;
}
.nav-button i {
margin-right: 12px;
font-size: 16px;
}
.nav-button:hover {
background-color: #F5F5F5;
}
.nav-button#clearButtonNav:hover {
color: #F44336;
}
/* Main Content */
.main-content {
flex: 1;
display: flex;
flex-direction: column;
width: 100%;
position: relative;
left: 0;
transition: left 0.3s ease;
}
.main-content.nav-open {
left: 280px;
}
/* Top Bar */
.top-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
background-color: #2196F3;
color: white;
height: 60px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
z-index: 10;
}
.top-bar-left {
display: flex;
align-items: center;
}
.menu-button {
background-color: transparent;
color: white;
border: none;
width: 42px;
height: 42px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-right: 16px;
font-size: 24px;
transition: background-color 0.2s ease;
}
.menu-button:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.top-bar h1 {
font-size: 20px;
font-weight: 500;
margin: 0;
color: white;
}
.top-bar-right {
display: flex;
align-items: center;
}
.icon-button {
background-color: transparent;
color: white;
border: none;
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background-color 0.2s ease;
}
.icon-button:hover {
background-color: rgba(255, 255, 255, 0.1);
}
/* Welcome Container with Suggestion Bubbles */
.welcome-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
padding: 24px;
text-align: center;
}
.welcome-logo {
display: flex;
align-items: center;
justify-content: center;
width: 64px;
height: 64px;
background-color: #E3F2FD;
border-radius: 50%;
margin-bottom: 24px;
color: #2196F3;
}
.welcome-logo i {
font-size: 32px;
}
.welcome-header h2 {
font-size: 28px;
font-weight: 600;
color: #212121;
margin-bottom: 12px;
}
.welcome-subtitle {
font-size: 16px;
color: #757575;
margin-bottom: 32px;
}
.suggestion-bubbles {
display: flex;
flex-direction: column;
gap: 16px;
max-width: 500px;
width: 100%;
}
.suggestion-bubble {
display: flex;
align-items: center;
padding: 16px;
background-color: #F5F5F5;
border-radius: 12px;
cursor: pointer;
transition: all 0.2s ease;
text-align: left;
}
.suggestion-bubble i {
font-size: 20px;
color: #2196F3;
margin-right: 16px;
}
.suggestion-bubble span {
font-size: 15px;
color: #424242;
}
.suggestion-bubble:hover {
background-color: #E3F2FD;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}
/* Chat Container */
.chat-container {
display: flex;
flex-direction: column;
flex: 1;
overflow: hidden;
background-color: #FAFAFA;
height: calc(100% - 60px); /* 60px is the height of top-bar */
}
/* Chat Window */
.chat-window {
flex: 1;
overflow-y: auto;
padding: 16px;
scrollbar-width: thin;
scrollbar-color: #E0E0E0 #FAFAFA;
-webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS devices */
}
.chat-window::-webkit-scrollbar {
width: 6px;
}
.chat-window::-webkit-scrollbar-track {
background: #FAFAFA;
}
.chat-window::-webkit-scrollbar-thumb {
background-color: #E0E0E0;
border-radius: 10px;
}
/* Input Area */
.input-area {
border-top: 1px solid #EEEEEE;
background-color: #FFFFFF;
}
/* Image Preview Area */
.image-preview-area {
padding: 8px 16px;
background-color: #F8F9FA;
border-bottom: 1px solid #EEEEEE;
max-height: 130px;
overflow-y: auto;
}
.image-preview-area.hidden {
display: none;
}
.image-preview-list {
display: flex;
flex-wrap: wrap;
gap: 10px;
padding: 5px 0;
}
.image-preview-container {
position: relative;
display: inline-block;
width: 100px;
height: 100px;
border-radius: 8px;
overflow: hidden;
border: 1px solid #EEEEEE;
}
.image-preview-container img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
.remove-image-button {
position: absolute;
top: 4px;
right: 4px;
background-color: rgba(0, 0, 0, 0.5);
color: white;
border: none;
border-radius: 50%;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background-color 0.2s ease;
}
.remove-image-button:hover {
background-color: rgba(0, 0, 0, 0.7);
}
/* Message Containers */
.message-container {
display: flex;
margin: 12px 0;
}
.message-container.user {
justify-content: flex-end;
}
.message-container.bot {
justify-content: flex-start;
}
/* Message Bubbles */
.message-bubble {
max-width: 80%;
padding: 14px 18px;
border-radius: 18px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
word-wrap: break-word;
}
.message-container.user .message-bubble {
background-color: #E3F2FD;
border-top-right-radius: 4px;
}
.message-container.bot .message-bubble {
background-color: #FFFFFF;
border-top-left-radius: 4px;
border: 1px solid #EEEEEE;
}
/* Message Text and Images */
.message-bubble p {
margin: 0;
line-height: 1.5;
font-size: 15px;
}
.message-bubble .image-container {
margin-bottom: 8px;
}
.message-bubble .chat-image {
max-width: 100%;
border-radius: 8px;
margin-bottom: 8px;
max-height: 300px;
object-fit: contain;
}
/* Markdown Styling */
.message-bubble ul,
.message-bubble ol {
margin-left: 20px;
margin-top: 8px;
margin-bottom: 8px;
}
.message-bubble li {
margin-bottom: 4px;
}
.message-bubble h1,
.message-bubble h2,
.message-bubble h3,
.message-bubble h4 {
margin-top: 16px;
margin-bottom: 8px;
font-weight: 600;
}
.message-bubble code {
background-color: #F5F5F5;
padding: 2px 4px;
border-radius: 4px;
font-family: 'Courier New', monospace;
font-size: 14px;
color: #E91E63;
}
.message-bubble pre {
background-color: #F5F5F5;
padding: 12px;
border-radius: 8px;
overflow-x: auto;
margin: 8px 0;
border: 1px solid #EEEEEE;
}
.message-bubble pre code {
background-color: transparent;
padding: 0;
color: inherit;
display: block;
}
.message-bubble a {
color: #2196F3;
text-decoration: none;
}
.message-bubble a:hover {
text-decoration: underline;
}
.message-bubble table {
border-collapse: collapse;
width: 100%;
margin: 8px 0;
}
.message-bubble th,
.message-bubble td {
border: 1px solid #EEEEEE;
padding: 8px;
text-align: left;
}
.message-bubble th {
background-color: #F5F5F5;
}
/* Error Message */
.message-container.error .message-bubble {
background-color: #FFEBEE;
}
.retry-button {
display: inline-block;
margin-top: 8px;
padding: 6px 12px;
background-color: #F44336;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
}
.retry-button:hover {
background-color: #D32F2F;
}
/* Loading Animation */
.loading {
display: flex;
align-items: center;
justify-content: center;
min-width: 60px;
}
.dot-typing {
position: relative;
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #9E9E9E;
color: #9E9E9E;
animation: dotTyping 1.5s infinite linear;
}
.dot-typing::before,
.dot-typing::after {
content: '';
display: inline-block;
position: absolute;
top: 0;
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #9E9E9E;
color: #9E9E9E;
}
.dot-typing::before {
left: -12px;
animation: dotTypingBefore 1.5s infinite linear;
}
.dot-typing::after {
left: 12px;
animation: dotTypingAfter 1.5s infinite linear;
}
@keyframes dotTyping {
0% { transform: scale(1); opacity: 0.6; }
25% { transform: scale(1.3); opacity: 1; }
50% { transform: scale(1); opacity: 0.6; }
100% { transform: scale(1); opacity: 0.6; }
}
@keyframes dotTypingBefore {
0% { transform: scale(1); opacity: 0.6; }
25% { transform: scale(1); opacity: 0.6; }
50% { transform: scale(1.3); opacity: 1; }
100% { transform: scale(1); opacity: 0.6; }
}
@keyframes dotTypingAfter {
0% { transform: scale(1); opacity: 0.6; }
25% { transform: scale(1); opacity: 0.6; }
50% { transform: scale(1); opacity: 0.6; }
75% { transform: scale(1.3); opacity: 1; }
100% { transform: scale(1); opacity: 0.6; }
}
/* Input Bar */
.input-bar {
padding: 16px;
display: flex;
align-items: flex-end;
background-color: #FFFFFF;
}
.upload-button {
background-color: transparent;
color: #616161;
border: none;
border-radius: 50%;
width: 42px;
height: 42px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
margin-right: 8px;
}
.upload-button:hover {
background-color: #F5F5F5;
color: #2196F3;
}
.input-container {
flex: 1;
display: flex;
align-items: flex-end;
background-color: #F5F5F5;
border-radius: 24px;
padding: 10px 16px;
transition: box-shadow 0.3s ease;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.input-container:focus-within {
box-shadow: 0 0 0 2px #42A5F5;
}
/* Text Area */
#userInput {
flex: 1;
border: none;
background: transparent;
padding: 8px 0;
max-height: 120px;
resize: none;
font-family: inherit;
font-size: 15px;
outline: none;
}
/* Send Button */
.send-button {
background-color: #2196F3;
color: white;
border: none;
border-radius: 50%;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
margin-left: 8px;
}
.send-button:hover {
background-color: #1976D2;
transform: scale(1.05);
}
.send-button:disabled {
background-color: #BDBDBD;
cursor: not-allowed;
transform: none;
}
/* Overlay when side nav is open on mobile */
.overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
}
.overlay.active {
display: block;
}
/* Responsive adjustments */
@media (min-width: 992px) {
/* For larger screens */
.side-nav {
position: relative;
left: 0;
width: 280px;
flex-shrink: 0;
}
.main-content {
width: calc(100% - 280px);
}
.menu-button {
display: none;
}
}
@media (max-width: 991px) {
/* For tablets and below */
.app-container {
flex-direction: column;
}
.side-nav {
width: 280px;
}
}
@media (max-width: 768px) {
/* For small tablets and phones */
.message-bubble {
max-width: 85%;
}
.suggestion-bubbles {
max-width: 100%;
}
.welcome-logo {
width: 56px;
height: 56px;
}
.welcome-logo i {
font-size: 28px;
}
.welcome-header h2 {
font-size: 24px;
}
}
@media (max-width: 480px) {
/* For mobile phones */
.side-nav {
width: 85%;
}
.message-bubble {
max-width: 90%;
}
.chat-window {
padding: 12px;
}
.input-bar {
padding: 12px;
}
.top-bar {
padding: 10px 12px;
height: 56px;
position: sticky;
top: 0;
z-index: 100;
}
.top-bar h1 {
font-size: 18px;
}
.welcome-header h2 {
font-size: 22px;
}
.welcome-subtitle {
font-size: 14px;
}
.suggestion-bubble {
padding: 12px;
}
.suggestion-bubble i {
font-size: 18px;
margin-right: 12px;
}
.suggestion-bubble span {
font-size: 14px;
}
/* Fix input bar to bottom on mobile */
.input-area {
position: sticky;
bottom: 0;
z-index: 100;
box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}
/* Ensure welcome container is scrollable on small screens */
.welcome-container {
height: auto;
min-height: calc(100% - 120px); /* Leave space for input area */
overflow-y: auto;
}
}