/* ==========================================================
   Floating Sidebar Widget
   ========================================================== */

.fs-root {
	position: relative;
}

.fs-wrap {
	position: fixed;
	display: flex;
	flex-direction: column;
	align-items: center;
	z-index: 9990;
	pointer-events: auto;
}

/* Vertical alignment */
.fs-wrap[data-vertical="middle"] {
	top: 50%;
	transform: translateY(-50%);
}

.fs-wrap[data-vertical="top"] {
	top: 40px;
}

.fs-wrap[data-vertical="bottom"] {
	bottom: 40px;
}

/* Side alignment defaults (overridden by Elementor selectors) */
.fs-wrap[data-side="right"] {
	right: 16px;
}

.fs-wrap[data-side="left"] {
	left: 16px;
}

/* Item button */
.fs-item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: none;
	background: #1a1a1a;
	color: #ffffff;
	border-radius: 6px;
	text-decoration: none;
	cursor: pointer;
	position: relative;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	padding: 0;
	font-family: inherit;
}

.fs-item:hover,
.fs-item:focus {
	background: #e60012;
	color: #ffffff;
	transform: translateX(-2px);
	outline: none;
}

.fs-wrap[data-side="left"] .fs-item:hover,
.fs-wrap[data-side="left"] .fs-item:focus {
	transform: translateX(2px);
}

.fs-item i,
.fs-item svg {
	font-size: 18px;
	width: 18px;
	height: 18px;
	line-height: 1;
	display: block;
	fill: currentColor;
}

/* Tooltip */
.fs-tooltip {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: #1a1a1a;
	color: #fff;
	font-size: 12px;
	line-height: 1;
	padding: 8px 12px;
	border-radius: 4px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
	z-index: 1;
}

.fs-tooltip-right {
	right: calc(100% + 10px);
}

.fs-tooltip-right::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 100%;
	transform: translateY(-50%);
	border: 5px solid transparent;
	border-left-color: #1a1a1a;
}

.fs-tooltip-left {
	left: calc(100% + 10px);
}

.fs-tooltip-left::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 100%;
	transform: translateY(-50%);
	border: 5px solid transparent;
	border-right-color: #1a1a1a;
}

.fs-item:hover .fs-tooltip,
.fs-item:focus .fs-tooltip {
	opacity: 1;
	visibility: visible;
}

.fs-wrap[data-side="right"] .fs-item:hover .fs-tooltip-right {
	transform: translateY(-50%) translateX(-4px);
}

.fs-wrap[data-side="left"] .fs-item:hover .fs-tooltip-left {
	transform: translateY(-50%) translateX(4px);
}

/* Back to Top — hidden until scrolled */
.fs-top {
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease,
		background-color 0.25s ease, color 0.25s ease;
}

.fs-wrap.fs-scrolled .fs-top {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Visibility controls */
@media (max-width: 767px) {
	.fs-hide-mobile {
		display: none !important;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.fs-hide-tablet {
		display: none !important;
	}
}

/* Mobile refinements */
@media (max-width: 767px) {
	.fs-wrap[data-side="right"] {
		right: 10px;
	}
	.fs-wrap[data-side="left"] {
		left: 10px;
	}
	.fs-tooltip {
		display: none;
	}
}

/* Elementor editor fix — still fixed but editable */
.elementor-editor-active .fs-wrap {
	position: fixed;
}
