312 lines
No EOL
5.9 KiB
CSS
312 lines
No EOL
5.9 KiB
CSS
/**
|
|
* KV-Tube AI Chat Styles
|
|
* Styling for the transcript Q&A chatbot panel
|
|
*/
|
|
|
|
/* Floating AI Bubble Button */
|
|
.ai-chat-bubble {
|
|
position: fixed;
|
|
bottom: 90px;
|
|
/* Above the back button */
|
|
right: 20px;
|
|
width: 56px;
|
|
height: 56px;
|
|
border-radius: 50%;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
border: none;
|
|
color: white;
|
|
font-size: 24px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 9998;
|
|
box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
|
|
transition: transform 0.3s, box-shadow 0.3s;
|
|
animation: bubble-pulse 2s infinite;
|
|
}
|
|
|
|
.ai-chat-bubble:hover {
|
|
transform: scale(1.1);
|
|
box-shadow: 0 6px 24px rgba(102, 126, 234, 0.6);
|
|
}
|
|
|
|
.ai-chat-bubble.active {
|
|
animation: none;
|
|
background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
|
|
}
|
|
|
|
@keyframes bubble-pulse {
|
|
|
|
0%,
|
|
100% {
|
|
box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
|
|
}
|
|
|
|
50% {
|
|
box-shadow: 0 4px 24px rgba(102, 126, 234, 0.7);
|
|
}
|
|
}
|
|
|
|
/* Hide bubble on desktop when chat is open */
|
|
.ai-chat-panel.visible~.ai-chat-bubble,
|
|
body.ai-chat-open .ai-chat-bubble {
|
|
animation: none;
|
|
}
|
|
|
|
/* Chat Panel Container */
|
|
.ai-chat-panel {
|
|
position: fixed;
|
|
bottom: 160px;
|
|
/* Position above the bubble */
|
|
right: 20px;
|
|
width: 380px;
|
|
max-height: 500px;
|
|
background: var(--yt-bg-primary, #0f0f0f);
|
|
border: 1px solid var(--yt-border, #272727);
|
|
border-radius: 16px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
display: flex;
|
|
flex-direction: column;
|
|
z-index: 9999;
|
|
overflow: hidden;
|
|
transform: translateY(20px) scale(0.95);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
|
|
}
|
|
|
|
.ai-chat-panel.visible {
|
|
transform: translateY(0) scale(1);
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
/* Chat Header */
|
|
.ai-chat-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
}
|
|
|
|
.ai-chat-header h4 {
|
|
margin: 0;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.ai-chat-close {
|
|
background: none;
|
|
border: none;
|
|
color: white;
|
|
cursor: pointer;
|
|
padding: 4px;
|
|
opacity: 0.8;
|
|
transition: opacity 0.2s;
|
|
}
|
|
|
|
.ai-chat-close:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Model Status */
|
|
.ai-model-status {
|
|
font-size: 11px;
|
|
opacity: 0.9;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.ai-model-status.loading {
|
|
color: #ffd700;
|
|
}
|
|
|
|
.ai-model-status.ready {
|
|
color: #00ff88;
|
|
}
|
|
|
|
/* Messages Container */
|
|
.ai-chat-messages {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
max-height: 300px;
|
|
}
|
|
|
|
/* Message Bubbles */
|
|
.ai-message {
|
|
max-width: 85%;
|
|
padding: 10px 14px;
|
|
border-radius: 16px;
|
|
font-size: 13px;
|
|
line-height: 1.5;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
.ai-message.user {
|
|
align-self: flex-end;
|
|
background: #3ea6ff;
|
|
color: white;
|
|
border-bottom-right-radius: 4px;
|
|
}
|
|
|
|
.ai-message.assistant {
|
|
align-self: flex-start;
|
|
background: var(--yt-bg-secondary, #272727);
|
|
color: var(--yt-text-primary, #fff);
|
|
border-bottom-left-radius: 4px;
|
|
}
|
|
|
|
.ai-message.system {
|
|
align-self: center;
|
|
background: transparent;
|
|
color: var(--yt-text-secondary, #aaa);
|
|
font-style: italic;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* Typing Indicator */
|
|
.ai-typing {
|
|
display: flex;
|
|
gap: 4px;
|
|
padding: 10px 14px;
|
|
}
|
|
|
|
.ai-typing span {
|
|
width: 8px;
|
|
height: 8px;
|
|
background: var(--yt-text-secondary, #aaa);
|
|
border-radius: 50%;
|
|
animation: typing 1.2s infinite;
|
|
}
|
|
|
|
.ai-typing span:nth-child(2) {
|
|
animation-delay: 0.2s;
|
|
}
|
|
|
|
.ai-typing span:nth-child(3) {
|
|
animation-delay: 0.4s;
|
|
}
|
|
|
|
@keyframes typing {
|
|
|
|
0%,
|
|
60%,
|
|
100% {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
30% {
|
|
transform: translateY(-8px);
|
|
}
|
|
}
|
|
|
|
/* Input Area */
|
|
.ai-chat-input {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 12px;
|
|
border-top: 1px solid var(--yt-border, #272727);
|
|
background: var(--yt-bg-secondary, #181818);
|
|
}
|
|
|
|
.ai-chat-input input {
|
|
flex: 1;
|
|
background: var(--yt-bg-primary, #0f0f0f);
|
|
border: 1px solid var(--yt-border, #272727);
|
|
border-radius: 20px;
|
|
padding: 10px 16px;
|
|
color: var(--yt-text-primary, #fff);
|
|
font-size: 13px;
|
|
outline: none;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.ai-chat-input input:focus {
|
|
border-color: #3ea6ff;
|
|
}
|
|
|
|
.ai-chat-input input::placeholder {
|
|
color: var(--yt-text-secondary, #aaa);
|
|
}
|
|
|
|
.ai-chat-send {
|
|
background: #3ea6ff;
|
|
border: none;
|
|
border-radius: 50%;
|
|
width: 36px;
|
|
height: 36px;
|
|
color: white;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background 0.2s, transform 0.2s;
|
|
}
|
|
|
|
.ai-chat-send:hover {
|
|
background: #2d8fd9;
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.ai-chat-send:disabled {
|
|
background: #555;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* Download Progress */
|
|
.ai-download-progress {
|
|
padding: 16px;
|
|
text-align: center;
|
|
}
|
|
|
|
.ai-download-bar {
|
|
width: 100%;
|
|
height: 6px;
|
|
background: var(--yt-bg-secondary, #272727);
|
|
border-radius: 3px;
|
|
overflow: hidden;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.ai-download-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, #667eea, #764ba2);
|
|
border-radius: 3px;
|
|
transition: width 0.3s;
|
|
}
|
|
|
|
.ai-download-text {
|
|
font-size: 12px;
|
|
color: var(--yt-text-secondary, #aaa);
|
|
margin-top: 8px;
|
|
}
|
|
|
|
/* Mobile */
|
|
@media (max-width: 768px) {
|
|
.ai-chat-bubble {
|
|
bottom: 100px;
|
|
/* More space above back button */
|
|
right: 24px;
|
|
/* Aligned with back button */
|
|
width: 48px;
|
|
height: 48px;
|
|
font-size: 18px;
|
|
}
|
|
|
|
.ai-chat-panel {
|
|
width: calc(100% - 20px);
|
|
left: 10px;
|
|
right: 10px;
|
|
bottom: 160px;
|
|
max-height: 50vh;
|
|
}
|
|
} |