/* + Разметка чата */
.chatblocks {
	width: 100%;
	padding: 0 86px 0 106px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: stretch;
	gap: 16px;

	&._blocked {
		pointer-events: none;
	}
}

.chatblocks__item {
	width: 100%;
	display: flex;
	flex-direction: column;
}

.chatblockbody {
	display: flex;
	flex-direction: column;
	width: auto;
	padding: 12px;
	background-color: #f8f8f8;
	border-radius: 16px;
	gap: 16px;
}

.chatblocks__item--response {
	align-items: flex-start;
	padding-right: 40px;

	& > .chatblockbody {
		box-shadow: -2px 0 0 0 #bd0c1e;
	}
}

.chatblocks__item--request > .chatblockbody {
	width: auto;
	max-width: 85%;
	margin-left: auto;
}

@media screen and (max-width: 900px) {
	.chatblocks {
		padding: 0 16px;
	}

	.chatblocks__item--response {
		padding-right: 0;
	}

	.chatblocks__item--request > .chatblockbody {
		max-width: 100%;
	}
}
/* ~ Разметка чата */

/* + Общие стили чата */
.chatblocks b, .chatblocks strong {
	font-weight: bold;
}

.chatblocks p {
	line-height: normal;
	font-weight: 300;
}

.chatblocks .bold {
	font-weight: 500;
}

.chatblocks .mb-0 {
	margin-bottom: 0;
}

.chatblocks .mt-16 {
	margin-top: 16px;
}

.chatblocks a {
	text-decoration: none;
}

/* ~ Общие стили чата */


/* + Разметка текстового блока */
.chatblockbody__item--text {
	max-width: 600px;
}

.chatblockbody__item--text ol {
	padding-left: 20px;
	line-height: 1.31;
}

.chatblockbody__item--text > *:last-child {
	margin-bottom: 0;
}

/* ~ Разметка текстового блока */


/* + Разметка блока кнопок действий */
.chatblockbody__item--actionbuttons {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	justify-content: stretch;
	gap: 16px;
}

.chatblockbutton {
	flex-grow: 0;
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	gap: 8px;
	line-height: 1;
	padding: 16px 24px;
	border-radius: 16px;
	font-size: 16px;
	text-align: center;
	font-weight: 300;
	transition: all 0.3s ease;
}

.chatblockbutton--primary {
	border: solid 1px #bd0c1e;
	background-color: #bd0c1e;
	color: #fff;

	&:hover {
		border: solid 1px #000000;
		background-color: #000000;
		color: #fff;
	}
}

.chatblockbutton--secondary {
	border: solid 1px #ffffff;
	background-color: #ffffff;

	&:hover {
		border: solid 1px #000000;
	}
}

@media screen and (max-width: 900px) {
	.chatblockbody__item--actionbuttons {
		flex-direction: column;
		flex: 1 1 auto;
	}

	.chatblockbutton {
		width: 100%;
	}
}

/* ~ Разметка блока кнопок действий */


/* + Разметка блока кнопок тегов */
.chatblockbody__item--tags {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: stretch;
	gap: 8px;
}

.chatblocktag {
	flex-grow: 0;
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	gap: 16px;
	line-height: 1;
	padding: 16px;
	border-radius: 16px;
	font-size: 14px;
	text-align: center;
	font-weight: 300;
	transition: all 0.3s ease;
}

.chatblocktag--regular {
	color: #121217;
	background-color: #fff;
	border: 1px solid #fff;

	&:hover {
		box-shadow: 0 0 8px 0 rgba(157, 157, 157, 0.2);
	}
}

/* ~ Разметка блока кнопок тегов */


/* + Разметка блока кейсов */
.chatblockbody:has(.chatblockbody__item--cases) {
	width: 100%;
}

.chatblockbody__item--cases {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(315px, 315px));
	justify-content: start;
	gap: 16px;
	align-items: stretch;
}

.chatblockcase {
	display: flex;
	flex-direction: column;
	height: auto;
	gap: 4px;
	padding: 16px;
	border-radius: 16px;
	background-color: #fff;
	transition: all 0.3s ease;
	cursor: pointer;

	&:hover {
		box-shadow: 0 0 8px 0 rgba(157, 157, 157, 0.2);
	}
}

.chatblockcase__icon {
	margin-bottom: 8px;

	& img {
		width: 24px;
		height: 24px;
	}
}

.chatblockcase__title {
	margin-top: 4px;
	font-size: 12px;
	font-weight: 500;
	font-stretch: normal;
	font-style: normal;
	line-height: 1.33;
	letter-spacing: normal;
	text-align: left;
	color: #121217;
}

.chatblockcase__content {
	flex: 1;

	& > *:last-child {
		margin-bottom: 0;
	}
}

.chatblockcase__content p {
	font-size: 12px;
	font-weight: normal;
	font-stretch: normal;
	font-style: normal;
	line-height: 1.33;
	letter-spacing: normal;
	text-align: left;
	color: #626262;
}

.chatblockcase__footer {
	font-size: 12px;
	font-weight: normal;
	font-stretch: normal;
	font-style: normal;
	line-height: 1.33;
	letter-spacing: normal;
	text-align: left;
	color: #9d9d9d;
	padding-top: 8px;
	border-top: 1px solid #f2f2f2;
}

@media screen and (max-width: 900px) {
	.chatblockbody__item--cases {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}

}

/* ~ Разметка блока кнопок кейсов */


/* + Разметка блока виджетов */
.chatblockbody:has(.chatblockbody__item--widgets) {
	width: 100%;
}

.chatblockbody__item--widgets {
	width: 100%;
	padding: 0 16px;
}

.chatwidget {
	padding: 16px;
	border-radius: 16px;
	background-color: #fff;

	& > *:last-child {
		margin-bottom: 0;
	}
}

.chatwidget__title {
	font-size: 16px;
	line-height: 1.31;
	color: #121217;
	margin-bottom: 8px;
}

.chatwidget p {
	font-size: 14px;
}

@media screen and (max-width: 900px) {
	.chatblockbody__item--widgets {
		padding: 0;
	}
}
/* ~ Разметка блока виджетов */

/* + Разметка блока 2 колонок с равной высотой элементов в строке */
.chatwidget__columns {
	display: grid;
	width: 100%;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	justify-content: start;
	gap: 16px;
	align-items: stretch;
}

@media screen and (max-width: 900px) {
	.chatwidget__columns {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}

}

/* ~ Разметка блока 2 колонок с равной высотой элементов в строке  */


/* + Разметка виджет общий балл */
.chatwidgetoverall {
	border: solid 1px #ebebeb;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: stretch;
	gap: 24px;
}

.chatwidgetoverall__header {
	align-self: stretch;
	flex-grow: 0;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: flex-start;
	padding: 0;
}

.chatwidgetoverall__title {
	flex-grow: 0;
	font-size: 16px;
	font-weight: normal;
	font-stretch: normal;
	font-style: normal;
	line-height: 1.31;
	letter-spacing: normal;
	text-align: left;
	color: #121217;
}

.chatwidgetoverall__score {
	height: 28px;
	flex-grow: 0;
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	gap: 6px;
	padding: 0;
}

.chatwidgetoverall__earned {
	flex-grow: 0;
	font-size: 22px;
	font-weight: 900;
	font-stretch: normal;
	font-style: normal;
	line-height: 1;
	letter-spacing: normal;
	text-align: left;
	color: #121217;
}

.chatwidgetoverall__total {
	flex-grow: 0;
	font-size: 14px;
	font-weight: normal;
	font-stretch: normal;
	font-style: normal;
	line-height: 1.14;
	letter-spacing: normal;
	text-align: left;
	color: #9d9d9d;
}

.chatwidgetoverall__mark {
	width: 28px;
	height: 28px;
	margin-left: 3px;
	flex-grow: 0;

	& img {
		width: 28px;
		height: 28px;
	}
}

.chatwidgetoverall__gauges {
	column-gap: 32px;
	row-gap: 24px;
	padding-bottom: 8px;
}

@media screen and (max-width: 900px) {
	.chatwidgetoverall__header {
		flex-direction: column;
		gap: 8px;
	}

}

/* ~ Разметка виджет общий балл */


/* + Разметка шкал */
.chatwidgetgauge {
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: stretch;
	align-items: stretch;
}

.chatwidgetgauge__header {
	width: 100%;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	flex: 0 0 auto;
}

.chatwidgetgauge__title {
	font-size: 12px;
	font-weight: normal;
	font-stretch: normal;
	font-style: normal;
	line-height: 1.33;
	letter-spacing: normal;
	text-align: left;
	color: #9d9d9d;
}

.chatwidgetgauge__rate {
	font-size: 12px;
	font-weight: normal;
	font-stretch: normal;
	font-style: normal;
	line-height: 1.33;
	letter-spacing: normal;
	text-align: left;
	color: #121217;
}

.chatwidgetgauge__bar {
	width: 100%;
	height: 5px;
	border-radius: 33554400px;
	background-color: #f2f2f2;
	position: relative;
}

.chatwidgetgauge__ratebar {
	position: relative;
	top: 0;
	left: 0;
	height: 5px;
	width: 0;
	border-radius: 33554400px;
	background-color: #bd0c1e;
	transition: width 1.5s ease;
}
/* ~ Разметка шкал */

/* + Разметка оценок */
.chatwidgetgrade {
	width: 100%;
}

.chatwidgetgrade__title {
	position: relative;
	display: inline-block;

	& > img {
		position: absolute;
		top: 42%;
		transform: translateY(-50%);
		width: 16px;
		height: 16px;
	}

	& > span {
		display: inline-block;
		margin-left: 24px;
		font-size: 16px;
		line-height: 1.31;
	}
}

.chatwidgetgrade__items {
	list-style-type: disc;
	padding-left: 20px;
	line-height: 1.5;
	margin: 10px 0 0;
	font-size: 14px;
}

.chatwidgetgrade__items li p {
	margin-bottom: 0;
}

.chatwidgetgrade--nice {
	border: solid 1px #a6e8ba;
	background-color: #f7fdf9;
}

.chatwidgetgrade.chatwidgetgrade--nice * {
	color: #1a6b34;
}

.chatwidgetgrade--not-nice {
	border: solid 1px #fde3b8;
	background-color: #fff8f0;
}

.chatwidgetgrade.chatwidgetgrade--not-nice * {
	color: #7a4f10;
}
/* ~ Разметка оценок */

/* + Разметка шагов */
.chatwidget__nextsteps {
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: stretch;
	align-items: stretch;
	gap: 16px;
}

.chatwidgetstep {
	flex-grow: 0;
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	gap: 16px;
	padding: 16px;
	border-radius: 16px;
	background-color: #f8f8f8;
	cursor: pointer;
}

.chatwidgetstep__title {
	margin-top: 2px;
	font-size: 14px;
	line-height: 1.14;
	color: #121217;
}

.chatwidgetstep__caption {
	font-size: 12px;
	line-height: 1.33;
	color: #9d9d9d;
}
/* ~ Разметка шагов */

/* + Разметка вакансий */
.chatwidgetjob {
	display: flex;
	flex-direction: column;
	height: auto;
	gap: 4px;
}

.chatwidgetjob__header {
	font-size: 14px;
	font-weight: 500;
	color: #000;

	& span {
		position: relative;
		display: inline-block;
		margin-left: 10px;

		&:before {
			position: absolute;
			display: inline-block;
			content: "";
			width: 4px;
			height: 4px;
			left: -8px;
			background: url("/local/assets/img/case-trainer/job-header-divider.svg") no-repeat;
			top: 50%;
			transform: translateY(-50%);
		}

		&:first-child {
			margin-left: 0;

			&:before {
				width: 0;
				height: 0;
				background: unset;
			}
		}
	}
}

.chatwidgetjob__content {
	flex: 1;

	p {
		font-size: 12px;
		color: #a4a4a4;
	}
}

.chatwidgetjob__tags {
	width: 100%;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: stretch;
	gap: 8px;

	& li {
		font-size: 12px;
		line-height: 1;
		color: #121217;
		padding: 6px 8px;
		border-radius: 16px;
		border: solid 1px #f2f2f2;
		background-color: #fff;
	}
}

.chatwidgetjob__response {
	display: inline-block;
	font-size: 16px;
	font-weight: 300;
	line-height: 1;
	color: #fff;
	align-items: center;
	padding: 8px 16px;
	border-radius: 16px;
	border: none;
	background-color: #bd0c1e;
	transition: all 0.3s ease;

	&:hover {
		color: #fff;
		background-color: #000;
	}
}

@media screen and (max-width: 900px) {
	.chatwidgetjob {
		border: solid 1px #f2f2f2;
	}

	.chatwidgetjob__header span {
		position: unset;
		display: block;
		margin-left: 0;

		&:before {
			display: none;
		}

		&:last-child {
			color: #626262;
		}
	}
}
/* ~ Разметка вакансий */

@media screen and (min-width: 1200px) {
	/* История - START */
	.ai-chat-history {
		margin: 0;
		padding-bottom: 90px;
	}

	.ai-chat-history__close {
		left: unset;
		right: 24px;
		top: 24px;

		.ai-chat-history__close-desktop {
			display: block;
		}

		.ai-chat-history__close-mobile {
			display: none;
		}
	}

	.ai-chat-history__title {
		font-size: 14px;
	}

	.ai-chat-history__search-input {
		input {
			height: 48px;
		}
	}
	/* История - END */
}

.ct-chat-placeholder {
	width: 100%;
	max-width: 1260px;
	height: 922px;
	background: #FFFFFF;
	border-radius: 24px;
	box-shadow: 0 0 8px 0 rgba(157, 157, 157, 0.2);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 10;
}

.ct-chat {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: stretch;
	align-items: stretch;
	gap: 0;
}


/* + Разметка шапки чата */
.ct-chat__header {
	height: 77px;
	flex: 0 0 77px;
	box-shadow: 0 2px 2px 0 rgba(157, 157, 157, 0.1);
	background-color: #fff;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	border-top-left-radius: 24px;
	border-top-right-radius: 24px;
	border-bottom-left-radius: 16px;
	border-bottom-right-radius: 16px;
	padding: 0 24px;
	gap: 0;
}

.ct-chat__user {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	gap: 7px;

	& img {
		width: 38px;
		align-self: stretch;
		flex-grow: 0;
		object-fit: contain;
		border-radius: 2000px;
	}
}

.ct-chat__user-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: stretch;
	gap: 1px;
}

.ct-chat__user-name {
	flex-grow: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.31;
	color: #000;
}

.ct-chat__user-caption {
	flex-grow: 0;
	font-size: 14px;
	line-height: 1.14;
	color: #9d9d9d;
}

.ct-chat__controls {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	gap: 37px;
}

.ct-chat__control {
	display: inline-flex;
	align-items: center;
	border: none;
	background: none;
	gap: 4px;
	font-size: 14px;
	transition: all 0.2s ease;

	& span {
		display: inline-block;
		font-size: 14px;
		line-height: 1;
		font-weight: 300;
		margin-top: 3px;
		color: #9d9d9d;
	}
}

.ct-chat__control::before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	background-size: auto;
	background-repeat: no-repeat;
	background-position: center;
	flex-shrink: 0;
}

.ct-chat__control:active {
	transform: scale(0.98);
}

.ct-chat__control--history::before {
	background-image: url("/case-trainer/changellenge/images/cticon-history.svg");
}

[data-ct-chat="collapsed"] .ct-chat__control--expand::before {
	background-image: url("/case-trainer/changellenge/images/cticon-expand.svg");
}

[data-ct-chat="expanded"] .ct-chat__control--expand::before {
	background-image: url("/case-trainer/changellenge/images/cticon-collapse.svg");
}

@media screen and (max-width: 900px) {
	.ct-chat__controls {
		gap: 7px;
	}

	.ct-chat__control span {
		display: none;
	}
}
/* ~ Разметка шапки чата */

/* + Разметка контента чата */
.ct-chat__content {
	height: auto;
	flex: 1 1 auto;
	overflow-y: auto;
	overflow-x: hidden;
	font-family: "Factor A";
	font-size: 14px;
	padding: 48px 0 0;
	scrollbar-gutter: stable;
}

.ct-chat__content * {
	font-size: 14px;
}
/* ~ Разметка контента чата */


/* + Разметка футера чата */
.ct-chat__footer {
	position: relative;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 24px 106px;
	flex: 0 0 auto;
}

.ct-chat-input {
	flex-grow: 1;
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: 24px;
	box-shadow: 0 0 8px 0 rgba(157, 157, 157, 0.2);
	background-color: #fff;
}

.ct-chat-input__tune {
	display: inline-flex;
	align-items: center;
	border: none;
	background: none;
	transition: all 0.2s ease;
}

.ct-chat-input__tune::before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	background-image: url("/case-trainer/changellenge/images/cticon-tools.svg");
	background-size: auto;
	background-repeat: no-repeat;
	background-position: center;
	flex-shrink: 0;
}

.ct-chat-input__tune:active {
	transform: scale(0.98);
}

.ct-chat-input-prompt {
	flex-grow: 1;
	border: none;
	align-self: stretch;
	justify-self: stretch;

	&::placeholder {
		color: #9d9d9d;
	}
}

.ct-chat-send {
	display: inline-flex;
	align-items: center;
	border: none;
	background: none;
	padding: 0;
	transition: all 0.2s ease;
}

.ct-chat-send::before {
	content: "";
	display: inline-block;
	width: 32px;
	height: 32px;
	background-image: url("/case-trainer/changellenge/images/cticon-send.svg");
	background-size: auto;
	background-repeat: no-repeat;
	background-position: center;
	flex-shrink: 0;
}

.ct-chat-send:active {
	transform: scale(0.98);
}

.ct-chat-send:disabled {
	filter: grayscale(1);
	pointer-events: none;
}

.ct-chat-error {
	position: absolute;
	top: 100%;
	margin-top: -10px;
	left: 106px;
	z-index: 21;
	display: block;
	padding: 16px;
	border-radius: 8px;
	box-shadow: 0 0 8px 0 rgba(157, 157, 157, 0.2);
	background-color: #fff;
	font-size: 12px;
	line-height: 1.33;
	color: #121217;

	&:empty {
		display: none;
	}
}

.ct-chat__footer:has(.ct-chat-error:not(:empty)) .ct-chat-input {
	border: solid 1px #ff453a;
}

@media screen and (max-width: 900px) {
	.ct-chat__footer {
		padding: 16px;
	}

	.ct-chat-error {
		left: 16px;
		right: 60px;
	}
}

@media screen and (max-width: 480px) {
	.ct-chat-input-prompt {
		font-size: 12px;
	}
}
/* ~ Разметка футера чата */

/* + Стили чата открытого на весь экран */
body:has([data-ct-chat="expanded"]) {
	.ct-chat-placeholder {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100dvh;
		z-index: 9999;
		overflow: auto;
		background: white;
		max-width: unset;
	}

	& #bx-panel,
	& .ct-hero,
	& .ct-faq,
	& .desktop-menu-container,
	& .main-container.main-container--footer,
	& .mobile-menu__container,
	& .ct-decor {
		display: none!important;
	}

	& .ct-demo {
		background: none;
	}

	& .ct-chat-error {
		position: unset;
		margin-top: unset;
		width: 100%;
		flex-grow: 1;
		display: block;
		padding: 4px;
		box-shadow: unset;
		color: #ff453a;

		&:empty {
			display: none;
		}
	}
}
/* ~ Стили чата открытого на весь экран */

@media (max-width: 1280px) {
	.ct-chat-placeholder {
		width: 100%;
		max-width: 100%;
		height: 600px;
	}
}

@media (max-width: 480px) {
	.ct-chat-placeholder {
		position: relative;
		z-index: 10;
		height: 740px;
		background: #FFFFFF;
	}
}