.itc-help {
	--itc-help-ink: #18181b;
	--itc-help-muted: #71717a;
	--itc-help-line: #e4e4e7;
	--itc-help-bg: #fff;
	--itc-help-soft: #f4f4f5;
	--itc-help-blue: #2aabee;
	--itc-help-blue-deep: #3390ec;
	--itc-help-out: #eeffde;
	--itc-help-wall: #8eacbd;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.itc-help .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

button.itc-help__launcher,
button.itc-help__launcher:hover,
button.itc-help__launcher:focus,
button.itc-help__launcher:active {
	all: unset;
	position: fixed;
	z-index: 99990;
	right: 20px;
	bottom: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--itc-help-blue);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(42, 171, 238, 0.38);
}

.itc-help.is-launcher-left button.itc-help__launcher,
.itc-help.is-launcher-left button.itc-help__launcher:hover,
.itc-help.is-launcher-left button.itc-help__launcher:focus,
.itc-help.is-launcher-left button.itc-help__launcher:active {
	right: auto;
	left: 20px;
}

.itc-help.is-launcher-left button.itc-help__launcher::after {
	content: "Чат поддержки";
	position: absolute;
	left: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%);
	padding: 6px 10px;
	border-radius: 8px;
	background: #18181b;
	color: #fff;
	font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.itc-help.is-launcher-left button.itc-help__launcher:hover::after,
.itc-help.is-launcher-left button.itc-help__launcher:focus-visible::after {
	opacity: 1;
}

.itc-help.is-open .itc-help__launcher {
	display: none;
}

html.itc-help-open {
	overflow: hidden;
}

.itc-help__launcher-icon {
	display: block;
}

.itc-help__drawer {
	position: fixed;
	z-index: 99998;
	inset: 0;
	visibility: hidden;
	pointer-events: none;
}

.itc-help.is-open .itc-help__drawer {
	visibility: visible;
	pointer-events: auto;
}

button.itc-help__backdrop,
button.itc-help__backdrop:hover,
button.itc-help__backdrop:focus,
button.itc-help__backdrop:active {
	all: unset;
	position: absolute;
	inset: 0;
	display: block;
	box-sizing: border-box;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(17, 17, 17, 0.35);
	box-shadow: none;
	opacity: 0;
	cursor: pointer;
	transition: opacity 0.28s ease;
}

.itc-help.is-open .itc-help__backdrop {
	opacity: 1;
}

.itc-help__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: min(420px, 100vw);
	background: #fff;
	color: #000;
	box-shadow: none;
	transform: translateX(calc(100% + 48px));
	transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.itc-help.is-open .itc-help__panel {
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.16);
	transform: translateX(0);
}

.itc-help.is-launcher-left .itc-help__panel {
	right: auto;
	left: 0;
	transform: translateX(calc(-100% - 48px));
}

.itc-help.is-launcher-left.is-open .itc-help__panel {
	box-shadow: 12px 0 40px rgba(0, 0, 0, 0.16);
	transform: translateX(0);
}

.itc-help__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 8px 10px 14px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	background: #fff;
}

.itc-help__avatar {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--itc-help-blue);
	color: #fff;
}

.itc-help__avatar-icon {
	display: block;
	width: 22px;
	height: 22px;
}

.itc-help__titles {
	flex: 1;
	min-width: 0;
}

.itc-help__head h2 {
	margin: 0;
	color: #222;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.2;
}

.itc-help__presence {
	margin: 2px 0 0;
	color: var(--itc-help-blue-deep);
	font-size: 13px;
	line-height: 1.2;
}

button.itc-help__close,
button.itc-help__close:hover,
button.itc-help__close:focus,
button.itc-help__close:active {
	all: unset;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: #8d9aa3;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

button.itc-help__close:hover,
button.itc-help__close:focus {
	background: #f4f4f5;
	color: #222;
}

.itc-help__sheet {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	background-color: var(--itc-help-wall);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.18)' stroke-width='1.4'%3E%3Ccircle cx='28' cy='36' r='10'/%3E%3Ccircle cx='124' cy='30' r='6'/%3E%3Cpath d='M78 20 l9 16 h-18 z'/%3E%3Crect x='34' y='108' width='16' height='16' rx='3'/%3E%3Cpath d='M142 110c10 0 10 16 0 16'/%3E%3Ccircle cx='96' cy='136' r='12'/%3E%3Cpath d='M148 64h16v12h-16z'/%3E%3C/g%3E%3C/svg%3E");
	background-size: 180px 180px;
}

.itc-help__log {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 14px 12px 8px;
	background: transparent;
}

.itc-help__empty,
.itc-help__day {
	display: table;
	margin: 8px auto 12px;
	padding: 5px 12px;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.22);
	color: #fff;
	font-size: 13px;
	line-height: 1.35;
	text-align: center;
}

.itc-help__bubble {
	display: flex;
	flex-direction: column;
	max-width: 86%;
	margin: 0 0 4px;
}

.itc-help__bubble.is-visitor {
	align-items: flex-end;
	margin-right: 6px;
	margin-left: auto;
}

.itc-help__bubble.is-agent {
	align-items: flex-start;
	max-width: 92%;
	margin-left: 6px;
}

.itc-help__line {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	max-width: 100%;
	min-width: 0;
}

.itc-help__bubble.is-agent .itc-help__text {
	flex: 1 1 auto;
	min-width: 0;
}

.itc-help__text {
	position: relative;
	display: inline-block;
	max-width: 100%;
	margin: 0;
	padding: 6px 9px 5px 10px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.13);
	font-size: 15px;
	line-height: 1.35;
}

.itc-help__body {
	white-space: pre-wrap;
	word-break: break-word;
}

.itc-help__bubble.is-agent .itc-help__body a {
	color: #3390ec;
	text-decoration: underline;
	word-break: break-all;
}

.itc-help__meta {
	float: right;
	position: relative;
	top: 4px;
	margin: 6px 0 0 10px;
	font-size: 11px;
	line-height: 1;
	white-space: nowrap;
}

.itc-help__ticks {
	margin-left: 3px;
	letter-spacing: -5px;
}

.itc-help__bubble.is-visitor .itc-help__text {
	background: var(--itc-help-out);
	color: #000;
	border-radius: 12px 12px 4px 12px;
}

.itc-help__bubble.is-visitor .itc-help__text::after {
	content: "";
	position: absolute;
	right: -6px;
	bottom: 0;
	border-width: 8px 0 0 8px;
	border-style: solid;
	border-color: transparent transparent transparent var(--itc-help-out);
}

.itc-help__bubble.is-visitor .itc-help__meta {
	color: #62a85a;
}

.itc-help__bubble.is-agent .itc-help__text {
	background: #fff;
	color: #000;
	border-radius: 12px 12px 12px 4px;
}

.itc-help__bubble.is-agent .itc-help__text::after {
	content: "";
	position: absolute;
	left: -6px;
	bottom: 0;
	border-width: 8px 8px 0 0;
	border-style: solid;
	border-color: transparent #fff transparent transparent;
}

.itc-help__bubble.is-agent .itc-help__meta {
	color: #8d9aa3;
}

.itc-help__notice {
	margin: 4px 2px 0;
	padding: 3px 8px;
	border-radius: 8px;
	background: rgba(180, 35, 24, 0.92);
	color: #fff;
	font-size: 12px;
	line-height: 1.3;
}

.itc-help__who-avatar {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--itc-help-blue);
}

.itc-help__who-avatar.is-letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}

.itc-help__who-name {
	display: block;
	margin: 0 0 2px;
	color: #3390ec;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
}

.itc-help__keys {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 6px;
	padding: 0 12px 10px;
	background: transparent;
}

.itc-help__keys[hidden] {
	display: none;
}

.itc-help__keys[data-busy] .itc-help__keys-panel {
	opacity: 0.6;
	pointer-events: none;
}

button.itc-help__keys-toggle,
button.itc-help__keys-toggle:hover,
button.itc-help__keys-toggle:focus,
button.itc-help__keys-toggle:active {
	all: unset;
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.28);
	color: #fff;
	font: inherit;
	font-size: 11px;
	line-height: 1.4;
	text-align: center;
	cursor: pointer;
}

.itc-help__keys-panel {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-height: 280px;
	overflow: hidden;
	opacity: 1;
	transform: translateY(0);
	transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.28s ease;
}

.itc-help__keys.is-collapsed .itc-help__keys-panel {
	max-height: 0;
	opacity: 0;
	transform: translateY(16px);
	pointer-events: none;
}

button.itc-help__key,
button.itc-help__key:hover,
button.itc-help__key:focus,
button.itc-help__key:active {
	all: unset;
	box-sizing: border-box;
	flex: 0 1 auto;
	max-width: 100%;
	padding: 5px 10px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
	color: #222;
	font: inherit;
	font-size: 12px;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
}

button.itc-help__key:hover,
button.itc-help__key:focus {
	background: #f7f7f7;
}

button.itc-help__key.is-nav {
	background: #fff;
	color: #3c434a;
}

.itc-help__form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 8px 10px 10px;
	border-top: 0;
	background: #fff;
}

.itc-help__field {
	flex: 1;
	min-width: 0;
	margin: 0;
}

.itc-help__input {
	display: block;
	width: 100%;
	box-sizing: border-box !important;
	height: 45px !important;
	min-height: 45px !important;
	max-height: 45px !important;
	margin: 0;
	padding: 10px 14px !important;
	border: 0;
	border-radius: 22px;
	background: #f0f2f5;
	color: #222;
	font: inherit;
	font-size: 16px;
	line-height: 25px !important;
	overflow-y: auto;
	resize: none !important;
}

.itc-help__input:focus {
	outline: 2px solid rgba(51, 144, 236, 0.35);
	outline-offset: 0;
}

button.itc-help__send,
button.itc-help__send:hover,
button.itc-help__send:focus,
button.itc-help__send:active {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--itc-help-blue-deep);
	color: #fff;
	cursor: pointer;
}

button.itc-help__send:hover,
button.itc-help__send:focus {
	background: #2b7fd4;
}

button.itc-help__send:disabled {
	opacity: 0.55;
	cursor: default;
}

button.itc-help__send svg {
	display: block;
	margin-left: 2px;
}

button.itc-help-open,
button.itc-help-open:hover,
button.itc-help-open:focus,
button.itc-help-open:active {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	max-width: 100%;
	color: #18181b;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	cursor: pointer;
	text-align: left;
}

.itc-help-open__stamp {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
}

.itc-help-open__ring,
.itc-help-open__mark {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.itc-help-open__ring {
	transform-origin: center;
}

button.itc-help-open:hover .itc-help-open__ring,
button.itc-help-open:focus-visible .itc-help-open__ring {
	animation: itc-help-ring 7s linear infinite;
}

@keyframes itc-help-ring {
	to {
		transform: rotate(360deg);
	}
}

.itc-help-open__copy {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.itc-help-open__kicker {
	color: #8d8d92;
	font-size: 8px;
	font-weight: 400;
	line-height: 1.2;
}

.itc-help-open__title {
	color: #18181b;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

@media (prefers-reduced-motion: reduce) {
	button.itc-help-open:hover .itc-help-open__ring,
	button.itc-help-open:focus-visible .itc-help-open__ring,
	.itc-help-card__stamp:hover .itc-help-card__ring {
		animation: none;
	}
}

button.itc-help-card,
button.itc-help-card:hover,
button.itc-help-card:focus,
button.itc-help-card:active {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	height: 100%;
	min-height: 108px;
	padding: 16px 14px 16px 18px;
	border: 1px solid var(--itc-border, #e4e4e7);
	border-radius: 20px;
	background: var(--itc-surface, #fff);
	box-shadow: var(--itc-shadow, 0 4px 16px rgba(24, 24, 27, 0.06));
	color: var(--itc-ink, #18181b);
	cursor: pointer;
	text-align: left;
}

.itc-help-card__copy {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.itc-help-card__kicker {
	color: var(--itc-muted, #71717a);
	font-size: 13px;
	line-height: 1.2;
}

.itc-help-card__title {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.15;
}

.itc-help-card__stamp {
	position: relative;
	flex: 0 0 auto;
	width: 92px;
	height: 92px;
	transform: rotate(-8deg);
	transform-origin: center;
}

.itc-help-card__ring,
.itc-help-card__mark {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.itc-help-card__ring {
	transform-origin: center;
}

.itc-help-card__stamp:hover .itc-help-card__ring {
	animation: itc-help-ring 7s linear infinite;
}

@media (max-width: 768px) {
	button.itc-help__launcher,
	button.itc-help__launcher:hover,
	button.itc-help__launcher:focus,
	button.itc-help__launcher:active {
		right: 12px;
		bottom: 12px;
		width: 40px;
		height: 40px;
	}

	.itc-help.is-launcher-left button.itc-help__launcher,
	.itc-help.is-launcher-left button.itc-help__launcher:hover,
	.itc-help.is-launcher-left button.itc-help__launcher:focus,
	.itc-help.is-launcher-left button.itc-help__launcher:active {
		right: auto;
		left: 12px;
	}

	.itc-help__launcher-icon {
		width: 20px;
		height: 20px;
	}

	.itc-help__panel {
		right: 12px;
		width: calc(100vw - 12px);
	}

	.itc-help.is-launcher-left .itc-help__panel {
		right: auto;
		left: 0;
		width: calc(100vw - 12px);
	}

	.itc-help-open__kicker {
		font-size: 10px;
	}

	#itc-help-title {
		font-size: 14px;
	}

	.itc-help__input {
		height: auto !important;
		min-height: 36px !important;
		max-height: 300px !important;
		padding: 8px 15px !important;
		line-height: 20px !important;
		overflow-y: hidden;
	}
}

@media print {
	.itc-help {
		display: none !important;
	}
}
