.hd-ai-ask
{
	flex: 0 0 auto;
	margin-left: 10px;
	padding: 0 22px;
	background: #fff;
	border: 1px solid #2fc7f7;
	border-radius: 5px;
	color: #2fc7f7;
	font-family: inherit;
	font-size: 15px;
	line-height: 20px;
	white-space: nowrap;
	cursor: pointer;
}

.hd-ai-ask:hover
{
	background: #2fc7f7;
	color: #fff;
}

.hd-ai-overlay
{
	position: fixed;
	z-index: 1000;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(38, 38, 38, 0.55);
}

.hd-ai-overlay.active
{
	display: flex;
}

.hd-ai-chat
{
	display: flex;
	box-sizing: border-box;
	flex-direction: column;
	padding: 20px 24px 16px;
	width: 100%;
	max-width: 720px;
	max-height: 80vh;
	background: #fff;
	border-radius: 5px;
	box-shadow: 0 8px 32px rgba(38, 38, 38, 0.24);
	color: #262626;
	text-align: left;
}

.hd-ai-chat__head
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 14px;
	border-bottom: 1px solid #eef1f4;
}

.hd-ai-chat__title
{
	font-size: 18px;
	font-weight: 600;
	line-height: 24px;
}

.hd-ai-chat__close
{
	padding: 0 4px;
	background: none;
	border: none;
	color: #8b949c;
	font-size: 28px;
	line-height: 24px;
	cursor: pointer;
}

.hd-ai-chat__close:hover
{
	color: #262626;
}

.hd-ai-chat__thread
{
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 16px;
	padding-top: 16px;
	min-height: 0;
	overflow-y: auto;
}

.hd-ai-chat__ask
{
	display: flex;
	gap: 10px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #eef1f4;
}

.hd-ai-chat__input
{
	flex: 1;
	min-width: 0;
	padding: 11px 14px;
	background: #f7f9fa;
	border: 1px solid #dfe5ea;
	border-radius: 5px;
	outline: 0;
	color: #262626;
	font-family: inherit;
	font-size: 16px;
	line-height: 20px;
}

.hd-ai-chat__input:focus
{
	background: #fff;
	border-color: #2fc7f7;
}

.hd-ai-chat__send
{
	padding: 10px 28px;
	background: #2fc7f7;
	border: none;
	border-radius: 5px;
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	line-height: 20px;
	text-transform: uppercase;
	cursor: pointer;
}

.hd-ai-chat__send:hover
{
	background: #68ddff;
}

.hd-ai-chat__send.search__send-btn--inactive,
.hd-ai-chat__send:disabled
{
	background: #cfd8de;
	cursor: default;
}

.hd-ai-chat__disclaimer
{
	margin: 12px 0 0;
	color: #8b949c;
	font-size: 13px;
	line-height: 18px;
}

.hd-ai-chat__disclaimer a
{
	color: #8b949c;
	text-decoration: underline;
}

.hd-ai-chat .chat__message
{
	display: flex;
	margin: 0;
}

.hd-ai-chat .chat__message--user
{
	justify-content: flex-end;
}

.hd-ai-chat .chat__message--user .chat__message-content
{
	padding: 10px 16px;
	max-width: 80%;
	background: #eef7fb;
	border-radius: 5px;
}

.hd-ai-chat .chat__message--bot .chat__message-content
{
	max-width: 100%;
}

.hd-ai-chat .chat__message-text
{
	font-size: 16px;
	line-height: 24px;
	word-wrap: break-word;
}

.hd-ai-chat .chat__message-text p
{
	margin: 0 0 10px;
}

.hd-ai-chat .chat__message-text p:last-child
{
	margin-bottom: 0;
}

.hd-ai-chat .chat__message-text ul,
.hd-ai-chat .chat__message-text ol
{
	margin: 0 0 10px;
	padding-left: 22px;
}

.hd-ai-chat .chat__message-text li
{
	margin-bottom: 4px;
}

.hd-ai-chat .chat__message-text a
{
	color: #2fc7f7;
	text-decoration: none;
}

.hd-ai-chat .chat__message-text a:hover
{
	text-decoration: underline;
}

.hd-ai-chat .chat__message-text code
{
	padding: 1px 5px;
	background: #f2f5f7;
	border-radius: 3px;
	font-size: 14px;
}

.hd-ai-chat .chat__message-text pre
{
	padding: 12px 14px;
	overflow-x: auto;
	background: #f2f5f7;
	border-radius: 5px;
}

.hd-ai-chat .chat__message-text table
{
	border-collapse: collapse;
}

.hd-ai-chat .chat__message-text th,
.hd-ai-chat .chat__message-text td
{
	padding: 6px 10px;
	border: 1px solid #e6eaee;
}

.hd-ai-chat .chat__message-actions
{
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

.hd-ai-chat .chat__action-btn
{
	padding: 4px;
	background: none;
	border: none;
	opacity: 0.5;
	cursor: pointer;
}

.hd-ai-chat .chat__action-btn:hover,
.hd-ai-chat .chat__action-btn--active
{
	opacity: 1;
}

.hd-ai-chat .chat__typing-indicator
{
	display: flex;
	align-items: center;
	gap: 10px;
	color: #8b949c;
	font-size: 15px;
	line-height: 20px;
}

.hd-ai-chat .chat__typing-indicator::before
{
	content: '';
	width: 14px;
	height: 14px;
	border: 2px solid #d7e2e8;
	border-top-color: #2fc7f7;
	border-radius: 50%;
	animation: hd-ai-chat-spin 0.8s linear infinite;
}

.hd-ai-chat .chat__typing-animation
{
	display: none;
}

@keyframes hd-ai-chat-spin
{
	to
	{
		transform: rotate(360deg);
	}
}

@media (max-width: 560px)
{
	.hd-ai-search-form
	{
		flex-wrap: wrap;
	}

	.hd-ai-ask
	{
		flex: 1 0 100%;
		box-sizing: border-box;
		margin: 10px 0 0;
		padding: 10px 22px;
	}

	.hd-ai-overlay
	{
		padding: 0;
	}

	.hd-ai-chat
	{
		padding: 16px;
		max-height: 100%;
		height: 100%;
		border-radius: 0;
	}

	.hd-ai-chat__ask
	{
		flex-wrap: wrap;
	}

	.hd-ai-chat__input,
	.hd-ai-chat__send
	{
		flex: 1 0 100%;
	}
}
