292 lines
5.6 KiB
CSS
292 lines
5.6 KiB
CSS
/* =====================================================
|
|
PORTFOLIO AI CHATBOT
|
|
===================================================== */
|
|
#portfolio-chatbot-widget {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
right: 24px;
|
|
z-index: 9999;
|
|
font-family: 'Inter', sans-serif;
|
|
}
|
|
|
|
#chatbot-toggle-btn {
|
|
position: relative;
|
|
width: 56px;
|
|
height: 56px;
|
|
border-radius: 50%;
|
|
background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
|
|
color: #fff;
|
|
border: none;
|
|
cursor: pointer;
|
|
box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
|
|
}
|
|
|
|
#chatbot-toggle-btn:hover {
|
|
transform: scale(1.08) translateY(-2px);
|
|
box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
|
|
}
|
|
|
|
#chatbot-toggle-btn svg {
|
|
width: 24px;
|
|
height: 24px;
|
|
}
|
|
|
|
.pulse-notification-dot {
|
|
position: absolute;
|
|
top: 2px;
|
|
right: 2px;
|
|
width: 12px;
|
|
height: 12px;
|
|
background: #22c55e;
|
|
border: 2px solid var(--bg);
|
|
border-radius: 50%;
|
|
animation: pulse-dot 2s ease-in-out infinite;
|
|
}
|
|
|
|
#chatbot-window {
|
|
position: fixed;
|
|
bottom: 96px;
|
|
right: 24px;
|
|
width: 360px;
|
|
height: min(500px, 80vh);
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--glass-bg);
|
|
backdrop-filter: blur(20px);
|
|
-webkit-backdrop-filter: blur(20px);
|
|
border: 1px solid var(--border);
|
|
border-radius: 16px;
|
|
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
|
overflow: hidden;
|
|
transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
|
|
transform: translateY(10px);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
#chatbot-window.active {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
#chatbot-window.hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
#chatbot-header {
|
|
padding: 14px 18px;
|
|
background: rgba(30, 41, 59, 0.3);
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.header-avatar-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.avatar-container {
|
|
position: relative;
|
|
width: 36px;
|
|
height: 36px;
|
|
}
|
|
|
|
.chat-avatar {
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 50%;
|
|
object-fit: cover;
|
|
border: 1.5px solid var(--accent);
|
|
}
|
|
|
|
.status-indicator {
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 0;
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
border: 1.5px solid var(--bg);
|
|
}
|
|
|
|
.status-indicator.online {
|
|
background: #22c55e;
|
|
}
|
|
|
|
.header-text-info h4 {
|
|
font-family: 'Outfit', sans-serif;
|
|
font-size: 0.95rem;
|
|
font-weight: 700;
|
|
color: var(--text-main);
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.status-text {
|
|
font-size: 0.72rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
#chatbot-close-btn {
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
padding: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: color 0.2s;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
#chatbot-close-btn:hover {
|
|
color: var(--text-main);
|
|
background: var(--card-bg);
|
|
}
|
|
|
|
#chatbot-messages {
|
|
flex-grow: 1;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
background: rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
/* Custom Scrollbar for Chat */
|
|
#chatbot-messages::-webkit-scrollbar { width: 4px; }
|
|
#chatbot-messages::-webkit-scrollbar-track { background: transparent; }
|
|
#chatbot-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
|
|
|
.chat-message {
|
|
display: flex;
|
|
width: 100%;
|
|
}
|
|
|
|
.chat-message.user-msg {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.chat-message.bot-msg {
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.msg-bubble {
|
|
max-width: 80%;
|
|
padding: 10px 14px;
|
|
border-radius: 14px;
|
|
font-size: 0.88rem;
|
|
line-height: 1.5;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.user-msg .msg-bubble {
|
|
background: var(--accent);
|
|
color: #fff;
|
|
border-bottom-right-radius: 2px;
|
|
box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
|
|
}
|
|
|
|
.bot-msg .msg-bubble {
|
|
background: var(--card-bg);
|
|
color: var(--text-main);
|
|
border: 1px solid var(--border);
|
|
border-bottom-left-radius: 2px;
|
|
}
|
|
|
|
.bot-msg.error-msg .msg-bubble {
|
|
border-color: rgba(239, 68, 68, 0.3);
|
|
background: rgba(239, 68, 68, 0.05);
|
|
color: #ef4444;
|
|
}
|
|
|
|
/* Form & Input */
|
|
#chatbot-input-form {
|
|
padding: 12px 16px;
|
|
background: var(--glass-bg);
|
|
border-top: 1px solid var(--border);
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
|
|
#chatbot-input-field {
|
|
flex-grow: 1;
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border);
|
|
color: var(--text-main);
|
|
padding: 10px 14px;
|
|
border-radius: 10px;
|
|
font-size: 0.88rem;
|
|
outline: none;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
#chatbot-input-field:focus {
|
|
border-color: var(--border-hover);
|
|
}
|
|
|
|
#chatbot-send-btn {
|
|
background: var(--accent);
|
|
color: #fff;
|
|
border: none;
|
|
width: 38px;
|
|
height: 38px;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: background 0.2s, transform 0.2s;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
#chatbot-send-btn:hover {
|
|
background: var(--accent-2);
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
#chatbot-send-btn svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
|
|
/* Typing Indicator Animation */
|
|
.typing-bubble {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 12px 16px !important;
|
|
}
|
|
|
|
.dot-bounce {
|
|
width: 6px;
|
|
height: 6px;
|
|
background: var(--text-muted);
|
|
border-radius: 50%;
|
|
display: inline-block;
|
|
animation: bounce 1.4s infinite ease-in-out both;
|
|
}
|
|
|
|
.dot-bounce:nth-child(1) { animation-delay: -0.32s; }
|
|
.dot-bounce:nth-child(2) { animation-delay: -0.16s; }
|
|
|
|
/* Markdown spacing inside bubbles */
|
|
.msg-bubble ul {
|
|
padding-left: 20px;
|
|
margin: 6px 0;
|
|
}
|
|
|
|
.msg-bubble li {
|
|
margin-bottom: 4px;
|
|
}
|