.chatpro-widget {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 2147482000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #111827;
}

.chatpro-widget * {
	box-sizing: border-box;
}

.chatpro-toggle {
	width: 56px;
	height: 56px;
	border: 0;
	border-radius: 50%;
	background: #111827;
	color: #fff;
	box-shadow: 0 16px 36px rgba(0, 0, 0, .28);
	cursor: pointer;
	font-size: 22px;
	line-height: 56px;
	text-align: center;
}

.chatpro-panel {
	display: none;
	width: min(360px, calc(100vw - 32px));
	height: 520px;
	max-height: calc(100vh - 104px);
	margin-bottom: 14px;
	background: #fff;
	border: 1px solid #d9dee7;
	border-radius: 8px;
	box-shadow: 0 20px 54px rgba(15, 23, 42, .24);
	overflow: hidden;
}

.chatpro-widget.is-open .chatpro-panel {
	display: flex;
	flex-direction: column;
}

.chatpro-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: #111827;
	color: #fff;
}

.chatpro-header strong {
	display: block;
	font-size: 15px;
	line-height: 1.2;
}

.chatpro-header span {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: #c7d2fe;
}

.chatpro-close {
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff;
	cursor: pointer;
	font-size: 18px;
}

.chatpro-identity {
	display: grid;
	gap: 8px;
	padding: 12px;
	border-bottom: 1px solid #eef2f7;
	background: #f8fafc;
}

.chatpro-identity input,
.chatpro-composer textarea {
	width: 100%;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 9px 10px;
	font: inherit;
}

.chatpro-identity button,
.chatpro-composer button {
	border: 0;
	border-radius: 6px;
	background: #2563eb;
	color: #fff;
	padding: 9px 12px;
	font-weight: 600;
	cursor: pointer;
}

.chatpro-messages {
	flex: 1;
	overflow: auto;
	padding: 14px 12px;
	background: #fff;
}

.chatpro-message {
	max-width: 82%;
	margin: 0 0 10px;
	padding: 9px 10px;
	border-radius: 8px;
	background: #f1f5f9;
	font-size: 13px;
	line-height: 1.35;
	white-space: pre-wrap;
}

.chatpro-message.is-client {
	margin-left: auto;
	background: #dbeafe;
}

.chatpro-message.is-agent {
	margin-right: auto;
	background: #f1f5f9;
}

.chatpro-status {
	min-height: 24px;
	padding: 0 12px 8px;
	color: #64748b;
	font-size: 12px;
	line-height: 1.35;
}

.chatpro-status[hidden] {
	display: none;
}

.chatpro-composer {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #eef2f7;
}

.chatpro-composer textarea {
	height: 42px;
	min-height: 42px;
	max-height: 96px;
	resize: none;
	overflow: auto;
}

.chatpro-composer button:disabled {
	cursor: wait;
	opacity: .72;
}

@media (max-width: 520px) {
	.chatpro-widget {
		right: 16px;
		bottom: 16px;
	}
}
