#pcp-chatbot-wrap * { box-sizing: border-box; font-family: inherit; }

/* Botó flotant */
#pcp-chatbot-btn {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--pcp-color, #00BCD4);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(0,0,0,0.2);
	z-index: 9999;
	transition: transform 0.2s, background 0.2s;
}
#pcp-chatbot-btn:hover { background: var(--pcp-color-fosc, #0097A7); transform: scale(1.08); }
#pcp-chatbot-btn svg { width: 26px; height: 26px; fill: #fff; }
#pcp-chatbot-badge {
	position: absolute;
	top: -4px; right: -4px;
	width: 18px; height: 18px;
	background: #e53935;
	border-radius: 50%;
	border: 2px solid #fff;
	display: none;
}

/* Panell */
#pcp-chatbot-panel {
	position: fixed;
	bottom: 90px;
	right: 24px;
	width: 340px;
	max-height: 520px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.18);
	display: flex;
	flex-direction: column;
	z-index: 9998;
	overflow: hidden;
	transform: scale(0.9) translateY(20px);
	opacity: 0;
	pointer-events: none;
	transition: transform 0.22s ease, opacity 0.22s ease;
}
#pcp-chatbot-panel.obert {
	transform: scale(1) translateY(0);
	opacity: 1;
	pointer-events: all;
}

/* Capçalera */
#pcp-chatbot-cap {
	background: var(--pcp-color, #00BCD4);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
}
#pcp-chatbot-cap svg { width: 20px; height: 20px; fill: #fff; flex-shrink: 0; }
#pcp-chatbot-cap-titol { flex: 1; font-weight: 600; font-size: 15px; }
#pcp-chatbot-cap-sub { font-size: 11px; opacity: 0.85; }
#pcp-chatbot-tancar {
	background: none; border: none; color: #fff;
	cursor: pointer; font-size: 18px; line-height: 1; padding: 0;
	opacity: 0.8; align-self: center; margin-left: auto; flex-shrink: 0;
}
#pcp-chatbot-tancar:hover { opacity: 1; }

/* Missatges */
#pcp-chatbot-msgs {
	flex: 1;
	overflow-y: auto;
	padding: 16px 12px 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.pcp-msg {
	max-width: 85%;
	padding: 9px 13px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
}
.pcp-msg-bot {
	background: #f0f4f8;
	color: #222;
	align-self: flex-start;
	border-bottom-left-radius: 4px;
}
.pcp-msg-usuari {
	background: var(--pcp-color, #00BCD4);
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}

/* Opcions */
#pcp-chatbot-opcions {
	padding: 6px 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.pcp-opcio {
	background: #fff;
	border: 1.5px solid var(--pcp-color, #00BCD4);
	color: var(--pcp-color, #00BCD4);
	border-radius: 20px;
	padding: 7px 14px;
	font-size: 13px;
	cursor: pointer;
	text-align: left;
	transition: background 0.15s, color 0.15s;
}
.pcp-opcio:hover {
	background: var(--pcp-color, #00BCD4);
	color: #fff;
}
.pcp-opcio-link {
	text-decoration: none;
	display: block;
	background: var(--pcp-color, #00BCD4);
	color: #fff;
	border-radius: 20px;
	padding: 7px 14px;
	font-size: 13px;
	text-align: center;
	margin-top: 4px;
}
.pcp-opcio-link:hover { background: var(--pcp-color-fosc, #0097A7); color: #fff; }

/* Llista de processos */
.pcp-llista {
	margin: 6px 0 0;
	padding-left: 16px;
	list-style: disc;
}
.pcp-llista li {
	font-size: 13px;
	line-height: 1.4;
	margin-bottom: 10px;
}
.pcp-llista li:last-child { margin-bottom: 0; }
.pcp-llista li strong { display: block; }
.pcp-msg-meta { display: block; font-size: 11px; color: #666; margin-top: 1px; }

/* Escrivint... */
.pcp-typing {
	display: flex; gap: 4px; align-items: center;
	padding: 10px 14px;
}
.pcp-typing span {
	width: 7px; height: 7px;
	background: #aaa; border-radius: 50%;
	animation: pcp-bounce 1.2s infinite;
}
.pcp-typing span:nth-child(2) { animation-delay: 0.2s; }
.pcp-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pcp-bounce {
	0%, 80%, 100% { transform: translateY(0); }
	40% { transform: translateY(-6px); }
}

@media (max-width: 400px) {
	#pcp-chatbot-panel { width: calc(100vw - 24px); right: 12px; bottom: 80px; }
	#pcp-chatbot-btn  { right: 12px; bottom: 16px; }
}
