/* Общие */

.form  {
	display: flex;
	flex-direction: column;
	gap: 45px;
	margin-bottom: 120px;
}

.form__top {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.form__subtitle {
	font-weight: 400;
	font-size: 22px;
	line-height: 150%;
	color: var(--brand100);
	margin: 0;
}

.form-body input,
.form-body textarea{
	border: 1px solid var(--brand300);
	padding: 12px 16px;
	border-radius: 12px;
	font-weight: 400;
	font-size: 16px;
	line-height: 150%;
	color: var(--text);
	box-sizing: border-box;
	width: 100%;
	position: relative;
	transition: background-color 0.3s ease;
}

.container-input-form {
	padding: 24px;
	border-radius: 12px;
	background-color: var(--brand300);
	display: flex;
	gap: 24px;
	flex-direction: column;
}

.container-input-5 {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.container-input-4 {
	display: flex;
	gap: 24px;
	flex-direction: column;
}

.container-input-2 {
	display: flex;
	gap: 24px;
}

.box__acceptance {
	margin-top: 4px;
}

.form-body input::placeholder,
.form-body textarea::placeholder {
	font-weight: 400;
	font-family: 'Onest';
	font-size: 16px;
	line-height: 150%;
	color: #999;
	opacity: 1; 
	color: var(--brand178);
}

/* Более специфичный селектор */
.box-textarea textarea::placeholder {
	font-weight: 400;
	font-family: 'Onest';
	font-size: 16px;
	line-height: 150%;
	color: #999;
	opacity: 1;
}

.container-input-5 input, 
.box-textarea textarea {
	font-weight: 400;
	font-family: 'Onest';
	font-size: 16px;
}


.form-body input.tel {
	color: #999;
}


.form-body input.tel {
	caret-color: #999;
}

.form-body input:focus-visible,
.form-body textarea:focus-visible {
	outline: none;
	outline-offset: none;
}

.form-body textarea {
	min-height: 234px;
	max-height: 400px;
	height: 234px;
	resize: vertical;
}

.form-body p {
	margin: 0;
}

.form__map {
	min-height: 624px;
	overflow: hidden;
	border-radius: 12px;
	position: relative;
	height: fit-content;
}

.form__map > div {
	min-height: 624px;
}

.box__text,
.box__text span{
	font-weight: 500;
	font-size: 16px;
	line-height: 150%;
	color: var(--brand100);
	margin: 0;
}

.box__text span {
	color: var(--brand200);
}

.form-body {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.form_botton {
	display: flex;
	flex-direction: column;
	gap: 12px;
}


.box-subtitle {
	font-weight: 500;
	font-size: 12px;
	line-height: 20px;
	color: var(--brand200);
	background-color: var(--brand-alpha200);
	padding: 3px 10px;
	border-radius: 4px;
	width: fit-content;
}

.wpcf7-spinner {
	display: none !important;
}

.box__btn .btn.btn-1 {
	color: var(--white);
	transition: .3s linear;
	border: 2px solid var(--brand100);
}

.box__btn .btn.btn-1:hover{
	border: 2px solid var(--brand100);
	background-color: var(--white);
	color: var(--brand100);
}


.box__acceptance input[type="checkbox"] {
	position: absolute;
	opacity: 0;
}

.box__acceptance .wpcf7-list-item-label {
	position: relative;
	padding-left: 35px;
	cursor: pointer;
	display: inline-block;
	font-weight: 400;
	font-size: 12px;
	line-height: 150%;
	color: var(--brand100);
	max-width: 480px;
}

.box__acceptance .wpcf7-list-item-label a {
	text-decoration: underline;
	color: var(--brand100);
}

.box__acceptance .wpcf7-list-item-label::before {
	content: '';
	position: absolute;
	left: 0;
	top: 8px;
	width: 20px;
	height: 20px;
	border: 1px solid var(--brand300);
	border-radius: 4px;
	background: #ffffff00;
	transition: all 0.2s ease;
}

.box__acceptance .wpcf7-list-item-label::after {
	content: '';
	position: absolute;
	left: 9px;
	top: 11px;
	width: 4px;
	height: 10px;
	border: solid var(--brand100);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform 0.2s ease;
}

.box__acceptance input[type="checkbox"]:checked + .wpcf7-list-item-label::after {
	transform: rotate(45deg) scale(1);
}

.form-body .wpcf7-list-item {
	margin: 0;
}

.form-body .wpcf7-list-item > label {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 20px;
}

.box__btn .btn::before{
	content: "";
	width: 20px;
	display: block;
	height: 18px;
	background-color: var(--white);
} 

.route-button {
	position: absolute;
	bottom: 40px;
	left: calc(50% - 92px);
	padding: 16px 24px;
	background: var(--white);
	color: var(--brand100);
	border: 2px solid var(--brand400);
	border-radius: 12px;
	cursor: pointer;
	font-size: 16px;
	z-index: 2;
	transition: background-color 0.3s ease;
	transition: .3s linear;
	font-family: 'Onest';
}


.route-button:hover{
	border: 2px solid var(--brand200);
	background-color: var(--brand200);
	color: var(--white);
}

/* Карта справа */

.form--map-right .form__container {
	display: flex;
	gap: 32px;
}

.form--map-right .form__box,
.form--map-right .form__map{
	max-width: 50%;
	width: 100%;
}

.form--map-right .form__map {
	display: flex;
}

/* Карта снизу */

.form--map-bottom .form__map > div {
	min-height: 624px;
}

.form--map-bottom .form__container {
	display: flex;
	gap: 24px;
	flex-direction: column;
}

.form--map-bottom .form-body textarea {
	min-height: 198px;
	max-height: 400px;
	height: 198px;
	resize: vertical;
}

.form--map-bottom  .container-input-5,
.form--map-bottom .box-textarea{
	width: 50%;
}

.container-input-2 p,
.container-input-2 div{
	width: 100%;
}

.form--map-bottom .container-input-form {
	flex-direction: row;
}

/* сообщение об ошибки с анимацией */

.wpcf7-not-valid-tip {
	color: var(--brand250);
	font-size: 16px;
	font-weight: normal;
	display: block;
	position: absolute;
	top: -13px;
	right: 0px;
	padding: 0 10px;
	height: 48px;
	border-radius: 12px;
	background-color: var(--brand200);
	font-weight: 400;
	line-height: 150%;
	display: flex;
	gap: 10px;
	max-width: 180px;
	align-items: center;
	transform: translateX(100%);
	opacity: 0;
	transition: transform 0.4s ease-out, opacity 0.3s ease-out;
	overflow: hidden;
	z-index: 1;
}

.wpcf7-not-valid-tip.show-error {
	transform: translateX(0);
	opacity: 1;
}

.wpcf7-not-valid-tip.hiding {
	transform: translateX(100%);
	opacity: 0;
	transition: transform 0.35s ease-in, opacity 0.25s ease-in;
}

.wpcf7-not-valid-tip::before{
	content: "";
	-webkit-mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='9' height='17' viewBox='0 0 9 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8.25 0.75L0.75 8.25L8.25 15.75' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
	mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='9' height='17' viewBox='0 0 9 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8.25 0.75L0.75 8.25L8.25 15.75' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
	-webkit-mask-repeat: no-repeat;
	background-color: var(--brand250);
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: 9px 17px;
	mask-size: 9px 17px;
	width: 20px;
	height: 20px;
	display: block;
	background-size: 20px;
}

.container-input-form input.wpcf7-not-valid {
	border-color: var(--brand200);
	background-color: var(--brand-alpha200);
}

.container-input-form input.wpcf7-not-valid::placeholder {
	color: var(--brand200);
}

.box-name,
.box-company-name,
.box-INN,
.box-tel,
.box-mail {
	overflow: hidden;
	border-radius: 12px;
}

/* Задержка для последовательного появления ошибок */
.wpcf7-not-valid-tip:nth-child(1) { transition-delay: 0.05s; }
.wpcf7-not-valid-tip:nth-child(2) { transition-delay: 0.1s; }
.wpcf7-not-valid-tip:nth-child(3) { transition-delay: 0.15s; }
.wpcf7-not-valid-tip:nth-child(4) { transition-delay: 0.2s; }
.wpcf7-not-valid-tip:nth-child(5) { transition-delay: 0.25s; }
.wpcf7-not-valid-tip:nth-child(6) { transition-delay: 0.3s; }
.wpcf7-not-valid-tip:nth-child(7) { transition-delay: 0.35s; }
.wpcf7-not-valid-tip:nth-child(8) { transition-delay: 0.4s; }

/* Когда скрываем - обратный порядок */
.wpcf7-not-valid-tip.hiding:nth-child(1) { transition-delay: 0.05s; }
.wpcf7-not-valid-tip.hiding:nth-child(2) { transition-delay: 0.1s; }
.wpcf7-not-valid-tip.hiding:nth-child(3) { transition-delay: 0.15s; }
.wpcf7-not-valid-tip.hiding:nth-child(4) { transition-delay: 0.2s; }
.wpcf7-not-valid-tip.hiding:nth-child(5) { transition-delay: 0.25s; }
.wpcf7-not-valid-tip.hiding:nth-child(6) { transition-delay: 0.3s; }
.wpcf7-not-valid-tip.hiding:nth-child(7) { transition-delay: 0.35s; }
.wpcf7-not-valid-tip.hiding:nth-child(8) { transition-delay: 0.4s; }

.cart-notifications-container {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 9999;
	max-width: 350px;
}

.cart-notification {
	padding: 15px 20px;
	margin-bottom: 10px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	animation: cartNotificationSlideIn 0.3s ease;
	color: white;
	font-size: 14px;
	line-height: 1.4;
}

.cart-notification-success {
	background-color: var(--brand200, #4CAF50); 
}

.cart-notification-error {
	background-color: #bb0000;
}

.cart-notification-icon {
	margin-right: 10px;
	font-size: 16px;
	font-weight: bold;
	flex-shrink: 0;
}

.cart-notification-message {
	flex-grow: 1;
	margin-right: 10px;
}

.cart-notification-close {
	background: none;
	border: none;
	color: white;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	padding: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s ease;
	flex-shrink: 0;
}

.cart-notification-close:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

@keyframes cartNotificationSlideIn {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

.wpcf7-response-output {
	display: none !important;
}

@media(max-width: 1240px) {
	/* Карта справа */

	.form--map-right .form__container {
		flex-direction: column;
	}

	.form--map-right .form__box,
	.form--map-right .form__map {
		max-width: 100%;
	}

	#yandex-map {
		min-height: 624px;
	}

	.route-button {
		bottom: 20px;
	}
}

@media(max-width: 768px) {
	/* общие */

	.form__subtitle {
		font-size: 18px;
	}

	.form {
		gap:32px;
		margin-bottom: 70px;
	}

	.cart-notifications-container {
		right: 10px;
		left: 10px;
		max-width: none;
	}

	.cart-notification {
		padding: 12px 16px;
		font-size: 13px;
	}

	.container-input-2 {
		flex-direction: column;
	}

	.container-input-form {
		padding: 12px;
	}

	.container-input-5,
	.container-input-4,
	.container-input-2,
	.container-input-form{
		gap: 12px;
	}

	/* карта справа	 */

	.form--map-right .box-subtitle {
		display: none;
	}

	/* Карта снизу */

	.form--map-bottom .container-input-form {
		flex-direction: column;
	}

	.form--map-bottom .container-input-5,
	.form--map-bottom .box-textarea {
		width: 100%;
	}

	.home-page .form__container {
		padding: 0 !important;
	}

	.home-page .form__container .form__box{
		padding: 15px 15px 0 15px;
		box-sizing: border-box;
	}

	.home-page .form__container .form__map {
		box-sizing: border-box;
		width: 100%;

	}

	.home-page .form__container {
		border-radius: 12px 12px 0 0 !important;
	}

	.home-page .form .form__map {
		margin-left: 0;
	}
}

@media(max-width: 500px) {
	/* общие */

	.form {
		margin-bottom: 50px;
		gap: 24px;
	}

	.form__subtitle {
		font-size: 16px;
	}

	.form__top {
		gap: 16px;
	}

	.form .form__map {
		border-radius: 0;
		margin-left: -16px;
		width: calc(100% + 32px);
		max-width: calc(100% + 32px);
	}

	.route-button {
		bottom: 12px;
	}

	/* сообщения об ошибках	 */

	.wpcf7-not-valid-tip {
		position: relative;
		max-width: 100%;
		border-radius: 0;
		border-bottom-left-radius: 12px;
		border-bottom-right-radius: 12px;
		justify-content: center;
		top: -10px;
		transform: translateY(-20px);
		opacity: 0;
		height: 45px;
		transition: transform 0.4s ease-out, opacity 0.3s ease-out;
	}

	.container-input-form input.wpcf7-not-valid {
		border-bottom-left-radius: 0px;
		border-bottom-right-radius: 0px;
	}


	.wpcf7-not-valid-tip.show-error {
		transform: translateY(0);
		opacity: 1;
	}

	.wpcf7-not-valid-tip.hiding {
		transform: translateY(-20px);
		opacity: 0;
		transition: transform 0.35s ease-in, opacity 0.25s ease-in;
	}

	.wpcf7-not-valid-tip::before {
		display: none;
	}

	/* Карта справа */

	.form--map-right .form-body {
		gap: 16px;
	}

	.form--map-right .form__map > div{
		min-height: 490px;
	}

	#yandex-map,
	.form__map{
		min-height: 490px;
	}

	/* Карта снизу */

	.form--map-bottom .form-body textarea {
		height: 170px;
		max-height: 250px;
		min-height: 170px;
	}
}


/* Для главной страницы  */

.home-page .form__container {
	background: #00000040;
	backdrop-filter: blur(16px);
	border: 0px solid rgb(197 197 197 / 15%);
	padding: 24px;
	border-radius: 12px;
	box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.3), inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}

.home-page .container-input-5 input, 
.home-page .box-textarea textarea{
	background-color: #00000040;
	border-color: rgb(197 197 197 / 15%);
	color: var(--white);
}


.home-page  .container-input-form {
	padding: 0px; 
	background-color: initial;
}

.home-page .box__acceptance .wpcf7-list-item-label::before {
	border: 1px solid var(--brand100);
}

.home-page .form-body input::placeholder,
.home-page .form-body textarea::placeholder {
	color: var(--white);
}

/* Более специфичный селектор */
.home-page .box-textarea textarea::placeholder {
	color: var(--white);

}

/* Ваши существующие стили для placeholder */
.home-page .form-body input::placeholder,
.home-page .form-body textarea::placeholder {
	color: var(--white);
}

/* Стили для маскированного поля телефона */
.home-page .form-body input.tel {
	color: var(--white);
}

/* Если IMask создает отдельный элемент для плейсхолдера */
.home-page .form-body input.tel {
	caret-color: var(--white);
}

.home-page .form-body textarea {
	min-height: 282px;
	height: 282px;
}

