

.form-guard {
	position: relative;
	overflow: visible;
}

.form-guard__banner {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	z-index: 2;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	transform: translateY(calc(-100% - 10px));
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 0 14px;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
	background: #ff0004;
	color: #ffffff;
	border-radius: 12px;
	box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.251);
	transition:
		max-height 0.35s ease,
		opacity 0.35s ease,
		padding 0.35s ease,
		transform 0.35s ease;
}

.form-guard__banner.is-visible {
	max-height: 200px;
	opacity: 1;
	padding: 16px;
	pointer-events: auto;
}

.form-guard__banner-text {
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	flex: 1;
	min-width: 0;
}

.form-guard__banner-close {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	color: inherit;
	cursor: pointer;
	line-height: 0;
	transition: opacity 0.2s ease;
}

.form-guard__banner-close:hover {
	opacity: 0.85;
}

.form-guard__banner-close svg {
	display: block;
}

.form-guard button[type='submit'].form-guard__submit--idle {
	opacity: 0.65;
	cursor: not-allowed;
	transition:
		all 0.25s ease;
}

.form-guard button[type='submit']:not(.form-guard__submit--idle) {
	transition:
		all 0.25s ease;
}

.form-guard input.form-guard__field--error:not([type='hidden']) {
	border: 1px solid #ff0004 !important;
	outline-color: #ff0004 !important;
	color: #ff0004;
	transition:
		border-color 0.25s ease,
		outline-color 0.25s ease,
		color 0.25s ease;
}

.form-guard input.form-guard__field--error:not([type='hidden'])::placeholder {
	color: #ff0004;
	opacity: 1;
	transition: color 0.25s ease;
}

.form-guard input.form-guard__field--error:not([type='hidden'])::-webkit-input-placeholder {
	color: #ff0004;
	opacity: 1;
}

.form-guard .agreement__item--required.form-guard__checkbox--error input[type='checkbox'] + span {
	border: 1px solid #ff0004 !important;
	background-color: #ff0004 !important;
	transition:
		border-color 0.25s ease,
		background-color 0.25s ease;
}

.form-guard .main__checkbox.form-guard__checkbox--error .main__checkbox-checkmark {
	background-color: #ff0004 !important;
	border-color: #ff0004 !important;
}

/* фикс стилей для блока Кредит на ленде toyota-mkad */
.credit__feedback-form.js-form-guard .form-guard__banner {
	left: 55px;
	right: 55px;
	width: auto;
	max-width: none;
	top: 40px;
	transform: translateY(calc(-100% - 8px));
}

.credit__feedback-form.js-form-guard .form-guard__banner.is-visible {
	padding: 10px 12px;
	max-height: 160px;
}

@media (max-width: 768px) {
	.credit__feedback-form.js-form-guard .form-guard__banner {
		left: 20px;
		right: 20px;
		top: 20px;
		transform: translateY(calc(-100% - 8px));
	}

	.credit__feedback-form.js-form-guard .form-guard__banner.is-visible {
		padding: 8px 10px;
		max-height: 140px;
	}
}
