/* Floating Go to Cart Button */

.fgtc-floating-button {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #2D7238;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	z-index: 999996;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	text-decoration: none;
	color: #fff;
}

.fgtc-floating-button.fgtc-hidden {
	display: none;
}

.fgtc-floating-button:hover {
	transform: scale(1.08);
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3);
}
.fgtc-floating-button:active {
	transform: scale(0.94);
}

.fgtc-icon svg {
	width: 26px;
	height: 26px;
	display: block;
}

.fgtc-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 22px;
	height: 22px;
	padding: 0 5px;
	background: #e53935;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
	border-radius: 999px;
	box-shadow: 0 0 0 2px #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Pop-in animation the moment the cart goes from empty to having an item */
@keyframes fgtc-pop-in {
	0% {
		transform: scale(0);
		opacity: 0;
	}
	70% {
		transform: scale(1.15);
		opacity: 1;
	}
	100% {
		transform: scale(1);
	}
}
.fgtc-floating-button.fgtc-pop {
	animation: fgtc-pop-in 0.35s ease forwards;
}

/* Small bump on the badge whenever the count changes while already visible */
@keyframes fgtc-badge-bump {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.35);
	}
	100% {
		transform: scale(1);
	}
}
.fgtc-badge.fgtc-bump {
	animation: fgtc-badge-bump 0.3s ease;
}

/* Respect iOS home-indicator safe area so it doesn't sit under it */
@supports (bottom: env(safe-area-inset-bottom)) {
	.fgtc-floating-button {
		bottom: calc(20px + env(safe-area-inset-bottom));
	}
}

@media (max-width: 480px) {
	.fgtc-floating-button {
		width: 50px;
		height: 50px;
		right: 14px;
		bottom: 14px;
	}
	.fgtc-icon svg {
		width: 22px;
		height: 22px;
	}
	.fgtc-badge {
		min-width: 18px;
		height: 18px;
		line-height: 18px;
		font-size: 10px;
		top: -2px;
		right: -2px;
	}

	@supports (bottom: env(safe-area-inset-bottom)) {
		.fgtc-floating-button {
			bottom: calc(14px + env(safe-area-inset-bottom));
		}
	}
}
