/* ============================================================================ CHAT WIDGET — CV Assistant Mascot Uses CV design tokens from _variables.css Position: right side, just above back-to-top button (right: 2rem) ============================================================================ */ /* ========================================================================== Toggle Button — right side, above back-to-top (bottom: 6rem) Matches existing fixed button style: dark bg, 50px, subtle opacity ========================================================================== */ .chat-toggle-btn { position: fixed; bottom: 6rem; right: 2rem; z-index: 1000; width: 50px; height: 50px; border-radius: 50%; background: var(--black-bar, #2b2b2b); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); transition: all 0.3s ease; opacity: 0.4; } .chat-toggle-btn:hover { opacity: 1; transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); background: var(--accent-green, #27ae60); } /* Icon swap: show mascot by default, close when active */ .chat-toggle-btn .chat-icon-close { display: none; } .chat-toggle-btn.mascot-active { opacity: 1; background: var(--accent-green, #27ae60); } .chat-toggle-btn.mascot-active .chat-icon-open { display: none; } .chat-toggle-btn.mascot-active .chat-icon-close { display: inline-block; } /* ========================================================================== Panel — right side, above the button ========================================================================== */ .chat-panel { position: fixed; bottom: 10.5rem; right: 2rem; width: 360px; max-height: 500px; background: var(--paper-bg, #ffffff); border: 1px solid var(--border-light, #e0e0e0); border-radius: 8px; box-shadow: var(--shadow-lg, 2px 2px 9px rgba(0, 0, 0, 0.5)); display: none; flex-direction: column; z-index: 999; overflow: hidden; font-family: 'Source Sans Pro', 'Segoe UI', sans-serif; } .chat-panel.chat-open { display: flex; } /* ========================================================================== Header — accent-blue for visual distinction ========================================================================== */ .chat-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--accent-green, #27ae60); color: #ffffff; font-family: 'Quicksand', sans-serif; font-size: 0.85rem; font-weight: 600; } .chat-header iconify-icon { font-size: 1.1rem; } .chat-help-btn { margin-left: auto; background: none; border: none; color: var(--action-bar-text-muted, rgba(255, 255, 255, 0.85)); cursor: pointer; font-size: 1rem; transition: color 0.2s; display: flex; align-items: center; padding: 0; } .chat-help-btn:hover { color: #fff; } /* ========================================================================== Messages Area ========================================================================== */ .chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; max-height: 260px; min-height: 60px; } /* Message Bubbles */ .chat-message { padding: 8px 12px; border-radius: 8px; font-size: 0.8rem; line-height: 1.5; max-width: 90%; word-wrap: break-word; } .chat-message p { margin: 0 0 4px 0; } .chat-message p:last-child { margin-bottom: 0; } .chat-message ul { margin: 4px 0; padding-left: 16px; } .chat-message li { margin-bottom: 2px; } .chat-agent { background: var(--paper-secondary-bg, #f5f5f5); color: var(--text-secondary, #333333); align-self: flex-start; border-bottom-left-radius: 2px; } .chat-user { background: var(--accent-green, #27ae60); color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; } .chat-error { background: #fef2f2; color: #991b1b; align-self: center; font-style: italic; border: 1px solid #fecaca; font-size: 0.75rem; } /* ========================================================================== Typing Indicator ========================================================================== */ .chat-typing { display: none; align-items: center; gap: 4px; padding: 6px 14px; } .chat-typing.htmx-request { display: flex; } .chat-typing-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-light, #999999); animation: typingBounce 1.4s infinite ease-in-out both; } .chat-typing-dot:nth-child(1) { animation-delay: 0s; } .chat-typing-dot:nth-child(2) { animation-delay: 0.16s; } .chat-typing-dot:nth-child(3) { animation-delay: 0.32s; } @keyframes typingBounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } } /* ========================================================================== Suggested Question Chips ========================================================================== */ .chat-suggestions { display: flex; gap: 5px; padding: 6px 10px; overflow-x: auto; flex-wrap: wrap; border-top: 1px solid var(--border-light, #e0e0e0); } .chat-chip { flex-shrink: 0; background: transparent; color: var(--text-muted, #666666); border: 1px solid var(--border-light, #e0e0e0); border-radius: 14px; padding: 3px 10px; font-size: 0.68rem; font-family: 'Source Sans Pro', sans-serif; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; line-height: 1.4; } .chat-chip:hover { background: var(--accent-green, #27ae60); color: #fff; border-color: var(--accent-green, #27ae60); } /* ========================================================================== Input Area ========================================================================== */ .chat-input-area { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border-light, #e0e0e0); background: var(--paper-bg, #ffffff); } .chat-input { flex: 1; padding: 7px 12px; border: 1px solid var(--border-light, #e0e0e0); border-radius: 16px; font-size: 0.8rem; font-family: 'Source Sans Pro', sans-serif; outline: none; background: var(--paper-bg, #ffffff); color: var(--text-primary, #1a1a1a); transition: border-color 0.2s; } .chat-input:focus { border-color: var(--accent-green, #27ae60); } .chat-send-btn { background: var(--accent-green, #27ae60); color: #fff; border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: background 0.2s; flex-shrink: 0; } .chat-send-btn:hover { background: #1e8c4c; } /* ========================================================================== Help Modal — Fullscreen Accordion ========================================================================== */ .chat-help-fullscreen .info-modal-content { max-width: 560px; max-height: 90vh; overflow-y: auto; } .chat-help-intro { font-size: 0.82rem; color: var(--text-muted, #666666); line-height: 1.5; margin: 0 0 16px 0; text-align: center; } .chat-help-accordion { display: flex; flex-direction: column; gap: 6px; } .chat-help-group { border: 1px solid var(--border-light, #e0e0e0); border-radius: 6px; overflow: hidden; } .chat-help-group summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-family: 'Quicksand', sans-serif; font-size: 0.85rem; font-weight: 600; color: var(--text-primary, #1a1a1a); cursor: pointer; background: var(--paper-secondary-bg, #f5f5f5); list-style: none; transition: background 0.2s; } .chat-help-group summary::-webkit-details-marker { display: none; } .chat-help-group summary::after { content: ''; margin-left: auto; width: 6px; height: 6px; border-right: 2px solid var(--text-muted, #666); border-bottom: 2px solid var(--text-muted, #666); transform: rotate(-45deg); transition: transform 0.2s; } .chat-help-group[open] summary::after { transform: rotate(45deg); } .chat-help-group summary:hover { background: var(--paper-bg, #ffffff); } .chat-help-group summary iconify-icon { font-size: 1.1rem; color: var(--accent-green, #27ae60); } .chat-help-questions { display: flex; flex-direction: column; padding: 4px 8px 8px; gap: 2px; } .chat-help-q { display: block; width: 100%; text-align: left; background: none; border: none; padding: 7px 12px; font-size: 0.78rem; font-family: 'Source Sans Pro', sans-serif; color: var(--text-secondary, #333333); cursor: pointer; border-radius: 4px; transition: all 0.15s; line-height: 1.4; } .chat-help-q:hover { background: var(--accent-green, #27ae60); color: #fff; } .chat-help-footer { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 12px; background: var(--paper-secondary-bg, #f5f5f5); border-radius: 6px; font-size: 0.7rem; color: var(--text-muted, #666666); line-height: 1.4; } .chat-help-footer iconify-icon { font-size: 1rem; flex-shrink: 0; color: var(--text-light, #999999); } /* Dark theme for help modal */ .theme-clean .chat-help-group { border-color: #333333; } .theme-clean .chat-help-group summary { background: #2a2a2a; color: #d0d0d0; } .theme-clean .chat-help-group summary:hover { background: #333333; } .theme-clean .chat-help-q { color: #999999; } .theme-clean .chat-help-q:hover { background: #166b3a; color: #fff; } .theme-clean .chat-help-footer { background: #2a2a2a; color: #777777; } .theme-clean .chat-help-intro { color: #999999; } /* ========================================================================== Responsive ========================================================================== */ @media (max-width: 480px) { .chat-panel { bottom: 0; left: 0; right: 0; width: 100%; max-height: 70vh; border-radius: 8px 8px 0 0; } .chat-toggle-btn { bottom: 5rem; right: 1rem; } .chat-messages { max-height: 200px; } } /* ========================================================================== Dark Theme (theme-clean) ========================================================================== */ .theme-clean .chat-panel { background: #1a1a1a; border-color: #333333; } .theme-clean .chat-header { background: #166b3a; } .theme-clean .chat-agent { background: #2a2a2a; color: #d0d0d0; } .theme-clean .chat-user { background: #1e8c4c; } .theme-clean .chat-error { background: #3a1010; color: #fca5a5; border-color: #5a1a1a; } .theme-clean .chat-input-area { border-top-color: #333333; background: #1a1a1a; } .theme-clean .chat-input { background: #111111; border-color: #333333; color: #d0d0d0; } .theme-clean .chat-suggestions { border-top-color: #333333; } .theme-clean .chat-chip { background: transparent; color: #999999; border-color: #333333; } .theme-clean .chat-chip:hover { background: #1e8c4c; color: #fff; border-color: #1e8c4c; } .theme-clean .chat-typing-dot { background: #555555; }