#chat-bubble {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: #e30613;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	box-shadow: 0 4px 12px rgba(227, 6, 19, 0.35);
	transition:
		background 0.15s,
		transform 0.15s;
	z-index: 1000;
}

#chat-bubble:hover {
	background: #b8040f;
	transform: scale(1.06);
}

#chat-bubble:active {
	transform: scale(0.97);
}

#chat-bubble svg {
	width: 26px;
	height: 26px;
	fill: #fff;
}

#chat-bubble .icon-chat {
	display: block;
}

#chat-bubble .icon-close {
	display: none;
}

#chat-bubble.is-open .icon-chat {
	display: none;
}

#chat-bubble.is-open .icon-close {
	display: block;
}

#chat-badge {
	position: fixed;
	bottom: 66px;
	right: 18px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #1a1a2e;
	color: #fff;
	font-family: "Source sans 3", "Arial", sans-serif;
	font-size: 1.25rem;
	font-weight: 500;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1001;
}

#chat-window {
	position: fixed;
	bottom: 92px;
	right: 24px;
	width: 440px;
	height: 560px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	overflow: visible;
	display: none;
	flex-direction: column;
	z-index: 999;
}

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

#chat-header {
	background: #e30613;
	padding: 10px 12px 10px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	min-height: 52px;
	position: relative;
	overflow: visible;
}

#chat-header-logo {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

#chat-header-logo svg {
	height: 36px;
	width: auto;
	display: block;
	flex-shrink: 0;
}

#chat-header-title {
	font-family: "Segoe UI", sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#chat-header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
	margin-left: 8px;
}

#chat-header-download-txt,
#chat-header-download-pdf,
#chat-header-info,
#chat-header-close {
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.15s;
	min-width: 44px;
	min-height: 44px;
}

#chat-header-download-txt:hover,
#chat-header-download-pdf:hover,
#chat-header-info:hover,
#chat-header-close:hover {
	background: rgba(255, 255, 255, 0.18);
}

#chat-header-download-txt svg,
#chat-header-download-pdf svg,
#chat-header-info svg,
#chat-header-close svg {
	width: 22px;
	height: 22px;
	fill: #fff;
	color: #fff;
	display: block;
}

#webchat {
	flex: 1;
	min-height: 0;
	overflow: hidden;
	border-radius: 0 0 16px 16px;
}

#chat-loading {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 10px;
	background: #f7f7f8;
	font-family: "Segoe UI", sans-serif;
	font-size: 13px;
	color: #888;
}

#chat-loading-spinner {
	width: 28px;
	height: 28px;
	border: 3px solid #fde8e9;
	border-top-color: #e30613;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 480px) {
	#chat-window {
		bottom: 0;
		right: 0;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		border-radius: 0;
		z-index: 1001;
	}

	#chat-bubble {
		bottom: 16px;
		right: 16px;
	}

	#chat-header {
		padding: 12px 8px 12px 16px;
		min-height: 56px;
		border-radius: 0;
	}

	#chat-header-actions {
		gap: 0;
	}

	#webchat {
		border-radius: 0;
	}

	#info-tooltip {
		width: calc(100vw - 32px);
		right: -8px;
		max-width: 320px;
	}

	#resize-handle {
		display: none;
	}
}

#info-tooltip {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 8px;
	width: 320px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	padding: 16px;
	z-index: 1000;
	font-family: "Segoe UI", sans-serif;
	color: #1a1a2e;
}

#info-tooltip.tooltip-hidden {
	display: none;
}

#info-tooltip h3 {
	margin: 0 0 12px 0;
	font-size: 14px;
	font-weight: 600;
	color: #e30613;
}

#info-tooltip p {
	margin: 0 0 12px 0;
	font-size: 12px;
	line-height: 1.5;
}

#info-tooltip ul {
	margin: 0 0 12px 0;
	padding-left: 18px;
	font-size: 12px;
	line-height: 1.6;
}

#info-tooltip li {
	margin-bottom: 6px;
}

#info-tooltip li:last-child {
	margin-bottom: 0;
}

#info-tooltip p:last-child {
	margin-bottom: 0;
}

/* Resize handle */
#resize-handle {
	position: absolute;
	top: 0;
	left: 0;
	width: 20px;
	height: 20px;
	cursor: nw-resize;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 16px 0 0 0;
	background: transparent;
	z-index: 10;
}

#resize-handle svg {
	width: 10px;
	height: 10px;
	stroke: #ccc;
	stroke-width: 1.5;
	transition: stroke 0.15s;
}

#resize-handle:hover svg,
#resize-handle:focus svg {
	stroke: #999;
}

#resize-handle:focus {
	outline: 2px solid #e30613;
	outline-offset: -2px;
}

#chat-window.is-resizing {
	user-select: none;
}

.webchat__modal-dialog__close-button-border {
	display: flex;
	align-items: center;
	justify-content: center;
}
