/* ==========================================================================
   ABC Floating Buttons — Frontend Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.abc-fb-wrap {
	--abc-fb-tooltip-bg: #333;
	--abc-fb-tooltip-color: #fff;
	--abc-fb-icon-color: #fff;
	--abc-fb-spacing: 8px;
	--abc-fb-offset: 20px;
	--abc-fb-z: 9999;
}

.abc-fb-fixed {
	position: fixed;
	z-index: var(--abc-fb-z);
	display: flex;
	flex-direction: column;
}

/* Positions */
.abc-fb-pos-right-middle {
	right: var(--abc-fb-offset);
	top: 50%;
	transform: translateY(-50%);
}

.abc-fb-pos-left-middle {
	left: var(--abc-fb-offset);
	top: 50%;
	transform: translateY(-50%);
}

.abc-fb-pos-bottom-right {
	right: var(--abc-fb-offset);
	bottom: var(--abc-fb-offset);
}

.abc-fb-pos-bottom-left {
	left: var(--abc-fb-offset);
	bottom: var(--abc-fb-offset);
}

/* --------------------------------------------------------------------------
   List
   -------------------------------------------------------------------------- */
.abc-fb-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--abc-fb-spacing);
	align-items: flex-end;
}

.abc-fb-pos-left-middle .abc-fb-list,
.abc-fb-pos-bottom-left .abc-fb-list {
	align-items: flex-start;
}

.abc-fb-item {
	position: relative;
}

/* --------------------------------------------------------------------------
   Button
   -------------------------------------------------------------------------- */
.abc-fb-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	cursor: pointer;
	border: none;
	outline: none;
	line-height: 1;
	transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	color: var(--abc-fb-icon-color);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.abc-fb-btn:hover,
.abc-fb-btn:focus-visible {
	opacity: 0.9;
	transform: scale(1.06);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.abc-fb-btn:focus-visible {
	outline: 3px solid #005fcc;
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Sizes
   -------------------------------------------------------------------------- */
.abc-fb-size-small .abc-fb-btn {
	width: 40px;
	height: 40px;
	padding: 0;
	justify-content: center;
}

.abc-fb-size-medium .abc-fb-btn {
	width: 48px;
	height: 48px;
	padding: 0;
	justify-content: center;
}

.abc-fb-size-large .abc-fb-btn {
	width: 56px;
	height: 56px;
	padding: 0;
	justify-content: center;
}

/* When labels are visible, let button expand */
.abc-fb-has-labels .abc-fb-btn {
	width: auto;
	padding: 0 14px 0 10px;
}

.abc-fb-size-small.abc-fb-has-labels .abc-fb-btn { height: 40px; }
.abc-fb-size-medium.abc-fb-has-labels .abc-fb-btn { height: 48px; }
.abc-fb-size-large.abc-fb-has-labels .abc-fb-btn  { height: 56px; }

/* --------------------------------------------------------------------------
   Shapes
   -------------------------------------------------------------------------- */
.abc-fb-shape-circle .abc-fb-btn {
	border-radius: 50%;
}

.abc-fb-shape-rounded .abc-fb-btn {
	border-radius: 8px;
}

.abc-fb-shape-soft-square .abc-fb-btn {
	border-radius: 4px;
}

/* With labels — override circle to pill */
.abc-fb-has-labels.abc-fb-shape-circle .abc-fb-btn {
	border-radius: 50px;
}

/* --------------------------------------------------------------------------
   Icon
   -------------------------------------------------------------------------- */
.abc-fb-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.abc-fb-size-small .abc-fb-icon svg  { width: 18px; height: 18px; }
.abc-fb-size-medium .abc-fb-icon svg { width: 22px; height: 22px; }
.abc-fb-size-large .abc-fb-icon svg  { width: 26px; height: 26px; }

/* --------------------------------------------------------------------------
   Label
   -------------------------------------------------------------------------- */
.abc-fb-label {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	color: var(--abc-fb-icon-color);
}

.abc-fb-size-large .abc-fb-label {
	font-size: 15px;
}

/* Hide label on mobile when option is set */
@media (max-width: 768px) {
	.abc-fb-hide-labels-mobile .abc-fb-label {
		display: none;
	}
	.abc-fb-hide-labels-mobile .abc-fb-btn {
		width: 40px !important;
		padding: 0 !important;
		justify-content: center !important;
	}
}

/* --------------------------------------------------------------------------
   Tooltip
   -------------------------------------------------------------------------- */
.abc-fb-tooltip {
	position: absolute;
	right: calc(100% + 10px);
	top: 50%;
	transform: translateY(-50%);
	background: var(--abc-fb-tooltip-bg);
	color: var(--abc-fb-tooltip-color);
	padding: 5px 10px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
	z-index: 1;
}

/* Arrow on tooltip */
.abc-fb-tooltip::after {
	content: '';
	position: absolute;
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	border: 5px solid transparent;
	border-left-color: var(--abc-fb-tooltip-bg);
}

/* Left-side containers — flip tooltip to the right */
.abc-fb-pos-left-middle .abc-fb-tooltip,
.abc-fb-pos-bottom-left .abc-fb-tooltip {
	left: calc(100% + 10px);
	right: auto;
}

.abc-fb-pos-left-middle .abc-fb-tooltip::after,
.abc-fb-pos-bottom-left .abc-fb-tooltip::after {
	left: auto;
	right: 100%;
	border-left-color: transparent;
	border-right-color: var(--abc-fb-tooltip-bg);
}

.abc-fb-tooltips .abc-fb-btn:hover .abc-fb-tooltip,
.abc-fb-tooltips .abc-fb-btn:focus-visible .abc-fb-tooltip {
	opacity: 1;
}

/* --------------------------------------------------------------------------
   Device visibility
   -------------------------------------------------------------------------- */
@media (min-width: 769px) {
	.abc-fb-device-mobile {
		display: none !important;
	}
}

@media (max-width: 768px) {
	.abc-fb-device-desktop {
		display: none !important;
	}
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	.abc-fb-anim-fade .abc-fb-item {
		animation: abc-fb-fadeIn 0.5s ease both;
	}

	.abc-fb-anim-slide.abc-fb-pos-right-middle .abc-fb-item,
	.abc-fb-anim-slide.abc-fb-pos-bottom-right .abc-fb-item {
		animation: abc-fb-slideInRight 0.5s ease both;
	}

	.abc-fb-anim-slide.abc-fb-pos-left-middle .abc-fb-item,
	.abc-fb-anim-slide.abc-fb-pos-bottom-left .abc-fb-item {
		animation: abc-fb-slideInLeft 0.5s ease both;
	}

	/* Stagger children */
	.abc-fb-item:nth-child(1) { animation-delay: 0.1s; }
	.abc-fb-item:nth-child(2) { animation-delay: 0.2s; }
	.abc-fb-item:nth-child(3) { animation-delay: 0.3s; }
	.abc-fb-item:nth-child(4) { animation-delay: 0.4s; }
	.abc-fb-item:nth-child(5) { animation-delay: 0.5s; }
	.abc-fb-item:nth-child(6) { animation-delay: 0.6s; }
}

@keyframes abc-fb-fadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes abc-fb-slideInRight {
	from { opacity: 0; transform: translateX(40px); }
	to   { opacity: 1; transform: translateX(0); }
}

@keyframes abc-fb-slideInLeft {
	from { opacity: 0; transform: translateX(-40px); }
	to   { opacity: 1; transform: translateX(0); }
}

/* --------------------------------------------------------------------------
   Mobile safety — don't let the group overwhelm the screen
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
	.abc-fb-size-large .abc-fb-btn {
		width: 44px;
		height: 44px;
	}
	.abc-fb-size-large .abc-fb-icon svg {
		width: 22px;
		height: 22px;
	}
}
