.wpch-widget-container {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #212121;
}

.wpch-widget-toggle {
	background-color: #d91e18;
	color: #fff;
	border: none;
	padding: 12px 18px;
	border-radius: 50px;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
	font-size: 15px;
}

.wpch-widget-toggle:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(217, 30, 24, 0.25);
}

.wpch-widget-container.wpch-open .wpch-widget-toggle {
	display: none;
}

.wpch-widget-window {
	width: 320px;
	max-width: 90vw;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
	overflow: hidden;
	display: none;
	flex-direction: column;
}

.wpch-widget-container.wpch-open .wpch-widget-window {
	display: flex;
}

.wpch-widget-container.wpch-voice {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

.wpch-widget-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: linear-gradient(135deg, #d91e18, #ff5b4d);
	color: #fff;
	font-weight: 600;
}

.wpch-widget-header .wpch-widget-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
}

.wpch-widget-messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 12px 16px;
	background: #f7f7f9;
}

.wpch-widget-message {
	margin-bottom: 12px;
	max-width: 85%;
}

.wpch-widget-message.from-visitor {
	margin-left: auto;
	text-align: right;
}

.wpch-widget-message.from-visitor .wpch-widget-body {
	background: #d91e18;
	color: #fff;
	border-bottom-right-radius: 4px;
	border-bottom-left-radius: 18px;
}

.wpch-widget-message.from-agent .wpch-widget-body,
.wpch-widget-message.from-human .wpch-widget-body,
.wpch-widget-message.from-admin .wpch-widget-body,
.wpch-widget-message.from-assistant .wpch-widget-body {
	background: #fff;
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 18px;
}

.wpch-widget-message.from-system .wpch-widget-body {
	background: #eceff1;
	color: #37474f;
	font-style: italic;
}

.wpch-widget-meta {
	font-size: 11px;
	color: #607d8b;
	margin-bottom: 4px;
	display: flex;
	gap: 6px;
}

.wpch-widget-message.from-visitor .wpch-widget-meta {
	justify-content: flex-end;
}

.wpch-widget-body {
	padding: 10px 12px;
	border-radius: 18px;
	background: #fff;
	line-height: 1.4;
	display: inline-block;
	text-align: left;
}

.wpch-widget-form {
	padding: 12px 16px 16px;
	display: flex;
	gap: 8px;
	border-top: 1px solid #eceff1;
	background: #fff;
}

.wpch-widget-form input[type="text"] {
	flex: 1 1 auto;
	padding: 10px 12px;
	border-radius: 20px;
	border: 1px solid #cfd8dc;
	font-size: 14px;
}

.wpch-widget-form button {
	background: #d91e18;
	color: #fff;
	border: none;
	border-radius: 20px;
	padding: 10px 16px;
	cursor: pointer;
}

.wpch-widget-empty {
	text-align: center;
	padding: 24px 12px;
	color: #90a4ae;
	font-size: 14px;
}

.wpch-voice-button {
	background: #d91e18;
	color: #fff;
	border: none;
	border-radius: 50px;
	padding: 14px 22px;
	font-size: 16px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.wpch-voice-button:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(217, 30, 24, 0.3);
}

@media (max-width: 600px) {
	.wpch-widget-container {
		bottom: 0;
		right: 0;
		left: 0;
		width: 100%;
		display: flex;
		justify-content: center;
	}

	.wpch-widget-window {
		width: 100%;
		border-radius: 16px 16px 0 0;
	}
}
