:root {
	--stcp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.stcp-wrap {
	position: fixed;
	left: 50%;
	bottom: calc(clamp(16px, 3vw, 28px) + env(safe-area-inset-bottom, 0px));
	z-index: 9999;
	transform: translateX(-50%);
	pointer-events: none;
}

.stcp-button {
	position: relative;
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
	pointer-events: auto;
	opacity: 0;
	transform: translateY(26px) scale(0.86);
	transition:
		opacity 0.35s var(--stcp-ease),
		transform 0.45s var(--stcp-ease),
		filter 0.35s ease;
	filter: drop-shadow(0 14px 26px rgba(15, 23, 42, 0.16));
}

.stcp-button.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.stcp-button::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background:
		radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.98), transparent 34%),
		linear-gradient(180deg, #ffffff 0%, #f8fafc 58%, #edf2f7 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.98),
		inset 0 -10px 16px rgba(148, 163, 184, 0.12),
		0 0 0 1px rgba(255, 255, 255, 0.7),
		0 10px 20px rgba(15, 23, 42, 0.12);
	z-index: 0;
}

.stcp-button::after {
	content: "";
	position: absolute;
	inset: -10px;
	border-radius: inherit;
	background:
		radial-gradient(circle at 50% 55%, rgba(255, 255, 255, 0.18), transparent 42%),
		radial-gradient(circle, rgba(15, 23, 42, 0.09), transparent 70%);
	transform: scale(0.96);
	opacity: 0.12;
	filter: blur(14px);
	z-index: -1;
	transition:
		transform 0.25s ease,
		opacity 0.25s ease;
}

.stcp-button:hover {
	transform: translateY(-3px) scale(1.02);
	filter: drop-shadow(0 18px 30px rgba(15, 23, 42, 0.2));
}

.stcp-button:active {
	transform: translateY(0) scale(0.97);
}

.stcp-button:focus-visible {
	outline: 0;
	box-shadow:
		0 0 0 4px rgba(255, 255, 255, 0.96),
		0 0 0 8px rgba(239, 68, 68, 0.12);
}

.stcp-button-core {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border-radius: 999px;
	background:
		radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.95), transparent 34%),
		linear-gradient(180deg, #ffffff 0%, #f8fafc 65%, #eef2f6 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.96),
		inset 0 -6px 10px rgba(148, 163, 184, 0.12),
		0 1px 2px rgba(15, 23, 42, 0.05);
}

.stcp-icon {
	font-size: 24px;
	line-height: 1;
	font-weight: 700;
	color: #334155;
	transform: translateY(-1px);
	text-shadow: none;
}

@media (max-width: 640px) {
	.stcp-button {
		width: 54px;
		height: 54px;
	}

	.stcp-button-core {
		width: 54px;
		height: 54px;
	}

	.stcp-icon {
		font-size: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.stcp-button,
	.stcp-button::after {
		transition: none;
	}

	.stcp-button:hover,
	.stcp-button:active {
		transform: none;
	}
}
