Files
chat-proxy/frontend/src/App.css
T
Samuele E. Locatelli be1e57b2d7 Fix periodo thinking
2025-09-03 08:32:45 +00:00

180 lines
3.1 KiB
CSS

/* src/App.css */
html, body, #root {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
body {
background-color: var(--bs-body-bg);
font-family: sans-serif;
}
/* Animate only the wrapper, not the whole page */
.sessions-wrapper {
transition: transform 300ms ease, filter 300ms ease;
will-change: transform, filter;
}
body.sessions-open .sessions-wrapper {
transform: translateX(280px) scale(0.985);
filter: saturate(0.95);
}
/* Offcanvas stays fixed to the viewport */
.offcanvas-start {
width: 280px;
border-right: 1px solid #dee2e6;
}
.offcanvas.show {
box-shadow: 6px 0 20px rgba(0, 0, 0, 0.08);
}
/* Dark overlay for sessions panel */
.sessions-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.4);
opacity: 0;
pointer-events: none;
transition: opacity 250ms ease;
z-index: 1030; /* just under offcanvas (Bootstrap sets .offcanvas at 1045) */
}
.sessions-overlay.show {
opacity: 1;
pointer-events: auto;
}
/* Animate only wrapper */
.sessions-wrapper {
transition: transform 300ms ease, filter 300ms ease;
will-change: transform, filter;
}
body.sessions-open .sessions-wrapper {
transform: translateX(280px) scale(0.985);
filter: saturate(0.95);
}
.session-table {
font-size: 0.85rem;
}
.offcanvas-start {
width: 420px;
border-right: 1px solid #dee2e6;
}
.offcanvas.show {
box-shadow: 6px 0 20px rgba(0, 0, 0, 0.08);
}
.offcanvas-left {
position: fixed;
top: 0;
left: -300px; /* panel width */
width: 300px;
height: 100%;
background: var(--bs-body-bg, #fff);
box-shadow: 2px 0 5px rgba(0,0,0,0.3);
transition: left 0.3s ease;
z-index: 1050;
}
.offcanvas-left.show {
left: 0;
}
/* Chat styles */
.chat-container {
display: flex;
flex-direction: column;
height: 100vh;
background-color: #f3f4f6;
}
.chat-box {
flex: 1;
overflow-y: auto;
padding: 1rem;
background-color: #f8f9fa;
overflow-anchor: none;
}
.message {
margin: 0.5rem 0;
padding: 0.9rem 1rem;
border-radius: 12px;
width: auto;
max-width: 95%;
word-wrap: break-word;
}
.message:last-child {
overflow-anchor: auto;
}
@media (min-width: 768px) {
.message { max-width: 75%; }
}
.message.user {
background-color: #0d6efd;
color: #fff;
align-self: flex-end;
text-align: right;
border-top-right-radius: 0;
}
.message.assistant {
background-color: #e9ecef;
color: #212529;
align-self: flex-start;
text-align: left;
border-top-left-radius: 0;
}
.input-bar {
display: flex;
padding: 1rem;
background-color: white;
border-top: 1px solid #ccc;
}
.chat-input {
flex: 1;
padding: 0.75rem;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 1rem;
}
.send-button {
margin-left: 0.5rem;
padding: 0.75rem 1rem;
background-color: #0d6efd;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
}
pre {
background-color: #212529;
color: #f8f9fa;
padding: 0.75rem;
border-radius: 0.375rem;
overflow-x: auto;
}
code {
font-family: 'Fira Code', monospace;
font-size: 0.9rem;
}
.btn-copy {
font-size: 0.75rem;
}
.think-block {
opacity: 1;
transition: opacity 0.6s ease;
}
.think-block.fade-out {
opacity: 0;
}