chat: move widget to standalone bar below header, panel above input, 340px fixed width, blue border, left-aligned

This commit is contained in:
Oliver
2026-06-06 17:17:54 -03:00
parent c327822bc7
commit 570c9d0951
+37 -41
View File
@@ -336,7 +336,7 @@
HERO HERO
══════════════════════════════════════════════════════════ */ ══════════════════════════════════════════════════════════ */
.hero { .hero {
padding: 140px 0 80px; padding: 104px 0 80px;
text-align: center; text-align: center;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
@@ -960,7 +960,7 @@
.features-grid { grid-template-columns: 1fr; } .features-grid { grid-template-columns: 1fr; }
.hero-stats { gap: 24px; } .hero-stats { gap: 24px; }
.hero { padding: 110px 0 60px; } .hero { padding: 90px 0 60px; }
section { padding: 60px 0; } section { padding: 60px 0; }
.pricing-card { padding: 32px 24px; } .pricing-card { padding: 32px 24px; }
@@ -971,47 +971,37 @@
} }
} }
/* ── Nav Chat ──────────────────────────────────────────── */ /* ── Chat Bar (standalone below header) ───────────────── */
.nav-chat { .nav-chat-wrap {
position: relative;
display: flex; display: flex;
align-items: center; flex-direction: column;
align-items: flex-start;
width: 340px; width: 340px;
height: 36px; max-width: 100%;
--chat-panel-height: 300px; position: relative;
} }
.nav-chat-panel { .nav-chat-panel {
position: absolute;
top: calc(100% + 6px);
left: 0;
width: 340px; width: 340px;
min-width: 340px; max-width: 100%;
max-width: 340px; height: 300px;
height: var(--chat-panel-height);
background: var(--bg-card); background: var(--bg-card);
border: 1px solid var(--accent); border: 1px solid var(--accent);
border-radius: 18px; border-radius: 18px;
box-shadow: 0 24px 80px rgba(0,0,0,0.5); box-shadow: 0 24px 80px rgba(0,0,0,0.5);
overflow: hidden; overflow: hidden;
visibility: hidden; display: none;
opacity: 0;
pointer-events: none;
display: flex;
flex-direction: column; flex-direction: column;
transition: opacity 0.22s ease, visibility 0.22s ease; margin-bottom: 8px;
z-index: 9999; z-index: 9999;
} }
.nav-chat.open .nav-chat-panel { .nav-chat.open .nav-chat-panel {
visibility: visible; display: flex;
opacity: 1;
pointer-events: auto;
} }
.nav-chat-main { .nav-chat-main {
position: relative;
z-index: 2;
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 340px;
max-width: 100%;
height: 36px; height: 36px;
background: var(--bg-inner); background: var(--bg-inner);
border: 1px solid var(--border); border: 1px solid var(--border);
@@ -1020,7 +1010,7 @@
flex-shrink: 0; flex-shrink: 0;
transition: border-color 0.25s, box-shadow 0.25s; transition: border-color 0.25s, box-shadow 0.25s;
} }
.nav-chat:focus-within .nav-chat-main { .nav-chat-main:focus-within {
border-color: var(--accent); border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(79, 142, 247, 0.15); box-shadow: 0 0 0 2px rgba(79, 142, 247, 0.15);
} }
@@ -1108,7 +1098,7 @@
opacity: 0.6; opacity: 0.6;
} }
@media (max-width: 700px) { @media (max-width: 700px) {
.nav-chat { display: none; } .nav-chat-wrap { display: none; }
} }
</style> </style>
</head> </head>
@@ -1136,20 +1126,6 @@
<li><a href="#pricing">Pricing</a></li> <li><a href="#pricing">Pricing</a></li>
<li><a href="#faq">FAQ</a></li> <li><a href="#faq">FAQ</a></li>
</ul> </ul>
<div class="nav-chat" id="nav-chat">
<div class="nav-chat-panel" id="chat-panel" aria-hidden="true">
<div class="chat-panel-header">
<span class="chat-panel-title">💬 Sales Agent</span>
<button class="chat-panel-close" id="chat-panel-close" onclick="chatClose()"></button>
</div>
<div class="chat-history" id="chat-msgs"></div>
</div>
<div class="nav-chat-main">
<button class="nav-chat-toggle" id="nav-chat-toggle" onclick="chatToggle()" aria-label="Toggle chat history">💬</button>
<input type="text" class="nav-chat-input" id="chat-input" placeholder="Ask your sales agent" onkeydown="chatKey(event)" />
<button class="nav-chat-send" id="chat-send-btn" onclick="chatSend()"></button>
</div>
</div>
<div class="header-actions"> <div class="header-actions">
<a href="https://app.derez.ai" class="btn-login"> <a href="https://app.derez.ai" class="btn-login">
@@ -1167,6 +1143,26 @@
</div> </div>
</header> </header>
<!-- ═══════════════════════════════════════════════════════════════
CHAT BAR (standalone below fixed header)
═══════════════════════════════════════════════════════════════ -->
<div class="container" style="padding-top: 66px; padding-bottom: 6px;">
<div class="nav-chat-wrap" id="nav-chat">
<div class="nav-chat-panel" id="chat-panel" aria-hidden="true">
<div class="chat-panel-header">
<span class="chat-panel-title">💬 Sales Agent</span>
<button class="chat-panel-close" id="chat-panel-close" onclick="chatClose()"></button>
</div>
<div class="chat-history" id="chat-msgs"></div>
</div>
<div class="nav-chat-main">
<button class="nav-chat-toggle" id="nav-chat-toggle" onclick="chatToggle()" aria-label="Toggle chat history">💬</button>
<input type="text" class="nav-chat-input" id="chat-input" placeholder="Ask your sales agent" onkeydown="chatKey(event)" />
<button class="nav-chat-send" id="chat-send-btn" onclick="chatSend()"></button>
</div>
</div>
</div>
<!-- ═══════════════════════════════════════════════════════════════ <!-- ═══════════════════════════════════════════════════════════════
HERO HERO
═══════════════════════════════════════════════════════════════ --> ═══════════════════════════════════════════════════════════════ -->