diff --git a/app.py b/app.py index 4e412cd..41a6c77 100644 --- a/app.py +++ b/app.py @@ -1743,6 +1743,52 @@ def public_frontend(): .site-header { padding:0.8rem 1rem; } .main-grid { grid-template-columns:1fr; padding:0 1rem; gap:1rem; } } + + /* ── Chat Bubble + Overlay ────────────────────────────────── */ + .chat-bubble { position:fixed; bottom:1.5rem; right:1.5rem; z-index:9999; + width:56px; height:56px; border-radius:50%; background:#20228a; + color:#fff; border:none; cursor:pointer; font-size:1.6rem; + box-shadow:0 6px 24px rgba(0,0,0,0.25); transition:transform 0.2s,box-shadow 0.2s; + display:flex; align-items:center; justify-content:center; } + .chat-bubble:hover { transform:scale(1.08); box-shadow:0 8px 32px rgba(0,0,0,0.35); } + .chat-bubble:active { transform:scale(0.95); } + .chat-bubble .bubble-dot { position:absolute; top:6px; right:6px; width:12px; height:12px; + background:#28a745; border-radius:50%; border:2px solid #fff; } + + .chat-overlay { position:fixed; bottom:5.5rem; right:1.5rem; z-index:9998; + width:380px; max-width:calc(100vw - 2rem); max-height:520px; + background:#fff; border-radius:18px; box-shadow:0 12px 48px rgba(0,0,0,0.22); + display:none; flex-direction:column; overflow:hidden; } + .chat-overlay.open { display:flex; } + .chat-header { background:#20228a; color:#fff; padding:0.9rem 1.2rem; + font-weight:700; font-size:0.9rem; display:flex; align-items:center; justify-content:space-between; } + .chat-header button { background:none; border:none; color:#fff; font-size:1.3rem; + cursor:pointer; opacity:0.8; transition:opacity 0.15s; padding:0; line-height:1; } + .chat-header button:hover { opacity:1; } + .chat-body { flex:1; overflow-y:auto; padding:1rem; display:flex; flex-direction:column; gap:0.6rem; + max-height:320px; background:#fafafa; } + .chat-msg { max-width:82%; padding:0.55rem 0.85rem; border-radius:14px; + font-size:0.82rem; line-height:1.45; word-break:break-word; animation:fadeUp 0.25s ease; } + .chat-msg.user { align-self:flex-end; background:#20228a; color:#fff; + border-bottom-right-radius:4px; } + .chat-msg.assistant { align-self:flex-start; background:#e9e9eb; color:#1a1a2e; + border-bottom-left-radius:4px; } + .chat-msg.typing { background:#e9e9eb; color:#999; font-style:italic; } + @keyframes fadeUp { from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:translateY(0);} } + .chat-footer { padding:0.7rem 0.9rem; border-top:1px solid #eee; display:flex; gap:0.5rem; } + .chat-footer input { flex:1; border:1.5px solid #ddd; border-radius:999px; + padding:0.55rem 1rem; font-size:0.82rem; font-family:inherit; outline:none; + transition:border-color 0.15s; } + .chat-footer input:focus { border-color:#20228a; } + .chat-footer button { background:#20228a; color:#fff; border:none; border-radius:999px; + padding:0.55rem 1rem; font-weight:600; font-size:0.82rem; cursor:pointer; + transition:background 0.15s; font-family:inherit; } + .chat-footer button:hover { background:#161e6e; } + .chat-footer button:disabled { opacity:0.5; cursor:default; } + @media(max-width:600px) { + .chat-overlay { bottom:5rem; right:0.5rem; width:calc(100vw - 1rem); max-height:60vh; } + .chat-bubble { bottom:1rem; right:1rem; } + }
@@ -1767,6 +1813,104 @@ def public_frontend(): + + + + + + + +