#vozare-chat,
#vozare-chat * {
	box-sizing: border-box;
}

#vozare-chat {
	--hzw-color: #244aaf;
	--hzw-color-dark: #173582;
	--hzw-header-text: #ffffff;
	--hzw-panel-bg: #ffffff;
	--hzw-messages-bg: #f8fbff;
	--hzw-border: #dce4f0;
	--hzw-text: #162033;
	--hzw-muted: #6e7d98;
	--hzw-assistant-bg: #ffffff;
	--hzw-assistant-text: #162033;
	--hzw-user-bg: #244aaf;
	--hzw-user-text: #ffffff;
	--hzw-input-bg: #ffffff;
	--hzw-input-text: #162033;
	--hzw-input-border: #c9d8f2;
	--hzw-send-bg: #8ea5df;
	--hzw-send-icon: #ffffff;
	--hzw-footer-color: #7e8aa2;
	position: fixed;
	bottom: 18px;
	z-index: 999990;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
}

#vozare-chat.hzw-right {
	right: 18px;
}

#vozare-chat.hzw-left {
	left: 18px;
}

.hzw-launcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: 0;
	border-radius: 999px;
	padding: 12px 18px;
	background: linear-gradient(135deg, var(--hzw-color) 0%, var(--hzw-color-dark) 100%);
	color: var(--hzw-header-text);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 16px 32px rgba(17, 35, 79, 0.22);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hzw-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 20px 38px rgba(17, 35, 79, 0.28);
}

.hzw-launcher-icon,
.hzw-launcher-icon svg {
	display: block;
	width: 20px;
	height: 20px;
}

.hzw-panel {
	position: absolute;
	bottom: 0;
	display: flex;
	width: min(380px, calc(100vw - 24px));
	height: min(620px, calc(100vh - 92px));
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--hzw-border);
	border-radius: 24px;
	background: var(--hzw-panel-bg);
	box-shadow: 0 28px 68px rgba(17, 35, 79, 0.2);
	opacity: 0;
	transform: translateY(18px) scale(0.985);
	pointer-events: none;
	transition: opacity 0.24s ease, transform 0.24s ease;
}

#vozare-chat.hzw-right .hzw-panel {
	right: 0;
}

#vozare-chat.hzw-left .hzw-panel {
	left: 0;
}

#vozare-chat.hzw-open .hzw-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

#vozare-chat.hzw-open .hzw-launcher {
	display: none;
}

.hzw-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	background: linear-gradient(135deg, var(--hzw-color) 0%, var(--hzw-color-dark) 100%);
	color: var(--hzw-header-text);
}

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

.hzw-bot-badge {
	display: grid;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	place-items: center;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(8px);
}

.hzw-bot-badge svg {
	display: block;
	width: 19px;
	height: 19px;
}

.hzw-header-copy {
	min-width: 0;
}

.hzw-title {
	font-size: 15px;
	font-weight: 800;
	line-height: 1.15;
}

.hzw-subtitle {
	margin-top: 2px;
	font-size: 11px;
	font-weight: 500;
	opacity: 0.9;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hzw-header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.hzw-action-btn {
	display: grid;
	width: 32px;
	height: 32px;
	place-items: center;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.1);
	color: var(--hzw-header-text);
	cursor: pointer;
	transition: background-color 0.16s ease, transform 0.16s ease;
}

.hzw-action-btn:hover {
	background: rgba(255, 255, 255, 0.18);
	transform: translateY(-1px);
}

.hzw-action-btn svg {
	display: block;
	width: 16px;
	height: 16px;
}

.hzw-messages {
	flex: 1;
	overflow-y: auto;
	background-color: var(--hzw-messages-bg);
	background-image: radial-gradient(circle at top right, rgba(36, 74, 175, 0.07), transparent 28%);
	padding: 14px 14px 8px;
}

.hzw-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding-top: 34px;
	text-align: center;
	color: var(--hzw-muted);
}

.hzw-empty p {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
}

.hzw-empty-badge {
	display: grid;
	width: 48px;
	height: 48px;
	place-items: center;
	border-radius: 999px;
	background: rgba(36, 74, 175, 0.1);
	color: var(--hzw-color);
}

.hzw-empty-badge svg {
	display: block;
	width: 20px;
	height: 20px;
}

.hzw-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin-bottom: 12px;
}

.hzw-row-user {
	flex-direction: row-reverse;
}

.hzw-row-avatar {
	display: grid;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	place-items: center;
	border-radius: 999px;
}

.hzw-row-avatar svg {
	display: block;
	width: 14px;
	height: 14px;
}

.hzw-row-avatar-assistant {
	background: rgba(36, 74, 175, 0.1);
	color: var(--hzw-color);
}

.hzw-row-avatar-user {
	background: #edf1f7;
	color: #71809b;
}

.hzw-row-body {
	display: flex;
	max-width: 78%;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.hzw-row-user .hzw-row-body {
	align-items: flex-end;
}

.hzw-msg {
	border-radius: 18px;
	padding: 12px 14px;
	box-shadow: 0 6px 18px rgba(22, 32, 51, 0.05);
	font-size: 14px;
	line-height: 1.7;
	white-space: pre-wrap;
	word-break: break-word;
}

.hzw-msg-assistant {
	border: 1px solid var(--hzw-border);
	border-top-right-radius: 8px;
	background: var(--hzw-assistant-bg);
	color: var(--hzw-assistant-text);
}

.hzw-row-user .hzw-msg-user {
	border-top-left-radius: 8px;
	background: var(--hzw-user-bg);
	color: var(--hzw-user-text);
}

#vozare-chat[dir="rtl"] .hzw-msg-assistant {
	border-top-right-radius: 18px;
	border-top-left-radius: 8px;
}

#vozare-chat[dir="rtl"] .hzw-row-user .hzw-msg-user {
	border-top-left-radius: 18px;
	border-top-right-radius: 8px;
}

.hzw-msg-success {
	border-color: #a8dfbd;
	background: linear-gradient(180deg, #effcf4 0%, #e7f9ef 100%);
	color: #135f34;
}

.hzw-msg-success-head {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 8px;
	font-size: 12px;
	font-weight: 800;
	color: #13984a;
}

.hzw-msg-success-head svg {
	display: block;
	width: 16px;
	height: 16px;
}

.hzw-media {
	display: flex;
	width: 100%;
	flex-direction: column;
	gap: 8px;
}

.hzw-media-card,
.hzw-media-rich {
	overflow: hidden;
	border: 1px solid var(--hzw-border);
	border-radius: 18px;
	background: #fff;
}

.hzw-media-card {
	display: block;
	text-decoration: none;
}

.hzw-media-card img,
.hzw-media-rich video {
	display: block;
	width: 100%;
	max-height: 260px;
	object-fit: cover;
}

.hzw-media-caption {
	margin: 0;
	padding: 10px 12px 12px;
	color: var(--hzw-text);
	font-size: 13px;
	line-height: 1.6;
}

.hzw-media-audio,
.hzw-media-file {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid var(--hzw-border);
	border-radius: 18px;
	background: #fff;
	padding: 10px 12px;
}

.hzw-media-file {
	color: var(--hzw-text);
	text-decoration: none;
}

.hzw-media-icon {
	display: grid;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	place-items: center;
	border-radius: 12px;
	background: rgba(36, 74, 175, 0.08);
	color: var(--hzw-color);
}

.hzw-media-icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

.hzw-media-audio audio {
	width: 100%;
	min-width: 0;
}

.hzw-media-name {
	min-width: 0;
	flex: 1;
	font-size: 13px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hzw-row-typing .hzw-typing {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border-radius: 18px;
	border-top-right-radius: 8px;
	background: var(--hzw-assistant-bg);
	padding: 12px 14px;
	box-shadow: 0 6px 18px rgba(22, 32, 51, 0.05);
	border: 1px solid var(--hzw-border);
}

#vozare-chat[dir="rtl"] .hzw-row-typing .hzw-typing {
	border-top-right-radius: 18px;
	border-top-left-radius: 8px;
}

.hzw-typing span {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: #b7c3d7;
	animation: hzw-bounce 1.1s infinite ease-in-out;
}

.hzw-typing span:nth-child(2) {
	animation-delay: 0.12s;
}

.hzw-typing span:nth-child(3) {
	animation-delay: 0.24s;
}

@keyframes hzw-bounce {
	0%, 80%, 100% {
		transform: scale(0.65);
		opacity: 0.55;
	}
	40% {
		transform: scale(1);
		opacity: 1;
	}
}

.hzw-composer {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	border-top: 1px solid var(--hzw-border);
	background: var(--hzw-panel-bg);
	padding: 12px 12px 10px;
}

.hzw-input-shell {
	display: flex;
	min-height: 42px;
	flex: 1;
	align-items: flex-end;
	border: 1px solid var(--hzw-input-border);
	border-radius: 999px;
	background: var(--hzw-input-bg);
	box-shadow: 0 2px 7px rgba(17, 35, 79, 0.05);
	padding: 10px 16px;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.hzw-input-shell:focus-within {
	border-color: var(--hzw-color);
	box-shadow: 0 0 0 3px rgba(36, 74, 175, 0.12);
}

.hzw-input {
	width: 100%;
	min-height: 22px;
	max-height: 120px;
	resize: none;
	border: 0;
	background: transparent;
	color: var(--hzw-input-text);
	font: inherit;
	line-height: 1.55;
	outline: none;
	padding: 0;
	margin: 0;
}

.hzw-input::placeholder {
	color: #95a2b6;
}

.hzw-send {
	display: grid;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	place-items: center;
	border: 0;
	border-radius: 999px;
	background: var(--hzw-send-bg);
	color: var(--hzw-send-icon);
	cursor: pointer;
	transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.hzw-send:hover {
	transform: translateY(-1px);
	filter: brightness(0.98);
}

.hzw-send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.hzw-send svg {
	display: block;
	width: 18px;
	height: 18px;
}

#vozare-chat.hzw-rtl .hzw-send svg {
	transform: scaleX(-1);
}

.hzw-footer {
	background: var(--hzw-panel-bg);
	padding: 0 12px 12px;
	text-align: center;
}

.hzw-footer-link {
	color: var(--hzw-footer-color);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
}

.hzw-footer-link:hover {
	color: var(--hzw-color);
}

@media (max-width: 640px) {
	#vozare-chat {
		bottom: 12px;
	}

	#vozare-chat.hzw-right {
		right: 12px;
	}

	#vozare-chat.hzw-left {
		left: 12px;
	}

	.hzw-panel {
		width: min(100vw - 12px, 390px);
		height: min(74vh, 640px);
		border-radius: 22px;
	}

	.hzw-launcher {
		padding: 11px 15px;
	}
}
