.publicity-chatbot,
.publicity-chatbot * {
	box-sizing: border-box;
}

.publicity-chatbot {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: inherit;
	color: #0f172a;
	--publicity-chatbot-primary-color: #000970;
	--publicity-chatbot-border-color: rgba(0, 9, 112, 0.12);
}

.publicity-chatbot [hidden] {
	display: none !important;
}

.publicity-chatbot__launcher {
	border: 0;
	border-radius: 999px;
	background: var(--publicity-chatbot-primary-color);
	color: #fff;
	padding: 14px 18px;
	font-size: 15px;
	font-weight: 700;
	box-shadow: 0 12px 30px rgba(0, 9, 112, 0.28);
	cursor: pointer;
	min-width: 96px;
}

.publicity-chatbot__panel {
	position: absolute;
	right: 0;
	bottom: 64px;
	width: min(360px, calc(100vw - 40px));
	max-height: calc(100vh - 110px);
	display: flex;
	flex-direction: column;
	border-radius: 20px;
	background: #ffffff;
	border: 1px solid var(--publicity-chatbot-border-color);
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
	overflow: hidden;
}

.publicity-chatbot__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 16px 12px;
	background: linear-gradient(135deg, var(--publicity-chatbot-primary-color) 0%, #1736c6 100%);
	color: #fff;
}

.publicity-chatbot__eyebrow {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.8;
}

.publicity-chatbot__title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}

.publicity-chatbot__close {
	border: 0;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
}

.publicity-chatbot__messages {
	max-height: 320px;
	overflow: auto;
	padding: 16px;
	display: grid;
	gap: 10px;
	background: #f7f9ff;
}

.publicity-chatbot__body {
	display: grid;
	gap: 14px;
	padding: 14px;
	background: #fff;
	flex: 1 1 auto;
	overflow: auto;
}

.publicity-chatbot__contact,
.publicity-chatbot__chat {
	display: grid;
	gap: 12px;
}

.publicity-chatbot__intro {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: #334155;
}

.publicity-chatbot__contact-form {
	display: grid;
	gap: 10px;
}

.publicity-chatbot__actions {
	display: flex;
	justify-content: flex-end;
}

.publicity-chatbot__reset {
	border: 0;
	background: transparent;
	color: var(--publicity-chatbot-primary-color);
	font-weight: 700;
	font-size: 13px;
	padding: 0;
	cursor: pointer;
}

.publicity-chatbot__message {
	max-width: 90%;
	padding: 12px 14px;
	border-radius: 16px;
	line-height: 1.45;
	font-size: 14px;
	word-break: break-word;
}

.publicity-chatbot__message--bot {
	background: #fff;
	border: 1px solid rgba(0, 9, 112, 0.1);
	border-top-left-radius: 6px;
}

.publicity-chatbot__message--user {
	margin-left: auto;
	background: var(--publicity-chatbot-primary-color);
	color: #fff;
	border-top-right-radius: 6px;
}

.publicity-chatbot__message--typing {
	opacity: 0.78;
	font-style: italic;
}

.publicity-chatbot__form {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	padding: 0;
	background: transparent;
	border-top: 0;
}

.publicity-chatbot__input {
	border: 1px solid rgba(0, 9, 112, 0.16);
	border-radius: 999px;
	min-height: 44px;
	padding: 0 16px;
	font-size: 14px;
	color: #0f172a;
}

.publicity-chatbot__input:focus {
	outline: 2px solid rgba(0, 9, 112, 0.25);
	outline-offset: 1px;
}

.publicity-chatbot__input:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.publicity-chatbot__send {
	border: 0;
	border-radius: 999px;
	background: var(--publicity-chatbot-primary-color);
	color: #fff;
	padding: 0 18px;
	min-height: 44px;
	font-weight: 700;
	cursor: pointer;
}

.publicity-chatbot__send:disabled {
	opacity: 0.7;
	cursor: progress;
}

.publicity-chatbot__footer {
	display: flex;
	justify-content: flex-start;
	padding: 0 14px 14px;
	background: #fff;
	border-top: 1px solid rgba(0, 9, 112, 0.08);
}

.publicity-chatbot__whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 14px;
	border-radius: 999px;
	background: #25d366;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.publicity-chatbot__whatsapp:hover {
	color: #fff;
	text-decoration: none;
	filter: brightness(1.02);
}

@media (max-width: 640px) {
	.publicity-chatbot {
		left: 12px;
		right: 12px;
		bottom: 12px;
	}

	.publicity-chatbot__launcher {
		width: 100%;
	}

	.publicity-chatbot__panel {
		width: 100%;
		max-height: calc(100vh - 110px);
	}

	.publicity-chatbot__form {
		grid-template-columns: 1fr;
	}

	.publicity-chatbot__send {
		width: 100%;
	}
}
