/**
 * /franshiza/ — плавающий виджет (fr-float), стили с /partners/.
 */

.fr-float {
	position: fixed;
	z-index: 9999;
	right: 24px;
	bottom: 24px;
	font-family: var(--ff, "Manrope", sans-serif);
	-webkit-font-smoothing: antialiased;
}

@supports (padding: env(safe-area-inset-bottom)) {
	.fr-float {
		bottom: calc(24px + env(safe-area-inset-bottom));
	}
}

@media (max-width: 767px) {
	.fr-float {
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom));
		left: auto;
		transform: none;
	}

	#fr-float-franshiza.fr-float {
		left: 12px;
		right: 12px;
	}

	#fr-float-franshiza .fr-float__closed-mobile {
		width: 100%;
		max-width: none;
	}

	#fr-float-franshiza[data-state="open"] .fr-float__open {
		width: 100%;
		max-width: none;
	}
}

.fr-float * {
	box-sizing: border-box;
}

.fr-float__open,
.fr-float__closed-desktop,
.fr-float__closed-mobile,
.fr-float__mini {
	display: none;
}

.fr-float[data-state="open"] .fr-float__open {
	display: block;
}

.fr-float[data-state="closed"] .fr-float__closed-desktop {
	display: block;
}

.fr-float[data-state="closed"] .fr-float__closed-mobile {
	display: none;
}

@media (max-width: 767px) {
	.fr-float[data-state="closed"] .fr-float__closed-desktop {
		display: none;
	}

	.fr-float[data-state="closed"] .fr-float__closed-mobile {
		display: flex;
	}
}

.fr-float[data-state="mini"] .fr-float__mini {
	display: block;
}

@keyframes frShine {
	0% {
		transform: translateX(-160%) skewX(-18deg);
		opacity: 0;
	}
	10% {
		opacity: 0.9;
	}
	50% {
		opacity: 0.9;
	}
	100% {
		transform: translateX(260%) skewX(-18deg);
		opacity: 0;
	}
}

.fr-float__open-inner,
.fr-float__closed-desktop,
.fr-float__closed-mobile,
.fr-float__mini {
	position: relative;
}

.fr-float__open-inner::after,
.fr-float__closed-desktop::after,
.fr-float__closed-mobile::after,
.fr-float__mini::after {
	content: "";
	position: absolute;
	top: -35%;
	left: -60%;
	width: 45%;
	height: 170%;
	background: linear-gradient(
		120deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.12) 38%,
		rgba(255, 255, 255, 0.55) 50%,
		rgba(255, 255, 255, 0.12) 62%,
		rgba(255, 255, 255, 0) 100%
	);
	pointer-events: none;
	animation: frShine 3.2s ease-in-out infinite;
	mix-blend-mode: screen;
	z-index: 5;
}

.fr-float__open-inner::after {
	opacity: 0.35;
}

.fr-float__open {
	width: 354px;
	max-width: calc(100vw - 32px);
	position: relative;
	background: transparent;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.fr-float__open-inner {
	border-radius: 30px;
	overflow: hidden;
	background: #fff;
}

.fr-float__open-top {
	height: 210px;
	background: url(/wp-content/themes/theme/franch/assets/img/fr-banner-main.png) center/cover no-repeat;
}

.fr-float__open-body {
	padding: 22px 22px 24px;
}

.fr-float__open-title {
	font-weight: 700;
	font-size: 24px;
	line-height: 1.3;
	color: #1a1a1a;
	margin: 0 0 10px;
}

.fr-float__open-text {
	font-size: 13px;
	line-height: 1.4;
	color: rgba(0, 0, 0, 0.55);
	margin: 0 0 16px;
}

.fr-float .fr-float__open-btn.btn,
.fr-float .fr-float__open-btn.btn__green {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 52px;
	border-radius: 100px;
	text-decoration: none;
	padding: 0 16px !important;
	white-space: normal;
	text-align: center;
	line-height: 1.25;
	font-weight: 700;
	font-size: 16px;
	color: #fff;
	background: #208d79;
	border: 0;
	cursor: pointer;
}

.fr-float__open-close {
	position: absolute;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	right: -12px;
	top: -12px;
	border: 0;
	cursor: pointer;
	background: #fff;
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
	z-index: 30;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fr-float__open-close:hover {
	transform: scale(1.05);
	box-shadow: 0 14px 26px rgba(0, 0, 0, 0.16);
}

.fr-float__open-close::before,
.fr-float__open-close::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 16px;
	height: 2px;
	background: rgba(0, 0, 0, 0.55);
}

.fr-float__open-close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.fr-float__open-close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.fr-float__closed-desktop {
	width: 350px;
	height: 190px;
	border-radius: 20px;
	position: relative;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
	overflow: hidden;
	color: #fff;
	background: url(/wp-content/themes/theme/franch/assets/img/fr-banner-main.png) center/cover no-repeat;
}

.fr-float__desk-text {
	position: absolute;
	z-index: 10;
	top: 16px;
	left: 17px;
	right: 58px;
	font-weight: 800;
	font-size: 15px;
	line-height: 1.4;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.fr-float .fr-float__desk-btn.btn,
.fr-float .fr-float__desk-btn.btn__green {
	position: absolute !important;
	z-index: 10;
	left: 17px !important;
	right: 21px !important;
	bottom: 21px !important;
	width: auto !important;
	height: 45px !important;
	border-radius: 100px !important;
	border: 0 !important;
	cursor: pointer;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 16px !important;
	margin: 0 !important;
	white-space: normal;
	text-align: center;
	line-height: 1.2;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: #208d79;
}

.fr-float__closed-mobile {
	width: 366px;
	max-width: calc(100vw - 24px);
	height: 70px;
	border-radius: 10px;
	position: relative;
	padding: 12px 60px 12px 12px;
	align-items: center;
	box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
	overflow: hidden;
	color: #fff;
	background: url(/wp-content/themes/theme/franch/assets/img/fr-banner-main.png) center/cover no-repeat;
}

.fr-float__bar-text {
	position: relative;
	z-index: 10;
	font-weight: 800;
	font-size: 14px;
	line-height: 1.4;
	letter-spacing: -0.01em;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.fr-float__bar-up {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	background: #30ad96;
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
	z-index: 15;
	transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.fr-float__bar-up:hover {
	transform: translateY(-50%) scale(1.05);
	filter: brightness(1.05);
	box-shadow: 0 16px 28px rgba(0, 0, 0, 0.2);
}

.fr-float__bar-up:active {
	transform: translateY(-50%) scale(0.98);
}

.fr-float__bar-up::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 10px;
	height: 10px;
	border-left: 2px solid #fff;
	border-top: 2px solid #fff;
	transform: translate(-50%, -35%) rotate(45deg);
}

.fr-float__mini {
	width: 130px;
	height: 130px;
	border-radius: 16px;
	border: 0;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	padding: 0;
	color: #fff;
	background: url(/wp-content/themes/theme/franch/assets/img/fr-banner-main.png) center/cover no-repeat;
	box-shadow: 1px 2px 20px rgba(0, 0, 0, 0.1), 0 15px 10px -15px rgba(0, 0, 0, 0.1);
}

.fr-float__mini-text {
	position: absolute;
	top: 10px;
	left: 14px;
	right: 14px;
	z-index: 10;
	font-weight: 800;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.fr-float__mini-handle {
	position: absolute;
	width: 124px;
	height: 124px;
	left: 50%;
	top: 102px;
	transform: translateX(-50%);
	border-radius: 1000px;
	background: #30ad96;
	z-index: 9;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 18px;
}

.fr-float__mini-arrow {
	width: 10.56px;
	height: 10.56px;
	transform: rotate(45deg);
	border-left: 2px solid #fff;
	border-top: 2px solid #fff;
}

.fr-float.fr-float--hidden {
	display: none !important;
}

/* Показ только после первого экрана (hero) */
.franshiza-float-scroll-marker {
	block-size: 1px;
	inline-size: 1px;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: hidden;
}

.fr-float.fr-float--after-hero {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fr-float.fr-float--after-hero.fr-float--scroll-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
