AeThex-Connect/astro-site/src/react-app/components/Chat/InfiniteScrollMessages.css

131 lines
2.4 KiB
CSS

/**
* InfiniteScrollMessages CSS
* Scrollable container with loading indicators
*/
.infinite-scroll-messages-container {
display: flex;
flex-direction: column;
flex: 1;
overflow-y: auto;
scroll-behavior: smooth;
}
/* Loading indicator at top */
.scroll-loading-indicator {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
padding: 1.5rem;
color: #72767d;
font-size: 0.9375rem;
}
/* Animated spinner */
.spinner {
width: 20px;
height: 20px;
border: 3px solid rgba(114, 137, 218, 0.2);
border-top: 3px solid #7289da;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* Sentinel element for intersection observer */
.scroll-sentinel {
height: 1px;
margin-top: 0;
}
/* End of messages indicator */
.scroll-end-indicator {
display: flex;
align-items: center;
justify-content: center;
padding: 2rem 1rem;
color: #72767d;
font-size: 0.8125rem;
text-transform: uppercase;
letter-spacing: 0.5px;
position: relative;
}
.scroll-end-indicator::before,
.scroll-end-indicator::after {
content: '';
flex: 1;
height: 1px;
background: linear-gradient(
to right,
transparent,
#72767d,
transparent
);
}
.scroll-end-indicator::before {
margin-right: 1rem;
}
.scroll-end-indicator::after {
margin-left: 1rem;
}
.scroll-end-indicator span {
white-space: nowrap;
}
/* Scrollbar styling */
.infinite-scroll-messages-container::-webkit-scrollbar {
width: 8px;
}
.infinite-scroll-messages-container::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.1);
}
.infinite-scroll-messages-container::-webkit-scrollbar-thumb {
background: rgba(0, 217, 255, 0.2);
border-radius: 4px;
transition: background 0.2s;
}
.infinite-scroll-messages-container::-webkit-scrollbar-thumb:hover {
background: rgba(0, 217, 255, 0.4);
}
/* Firefox scrollbar */
.infinite-scroll-messages-container {
scrollbar-color: rgba(0, 217, 255, 0.2) rgba(0, 0, 0, 0.1);
scrollbar-width: thin;
}
@media (max-width: 768px) {
.scroll-loading-indicator {
padding: 1rem;
font-size: 0.875rem;
}
.scroll-end-indicator {
padding: 1.5rem 1rem;
font-size: 0.75rem;
}
.scroll-end-indicator::before {
margin-right: 0.75rem;
}
.scroll-end-indicator::after {
margin-left: 0.75rem;
}
}