.langtools {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: stretch;
	gap: 10px 14px;
	font-family: 'Scada';
	margin: 3px 10px 0 0;
}

.langtools__help,
.langtools__system,
.langtools__translate {
	display: flex;
	align-items: center;
	align-self: stretch;
	gap: 8px;
	min-height: 62px;
	box-sizing: border-box;
}

.langtools__translate {
	align-items: center;
}

/* Если у зарегистрированного пользователя остался только блок перевода */
.langtools__translate:only-child {
	min-height: 0 !important;
	height: auto !important;
	align-self: center;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.langtools__translate:only-child .gtranslate_wrapper {
	margin-top: 0 !important;
}

.langtools__help a {
	cursor: pointer;
	color: darkred;
	font-weight: bold;
	font-size: 1.25em;
	vertical-align: middle;
	white-space: nowrap;
}

.langswitch_label {
	font-weight: bold;
	color: #1c52af;
	font-size: 1.25em;
	white-space: nowrap;
}

.langswitch_form {
	display: inline-block;
	margin: 0;
}

.langswitch_flags {
	display: flex;
	gap: 6px;
}

.langswitch_flag {
	width: 34px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	padding: 0;
	box-shadow: none;
	outline: none !important;
}

.langswitch_flag:hover {
	background: #f7f7f7;
}

.langswitch_flag.is-active {
	border-color: #999;
	background: #f1f1f1;
}

.langswitch_flag:focus,
.langswitch_flag:active {
	outline: none !important;
	box-shadow: none !important;
}

.langswitch_flag::-moz-focus-inner {
	border: 0;
}

.langswitch_flag img {
	width: 16px;
	height: 16px;
	display: block;
}

/*** GTranslate ***/

.gtranslate_title {
	font-family: 'Scada';
	vertical-align: middle;
	display: inline-flex;
	align-items: center;
	font-size: 1.25em;
	color: darkgreen;
	font-weight: bold;
	margin-top: 0;
	white-space: nowrap;
	height: 28px;
}

.gtranslate_wrapper {
	display: inline-block;
	position: relative;
	overflow: visible !important;
	z-index: 10 !important;
}

.gtranslate_wrapper .gt_switcher {
	position: relative;
	overflow: visible !important;
	z-index: 10 !important;
}

.gtranslate_wrapper .gt_switcher .gt_selected {
	position: relative;
	z-index: 10 !important;
}

.gtranslate_wrapper .gt_switcher .gt_option {
	position: absolute !important;
	top: calc(100% - 1px);
	left: 0;
	z-index: 19 !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
}

.gtranslate_wrapper .gt_quick_flags {
	width: 163px;
	display: flex;
	gap: 6px;
	margin-top: 6px;
	position: relative;
	z-index: 9 !important;
}

.gtranslate_wrapper .gt_quick_flag {
	flex: 1;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	padding: 0;
	box-shadow: none;
	outline: none !important;
}

.gtranslate_wrapper .gt_quick_flag:hover {
	background: #f7f7f7;
}

.gtranslate_wrapper .gt_quick_flag.is-active {
	border-color: #999;
	background: #f1f1f1;
}

.gtranslate_wrapper .gt_quick_flag img {
	width: 16px;
	height: 16px;
	display: block;
}

.gtranslate_wrapper .gt_quick_flag:focus,
.gtranslate_wrapper .gt_quick_flag:active {
	outline: none !important;
	box-shadow: none !important;
}

.gtranslate_wrapper .gt_quick_flag::-moz-focus-inner {
	border: 0;
}

.gtranslate_wrapper .gt_search_wrap {
	position: sticky;
	top: 0;
	z-index: 2;
	background: #eee;
	padding: 4px;
	border-bottom: 1px solid #ccc;
}

.gtranslate_wrapper .gt_search {
	width: 100%;
	box-sizing: border-box;
	padding: 5px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	outline: none;
	box-shadow: none;
	background: #fff;
	font-size: 13px;
}

.gtranslate_wrapper .gt_search:focus {
	border-color: #bdbdbd;
	outline: none;
	box-shadow: none;
}

@media (max-width: 756px) {
	.header-tools-row {
		display: flex;
		flex-wrap: wrap;
		flex-direction: row !important;
		justify-content: center;
		align-items: flex-start;
		gap: 8px 10px;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	.langtools {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: flex-start;
		gap: 6px 10px;
		text-align: center;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		margin: 0 auto;
		box-sizing: border-box;
	}

	.langtools__help,
	.langtools__system,
	.langtools__translate {
		max-width: 100%;
		min-width: 0;
		min-height: auto;
		box-sizing: border-box;
	}

	.langtools__help {
		order: 1;
		flex: 0 1 auto;
	}

	.langtools__system {
		order: 2;
		flex: 0 1 auto;
		flex-wrap: wrap;
		justify-content: center;
	}

	.langtools__translate {
		order: 3;
		flex: 0 1 100%;
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 8px;
		flex-wrap: wrap;
		text-align: center;
	}

	/* Если у зарегистрированного остался только translate */
	.langtools__translate:only-child {
		flex: 0 1 100%;
		width: 100%;
		min-width: 0;
		justify-content: center;
		align-self: center;
	}

	.langtools__help a,
	.langswitch_label {
		white-space: normal;
		text-align: center;
	}

	/* У гостей title и виджет стараются идти в одну строку */
	.langtools__translate .gtranslate_title {
		margin-top: 0;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		white-space: nowrap;
		text-align: center;
		font-size: 1.05em;
		height: auto;
		max-width: 100%;
	}

	.langtools__translate .gtranslate_wrapper {
		display: inline-flex !important;
		align-items: flex-start;
		gap: 6px;
		flex-wrap: nowrap;
		max-width: 100%;
		min-width: 0;
	}

	.langtools__translate .gt_switcher {
		max-width: 100%;
	}

	.langtools__translate .gt_quick_flags {
		width: auto;
		margin-top: 0;
		display: flex;
		gap: 6px;
		position: relative;
		z-index: 9 !important;
		max-width: 100%;
	}

	.langtools__translate .gt_quick_flag {
		flex: 0 0 34px;
		width: 34px;
	}

	/* Чтобы dropdown не распирал экран */
	.langtools__translate .gt_switcher .gt_option {
		max-width: calc(100vw - 20px);
	}
}