#wwp-chat-root {
	--wc-accent: #ff8a3d;
	--wc-accent-700: #d9591b;
	--wc-accent-100: #fff1e6;
	--wc-navy-900: #0b1220;
	--wc-navy-800: #121a2e;
	--wc-muted: #5b6577;
	--wc-border: #e3e8f2;
	--wc-radius: 18px;
	position: fixed; z-index: 99999; right: 20px; bottom: 20px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.wwp-chat-bubble {
	position: relative; height: 56px; padding: 0 22px 0 18px; border-radius: 999px; border: none; cursor: pointer;
	background: linear-gradient(135deg, var(--wc-accent), var(--wc-accent-700));
	color: #fff; box-shadow: 0 14px 30px -10px rgba(217,89,27,.55);
	display: inline-flex; align-items: center; gap: 9px;
	transition: transform .18s ease, box-shadow .18s ease;
}
.wwp-chat-bubble:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 18px 36px -10px rgba(217,89,27,.65); }
.wwp-chat-bubble__icon { font-size: 22px; line-height: 1; }
.wwp-chat-bubble__text { font-weight: 800; font-size: 0.95rem; letter-spacing: -0.01em; white-space: nowrap; }
.wwp-chat-bubble__badge {
	position: absolute; top: -3px; right: -3px; width: 14px; height: 14px; border-radius: 50%;
	background: #22c55e; border: 2px solid #fff;
}
@media (max-width: 420px) {
	.wwp-chat-bubble__text { display: none; }
	.wwp-chat-bubble { width: 56px; padding: 0; justify-content: center; }
}

.wwp-chat-panel {
	position: absolute; right: 0; bottom: 76px; width: 360px; max-width: calc(100vw - 32px);
	height: 520px; max-height: calc(100vh - 140px);
	background: #fff; border-radius: var(--wc-radius); overflow: hidden;
	box-shadow: 0 28px 60px -18px rgba(6,10,20,.45), 0 0 0 1px rgba(11,18,32,.06);
	display: flex; flex-direction: column;
	opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none;
	transition: opacity .18s ease, transform .18s ease;
}
.wwp-chat-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.wwp-chat-panel__header {
	background: linear-gradient(135deg, var(--wc-navy-900), var(--wc-navy-800));
	color: #fff; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.wwp-chat-panel__header h3 { margin: 0; font-size: 1rem; color: #fff !important; }
.wwp-chat-panel__header p { margin: 2px 0 0; font-size: 0.78rem; color: #aab3c8; }
.wwp-chat-panel__close {
	background: rgba(255,255,255,.1); border: none; color: #fff; width: 28px; height: 28px;
	border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; flex-shrink: 0;
}
.wwp-chat-panel__close:hover { background: rgba(255,255,255,.2); }

.wwp-chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f8f9fc; }
.wwp-chat-body[hidden],
.wwp-chat-intake[hidden],
.wwp-chat-footer[hidden] { display: none; }

.wwp-chat-msg { max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 0.88rem; line-height: 1.45; }
.wwp-chat-msg--assistant { align-self: flex-start; background: #fff; border: 1px solid var(--wc-border); color: var(--wc-navy-900); border-bottom-left-radius: 4px; }
.wwp-chat-msg--user { align-self: flex-end; background: linear-gradient(135deg, var(--wc-accent), var(--wc-accent-700)); color: #fff; border-bottom-right-radius: 4px; }
.wwp-chat-msg a { color: inherit; text-decoration: underline; font-weight: 700; }
.wwp-chat-msg--assistant a { color: var(--wc-accent-700); }

.wwp-chat-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--wc-border); border-radius: 14px; border-bottom-left-radius: 4px; }
.wwp-chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--wc-muted); animation: wwp-chat-bounce 1.1s infinite ease-in-out; }
.wwp-chat-typing span:nth-child(2) { animation-delay: .15s; }
.wwp-chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes wwp-chat-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.wwp-chat-intake { padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; background: #f8f9fc; flex: 1; }
.wwp-chat-intake p { margin: 0; font-size: 0.9rem; color: var(--wc-navy-900); }
.wwp-chat-intake label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--wc-navy-900); margin-bottom: 4px; }
.wwp-chat-intake input {
	width: 100%; padding: 10px 12px; border: 1.5px solid var(--wc-border); border-radius: 10px;
	font: inherit; font-size: 0.88rem; box-sizing: border-box;
}
.wwp-chat-intake input:focus { outline: none; border-color: var(--wc-accent); box-shadow: 0 0 0 3px var(--wc-accent-100); }
.wwp-chat-intake__error { color: #b3261e; font-size: 0.8rem; min-height: 1em; }

.wwp-chat-footer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--wc-border); background: #fff; }
.wwp-chat-footer input {
	flex: 1; border: 1.5px solid var(--wc-border); border-radius: 999px; padding: 10px 16px;
	font: inherit; font-size: 0.88rem;
}
.wwp-chat-footer input:focus { outline: none; border-color: var(--wc-accent); box-shadow: 0 0 0 3px var(--wc-accent-100); }

.wwp-chat-btn {
	border: none; border-radius: 999px; font-weight: 700; cursor: pointer;
	background: linear-gradient(135deg, var(--wc-accent), var(--wc-accent-700)); color: #fff;
	transition: transform .15s ease, filter .15s ease;
}
.wwp-chat-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.wwp-chat-btn:disabled { opacity: .5; cursor: default; transform: none; }
.wwp-chat-intake .wwp-chat-btn { padding: 11px 16px; }
.wwp-chat-footer .wwp-chat-btn { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; padding: 0; }

@media (max-width: 420px) {
	#wwp-chat-root { right: 12px; bottom: 12px; }
	.wwp-chat-panel { width: calc(100vw - 24px); right: -8px; }
}
