.ccp-chess-effect {
	--ccp-chess-cell-size: 0.6;
	--ccp-chess-light-1: #F0EA9B;
	--ccp-chess-light-2: #FFB98E;
	--ccp-chess-light-3: #B8D8EB;
	--ccp-chess-dark-1: transparent;
	--ccp-chess-dark-2: transparent;
	--ccp-chess-solid-color: #F0EA9B;
	--ccp-chess-gradient-color-1: #F0EA9B;
	--ccp-chess-gradient-color-2: #B8D8EB;
	--ccp-chess-gradient-angle: 90deg;
	position: relative;
	isolation: isolate;
}

.w-btn.ccp-chess-effect {
	overflow: hidden;
}

.ccp-chess-effect > :not(.ccp-chess) {
	position: relative;
	z-index: 2;
}

.ccp-chess {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
}

.ccp-chess__board {
	position: relative;
	flex: 0 0 auto;
	pointer-events: none;
}

.ccp-chess__cell {
	position: absolute;
	pointer-events: none;
}

.ccp-chess__piece {
	display: block;
	width: 100%;
	height: 100%;
	opacity: 0;
	transform: scale(0);
	transform-origin: bottom left;
	pointer-events: none;
	will-change: transform, opacity;
}

.ccp-chess__piece--light-1 {
	background: var(--ccp-chess-light-1);
}

.ccp-chess__piece--light-2 {
	background: var(--ccp-chess-light-2);
}

.ccp-chess__piece--light-3 {
	background: var(--ccp-chess-light-3);
}

.ccp-chess__piece--dark-1 {
	background: var(--ccp-chess-dark-1);
}

.ccp-chess__piece--dark-2 {
	background: var(--ccp-chess-dark-2);
}

.ccp-chess__piece--dark {
	background: transparent;
	background-image: none;
}

.ccp-chess-colors-solid .ccp-chess__piece--light {
	background: var(--ccp-chess-solid-color);
	background-image: none;
}

.ccp-chess-colors-gradient .ccp-chess__piece--light {
	background-color: transparent;
	background-image: linear-gradient(
		var(--ccp-chess-gradient-angle),
		var(--ccp-chess-gradient-color-1),
		var(--ccp-chess-gradient-color-2)
	);
	background-repeat: no-repeat;
	background-position: var(--ccp-chess-gradient-x) var(--ccp-chess-gradient-y);
	background-size: var(--ccp-chess-gradient-width) var(--ccp-chess-gradient-height);
}

.ccp-chess-effect.ccp-chess-is-idle .ccp-chess__piece--light {
	background: rgba(255, 255, 255, 0.1);
	background-image: none;
}

.ccp-chess-effect.ccp-chess-is-idle .ccp-chess__piece--dark {
	background: transparent;
	background-image: none;
}

@media (prefers-reduced-motion: reduce) {
	.ccp-chess {
		display: none;
	}
}
