#icst-chat-bubble {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--icst-bubble-color, var(--icst-accent, #1a56db));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	z-index: 999998;
	font-size: 26px;
	overflow: hidden;
}

.icst-bubble-avatar {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

#icst-chat-window {
	position: fixed;
	bottom: 88px;
	right: 20px;
	width: 320px;
	max-width: calc(100vw - 40px);
	height: 440px;
	max-height: calc(100vh - 140px);
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	display: none;
	flex-direction: column;
	overflow: hidden;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#icst-chat-window.icst-open {
	display: flex;
}

.icst-header {
	background: var(--icst-accent, #1a56db);
	color: #fff;
	padding: 10px 14px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.icst-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.icst-header-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.25);
}

.icst-header-title-wrap {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.icst-header-title {
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.icst-header-status {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	opacity: 0.85;
	margin-top: 2px;
}

.icst-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #22c55e;
	display: inline-block;
	flex-shrink: 0;
}

.icst-header .icst-close {
	cursor: pointer;
	font-size: 18px;
	flex-shrink: 0;
	margin-left: 8px;
}

.icst-messages {
	flex: 1;
	overflow-y: auto;
	padding: 10px;
	background: #f7f8fa;
	display: flex;
	flex-direction: column;
}

.icst-msg {
	max-width: 80%;
	margin-bottom: 8px;
	padding: 8px 10px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.4;
	word-wrap: break-word;
	white-space: pre-line;
}

.icst-msg strong {
	font-weight: 700;
}

.icst-msg em {
	font-style: italic;
}

.icst-msg-img,
.icst-msg-media {
	max-width: 100%;
	border-radius: 8px;
	margin: 4px 0;
	display: block;
}

.icst-msg-audio {
	width: 100%;
	margin: 4px 0;
	display: block;
}

.icst-msg a {
	color: inherit;
	text-decoration: underline;
	word-break: break-all;
}

.icst-msg.icst-in {
	background: #e9ecf5;
	color: #1a1a1a;
	align-self: flex-start;
	margin-right: auto;
}

.icst-msg.icst-out {
	background: var(--icst-accent, #1a56db);
	color: #fff;
	margin-left: auto;
	white-space: pre-line;
}

.icst-quick-replies {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
}

.icst-quick-reply {
	background: var(--icst-accent, #1a56db);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	white-space: normal;
	line-height: 1.3;
}

.icst-quick-reply:hover {
	filter: brightness(1.1);
}

.icst-quick-reply:active {
	filter: brightness(0.95);
}

.icst-privacy-footer {
	padding: 6px 10px;
	text-align: center;
	font-size: 11px;
	color: #888;
	border-top: 1px solid #eee;
	flex-shrink: 0;
}

.icst-privacy-footer a {
	color: #888;
	text-decoration: underline;
}

.icst-input-row {
	display: flex;
	border-top: 1px solid #eee;
	padding: 8px;
	gap: 6px;
	flex-shrink: 0;
}

.icst-input-row input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 8px 10px;
	font-size: 13px;
}

.icst-input-row button {
	background: var(--icst-accent, #1a56db);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0 14px;
	cursor: pointer;
}

.icst-input-row button:disabled {
	opacity: 0.6;
	cursor: default;
}
