|
|
:root { |
|
|
--tesco-blue: #00539F; |
|
|
--tesco-blue-dark: #003e7e; |
|
|
--tesco-red: #EE1C2E; |
|
|
--bg-color: #f4f5f7; |
|
|
--text-color: #333; |
|
|
--chat-bg: #ffffff; |
|
|
--user-msg-bg: #00539F; |
|
|
--user-msg-text: #ffffff; |
|
|
--bot-msg-bg: #f3f3f3; |
|
|
--bot-msg-text: #333; |
|
|
--input-bg: #ffffff; |
|
|
--border-color: #e5e5e5; |
|
|
} |
|
|
|
|
|
@media (prefers-color-scheme: dark) { |
|
|
:root { |
|
|
--bg-color: #1a1a1a; |
|
|
--text-color: #ffffff; |
|
|
--chat-bg: #2d2d2d; |
|
|
--user-msg-bg: #00539F; |
|
|
|
|
|
--user-msg-text: #ffffff; |
|
|
--bot-msg-bg: #3d3d3d; |
|
|
--bot-msg-text: #ffffff; |
|
|
--input-bg: #2d2d2d; |
|
|
--border-color: #444; |
|
|
} |
|
|
} |
|
|
|
|
|
body { |
|
|
margin: 0; |
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; |
|
|
background-color: var(--bg-color); |
|
|
color: var(--text-color); |
|
|
transition: background-color 0.3s, color 0.3s; |
|
|
} |
|
|
|
|
|
.app-container { |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
height: 100vh; |
|
|
width: 100%; |
|
|
} |
|
|
|
|
|
|
|
|
.chat-container { |
|
|
width: 100%; |
|
|
max-width: 800px; |
|
|
height: 100vh; |
|
|
|
|
|
background-color: var(--chat-bg); |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); |
|
|
position: relative; |
|
|
} |
|
|
|
|
|
|
|
|
.chat-header { |
|
|
padding: 1rem; |
|
|
background-color: var(--tesco-blue); |
|
|
color: white; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
gap: 1rem; |
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); |
|
|
} |
|
|
|
|
|
.logo-area { |
|
|
background: transparent; |
|
|
padding: 0; |
|
|
} |
|
|
|
|
|
.logo-text { |
|
|
font-weight: 800; |
|
|
font-size: 1.5rem; |
|
|
color: var(--tesco-red); |
|
|
letter-spacing: 0.5px; |
|
|
text-shadow: 1px 1px 0px white; |
|
|
|
|
|
background: white; |
|
|
padding: 2px 6px; |
|
|
border-radius: 2px; |
|
|
} |
|
|
|
|
|
.header-title h1 { |
|
|
margin: 0; |
|
|
font-size: 1.2rem; |
|
|
font-weight: 600; |
|
|
} |
|
|
|
|
|
.header-title p { |
|
|
margin: 0; |
|
|
font-size: 0.8rem; |
|
|
opacity: 0.9; |
|
|
} |
|
|
|
|
|
|
|
|
.messages-area { |
|
|
flex: 1; |
|
|
padding: 1rem; |
|
|
overflow-y: auto; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
gap: 1rem; |
|
|
scroll-behavior: smooth; |
|
|
} |
|
|
|
|
|
.message { |
|
|
max-width: 80%; |
|
|
padding: 10px 16px; |
|
|
border-radius: 12px; |
|
|
line-height: 1.5; |
|
|
font-size: 0.95rem; |
|
|
animation: fadeIn 0.3s ease-out; |
|
|
} |
|
|
|
|
|
@keyframes fadeIn { |
|
|
from { |
|
|
opacity: 0; |
|
|
transform: translateY(5px); |
|
|
} |
|
|
|
|
|
to { |
|
|
opacity: 1; |
|
|
transform: translateY(0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.markdown-body { |
|
|
font-size: 0.95rem; |
|
|
line-height: 1.5; |
|
|
} |
|
|
|
|
|
.markdown-body p { |
|
|
margin: 0 0 10px 0; |
|
|
} |
|
|
|
|
|
.markdown-body p:last-child { |
|
|
margin-bottom: 0; |
|
|
} |
|
|
|
|
|
.markdown-body ul, |
|
|
.markdown-body ol { |
|
|
margin: 8px 0; |
|
|
padding-left: 20px; |
|
|
} |
|
|
|
|
|
.markdown-body li { |
|
|
margin-bottom: 4px; |
|
|
} |
|
|
|
|
|
.markdown-body h1, |
|
|
.markdown-body h2, |
|
|
.markdown-body h3, |
|
|
.markdown-body h4 { |
|
|
font-weight: 600; |
|
|
margin: 12px 0 8px 0; |
|
|
font-size: 1.1em; |
|
|
} |
|
|
|
|
|
.markdown-body h1:first-child, |
|
|
.markdown-body h2:first-child { |
|
|
margin-top: 0; |
|
|
} |
|
|
|
|
|
.markdown-body strong { |
|
|
font-weight: 600; |
|
|
} |
|
|
|
|
|
.markdown-body a { |
|
|
color: var(--tesco-blue); |
|
|
text-decoration: underline; |
|
|
} |
|
|
|
|
|
|
|
|
.message.user { |
|
|
align-self: flex-end; |
|
|
background-color: var(--user-msg-bg); |
|
|
color: var(--user-msg-text); |
|
|
border-bottom-right-radius: 2px; |
|
|
} |
|
|
|
|
|
.message.assistant { |
|
|
align-self: flex-start; |
|
|
background-color: var(--bot-msg-bg); |
|
|
color: var(--bot-msg-text); |
|
|
border-bottom-left-radius: 2px; |
|
|
} |
|
|
|
|
|
.message.assistant .markdown-body { |
|
|
color: var(--bot-msg-text); |
|
|
} |
|
|
|
|
|
|
|
|
.input-area { |
|
|
padding: 1rem; |
|
|
border-top: 1px solid var(--border-color); |
|
|
background-color: var(--chat-bg); |
|
|
display: flex; |
|
|
gap: 0.5rem; |
|
|
} |
|
|
|
|
|
.input-field { |
|
|
flex: 1; |
|
|
padding: 12px; |
|
|
border-radius: 24px; |
|
|
border: 1px solid var(--border-color); |
|
|
background-color: var(--input-bg); |
|
|
color: var(--text-color); |
|
|
font-size: 1rem; |
|
|
outline: none; |
|
|
transition: border-color 0.2s; |
|
|
} |
|
|
|
|
|
.input-field:focus { |
|
|
border-color: var(--tesco-blue); |
|
|
} |
|
|
|
|
|
.send-button { |
|
|
background-color: var(--tesco-blue); |
|
|
color: white; |
|
|
border: none; |
|
|
width: 48px; |
|
|
height: 48px; |
|
|
border-radius: 50%; |
|
|
cursor: pointer; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
justify-content: center; |
|
|
transition: background-color 0.2s; |
|
|
} |
|
|
|
|
|
.send-button:disabled { |
|
|
background-color: #ccc; |
|
|
cursor: not-allowed; |
|
|
} |
|
|
|
|
|
.send-button:hover:not(:disabled) { |
|
|
background-color: var(--tesco-blue-dark); |
|
|
} |
|
|
|
|
|
|
|
|
.typing-indicator { |
|
|
display: flex; |
|
|
gap: 4px; |
|
|
padding: 8px 12px; |
|
|
background-color: var(--bot-msg-bg); |
|
|
border-radius: 12px; |
|
|
border-bottom-left-radius: 2px; |
|
|
width: fit-content; |
|
|
align-self: flex-start; |
|
|
} |
|
|
|
|
|
.dot { |
|
|
width: 8px; |
|
|
height: 8px; |
|
|
background-color: #888; |
|
|
border-radius: 50%; |
|
|
animation: bounce 1.4s infinite ease-in-out both; |
|
|
} |
|
|
|
|
|
.dot:nth-child(1) { |
|
|
animation-delay: -0.32s; |
|
|
} |
|
|
|
|
|
.dot:nth-child(2) { |
|
|
animation-delay: -0.16s; |
|
|
} |
|
|
|
|
|
@keyframes bounce { |
|
|
|
|
|
0%, |
|
|
80%, |
|
|
100% { |
|
|
transform: scale(0); |
|
|
} |
|
|
|
|
|
40% { |
|
|
transform: scale(1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
::-webkit-scrollbar { |
|
|
width: 8px; |
|
|
} |
|
|
|
|
|
::-webkit-scrollbar-track { |
|
|
background: transparent; |
|
|
} |
|
|
|
|
|
::-webkit-scrollbar-thumb { |
|
|
background: #ccc; |
|
|
border-radius: 4px; |
|
|
} |
|
|
|
|
|
::-webkit-scrollbar-thumb:hover { |
|
|
background: #aaa; |
|
|
} |