/*
Floating contact widget.
*/

.floating-contact,
.floating-contact * {
	box-sizing: border-box;
}

.floating-contact {
	position: fixed;
	right: 34px;
	bottom: 270px;
	/*
	 * Должен быть выше шапки/синих плашек сайта.
	 * Если оставить 9998, выпадающая панель может попасть под sticky/header-слои.
	 */
	z-index: 10080;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
	font-family: inherit;
	isolation: isolate;
}

.floating-contact__panel {
	position: relative;
	z-index: 2;
	width: 186px;
	background: #ffffff;
	border: 1px solid rgba(7, 31, 99, 0.08);
	border-radius: 14px;
	box-shadow:
		0 18px 36px rgba(7, 31, 99, 0.16),
		0 6px 14px rgba(21, 27, 42, 0.08);
	overflow: hidden;
	opacity: 0;
	transform: translateY(10px) scale(0.98);
	transform-origin: right bottom;
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 0.18s ease,
		transform 0.18s ease,
		visibility 0.18s ease;
}

.floating-contact.is-open .floating-contact__panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	visibility: visible;
	pointer-events: auto;
}

.floating-contact__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.floating-contact__item {
	min-height: 66px;
	padding: 13px 18px 13px 24px;
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	color: rgba(21, 27, 42, 0.94);
	background: #ffffff;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.2;
	text-decoration: none;
	transition:
		background-color 0.18s ease,
		color 0.18s ease;
}

.floating-contact__item:hover,
.floating-contact__item:focus-visible {
	color: #071f63;
	background: #f6f9fd;
	text-decoration: none;
	outline: none;
}


/* Мягкое подкрашивание пунктов под цвет мессенджера */

.floating-contact__item--max:hover,
.floating-contact__item--max:focus-visible {
	color: #4b31c7;
	background: linear-gradient(90deg, rgba(106, 71, 255, 0.145), rgba(50, 199, 255, 0.085));
}

.floating-contact__item--telegram:hover,
.floating-contact__item--telegram:focus-visible {
	color: #1685b5;
	background: rgba(53, 174, 226, 0.095);
}

.floating-contact__item--whatsapp:hover,
.floating-contact__item--whatsapp:focus-visible {
	color: #118a42;
	background: rgba(24, 214, 91, 0.09);
}

.floating-contact__item--phone:hover,
.floating-contact__item--phone:focus-visible {
	color: #075f86;
	background: rgba(11, 150, 198, 0.08);
}

.floating-contact__list li + li .floating-contact__item {
	border-top: 1px solid rgba(21, 27, 42, 0.08);
}

.floating-contact__icon {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 11px;
	color: #ffffff;
	overflow: hidden;
}

.floating-contact__icon svg {
	width: 40px;
	height: 40px;
	display: block;
}


.floating-contact__icon img {
	width: 40px;
	height: 40px;
	display: block;
	object-fit: contain;
}


.floating-contact__item--max .floating-contact__icon,
.floating-contact__item--telegram .floating-contact__icon,
.floating-contact__item--whatsapp .floating-contact__icon {
	background: transparent;
}



.floating-contact__item--phone .floating-contact__icon {
	background: #0b96c6;
}

.floating-contact__item--phone .floating-contact__icon svg {
	width: 27px;
	height: 27px;
}

.floating-contact__label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.floating-contact__list .is-mobile-only {
	display: none;
}

.floating-contact__toggle {
	position: relative;
	z-index: 1;
	width: 85px;
	height: 85px;
	padding: 10px 8px 9px;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	color: #ffffff;
	background:
		radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.20) 0, rgba(255, 255, 255, 0) 35%),
		linear-gradient(135deg, #0b96c6 0%, #006ba1 100%);
	border: 0;
	border-radius: 50%;
	box-shadow:
		0 18px 34px rgba(7, 31, 99, 0.26),
		0 4px 12px rgba(7, 31, 99, 0.12),
		0 1px 0 rgba(255, 255, 255, 0.22) inset;
	cursor: pointer;
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease,
		background 0.18s ease;
}

.floating-contact__toggle:hover,
.floating-contact__toggle:focus-visible {
	color: #ffffff;
	background:
		radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.22) 0, rgba(255, 255, 255, 0) 35%),
		linear-gradient(135deg, #16a9d8 0%, #00679c 100%);
	box-shadow:
		0 22px 40px rgba(7, 31, 99, 0.30),
		0 6px 16px rgba(7, 31, 99, 0.15),
		0 1px 0 rgba(255, 255, 255, 0.26) inset;
	transform: translateY(-2px);
	outline: none;
}

.floating-contact__toggle:active {
	transform: translateY(0);
}

.floating-contact__toggle-icon {
	width: 30px;
	height: 25px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
}

.floating-contact__toggle-icon svg {
	width: 31px;
	height: 31px;
	display: block;
}


.floating-contact__toggle-icon img {
	width: 31px;
	height: 31px;
	display: block;
	object-fit: contain;
	filter: brightness(0) invert(1);
}


.floating-contact__toggle-text {
	display: block;
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.05;
	text-align: center;
}

@media (max-width: 768px) {
	.floating-contact {
		right: 18px;
		bottom: 150px;
		gap: 12px;
	}

	.floating-contact__panel {
		width: 184px;
		border-radius: 14px;
	}

	.floating-contact__item {
		min-height: 60px;
		padding: 11px 16px 11px 18px;
		grid-template-columns: 38px minmax(0, 1fr);
		gap: 12px;
		font-size: 16px;
	}

	.floating-contact__icon,
	.floating-contact__icon svg {
		width: 38px;
		height: 38px;
	}


	.floating-contact__icon img {
		width: 38px;
		height: 38px;
	}


	.floating-contact__list .is-mobile-only {
		display: list-item;
	}

	.floating-contact__toggle {
		width: 70px;
		height: 70px;
		padding: 8px 7px;
	}

	.floating-contact__toggle-icon {
		width: 25px;
		height: 22px;
	}

	.floating-contact__toggle-icon svg {
		width: 27px;
		height: 27px;
	}


	.floating-contact__toggle-icon img {
		width: 27px;
		height: 27px;
	}


	.floating-contact__toggle-text {
		font-size: 10px;
	}
}

@media (max-width: 420px) {
	.floating-contact {
		right: 14px;
		bottom: 216px;
	}

	.floating-contact__panel {
		width: 178px;
	}

	.floating-contact__item {
		font-size: 15px;
	}
}
