/* Float Chat Widget
   ========================================================== */

.fc-wrap {
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

.fc-pos-left  { align-items: flex-start; }
.fc-pos-right { align-items: flex-end; }

.fc-dir-up   .fc-list    { order: 1; margin-bottom: 12px; }
.fc-wrap                 .fc-trigger { order: 2; }
.fc-dir-down .fc-list    { order: 3; margin-top: 12px; }

.fc-list {
	display: flex;
	flex-direction: column;
	pointer-events: none;
}

.fc-item {
	display: flex;
	align-items: center;
	gap: 10px;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px) scale(0.92);
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}

.fc-pos-right .fc-item { flex-direction: row-reverse; }
.fc-pos-left  .fc-item { flex-direction: row; }

.fc-wrap.fc-open .fc-item { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }

.fc-wrap.fc-open .fc-item:nth-child(1) { transition-delay: 0.00s; }
.fc-wrap.fc-open .fc-item:nth-child(2) { transition-delay: 0.05s; }
.fc-wrap.fc-open .fc-item:nth-child(3) { transition-delay: 0.10s; }
.fc-wrap.fc-open .fc-item:nth-child(4) { transition-delay: 0.15s; }
.fc-wrap.fc-open .fc-item:nth-child(5) { transition-delay: 0.20s; }
.fc-wrap.fc-open .fc-item:nth-child(6) { transition-delay: 0.25s; }
.fc-wrap.fc-open .fc-item:nth-child(7) { transition-delay: 0.30s; }
.fc-wrap.fc-open .fc-item:nth-child(8) { transition-delay: 0.35s; }

.fc-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	text-decoration: none;
	box-shadow: 0 3px 10px rgba(0,0,0,.2);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	line-height: 1;
}

.fc-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 5px 16px rgba(0,0,0,.28);
	text-decoration: none;
}

.fc-btn i,
.fc-btn svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
	line-height: 1;
}

.fc-label {
	pointer-events: none;
	line-height: 1.5;
	display: inline-block;
}

.fc-trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 18px;
	border: none;
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0 4px 14px rgba(0,0,0,.25);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	outline: none;
	overflow: visible;
	line-height: 1;
}

.fc-trigger:focus-visible {
	outline: 3px solid rgba(255,255,255,.5);
	outline-offset: 2px;
}

.fc-trigger i,
.fc-trigger svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
	line-height: 1;
}

.fc-icon-open  { display: none;  align-items: center; justify-content: center; }
.fc-icon-closed{ display: flex;  align-items: center; justify-content: center; }
.fc-wrap.fc-open .fc-icon-open  { display: flex; }
.fc-wrap.fc-open .fc-icon-closed{ display: none; }

.fc-trigger-label {
	display: inline;
}

.fc-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: #e63946;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

.fc-pulse {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	opacity: 0;
	pointer-events: none;
	animation: fc-pulse 2s ease-out infinite;
}

@keyframes fc-pulse {
	0%   { transform: scale(1);   opacity: .45; }
	100% { transform: scale(1.9); opacity: 0;   }
}

.fc-entrance-fade   { animation: fc-fadeIn  .5s ease both; }
.fc-entrance-slide  { animation: fc-slideUp .5s ease both; }
.fc-entrance-zoom   { animation: fc-zoomIn  .5s ease both; }
.fc-entrance-bounce { animation: fc-bounce  .6s ease both; }
.fc-entrance-none   { animation: none; }

@keyframes fc-fadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes fc-slideUp { from { opacity:0; transform:translateY(30px) } to { opacity:1; transform:none } }
@keyframes fc-zoomIn  { from { opacity:0; transform:scale(.3) } to { opacity:1; transform:scale(1) } }
@keyframes fc-bounce  {
	0%   { opacity:0; transform:translateY(50px) }
	60%  { opacity:1; transform:translateY(-8px) }
	80%  { transform:translateY(4px) }
	100% { transform:none }
}

.fc-hover-scale  .fc-trigger:hover { transform: scale(1.08); }
.fc-hover-shake  .fc-trigger:hover { animation: fc-shake  .45s ease both; }
.fc-hover-wobble .fc-trigger:hover { animation: fc-wobble .55s ease both; }

@keyframes fc-shake {
	0%,100%{ transform:rotate(0) }
	20%    { transform:rotate(-8deg) }
	40%    { transform:rotate(8deg) }
	60%    { transform:rotate(-4deg) }
	80%    { transform:rotate(4deg) }
}

@keyframes fc-wobble {
	0%  { transform:translateX(0) }
	15% { transform:translateX(-5px) rotate(-3deg) }
	30% { transform:translateX(4px) rotate(2deg) }
	45% { transform:translateX(-3px) }
	60% { transform:translateX(2px) }
	100%{ transform:none }
}

/* В редакторе */
.elementor-editor-active .fc-wrap {
	position: relative !important;
	bottom: auto !important;
	left:   auto !important;
	right:  auto !important;
	animation: none !important;
}

.elementor-editor-active .fc-item {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: none !important;
	transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.fc-wrap, .fc-item, .fc-trigger, .fc-btn, .fc-pulse {
		animation: none !important;
		transition: none !important;
	}
}
