.gst-stock-counter {
	--gst-sc-percent: 2.667%;
	--gst-sc-accent: #e63212;
	width: min(100%, 430px);
	display: grid;
	grid-template-areas:
		"top"
		"bar";
	gap: 5px;
	margin: 0 auto;
	padding: 8px 11px 9px;
	border: 1px solid #aeb5bd;
	border-radius: 7px;
	background: #fff;
	box-shadow: 2px 3px 0 #d2d7dd;
	color: #23262a;
	font-family: Manrope, Arial, sans-serif;
}

.gst-stock-counter__top {
	grid-area: top;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px;
	align-items: baseline;
}

.gst-stock-counter__sentence {
	margin: 0;
	color: #23262a;
	font-size: clamp(13px, 1.35vw, 15px);
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.15;
	text-align: left;
}

.gst-stock-counter__sentence span {
	color: #e63212;
	font-weight: 900;
}

.gst-stock-counter__ratio {
	margin: 0;
	color: #656b73;
	font-size: 12px;
	font-weight: 850;
	letter-spacing: 0.08em;
	line-height: 1;
	white-space: nowrap;
}

.gst-stock-counter__ratio span {
	color: #e63212;
	font-weight: 950;
}

.gst-stock-counter__bar {
	grid-area: bar;
	position: relative;
	height: 16px;
	padding: 2px;
	overflow: hidden;
	border: 2px solid #23262a;
	border-radius: 3px;
	background: #f0f2f4;
	box-shadow: inset 0 0 0 1px #fff;
}

.gst-stock-counter__cells {
	height: 100%;
	display: grid;
	grid-template-columns: repeat(30, minmax(0, 1fr));
	gap: 2px;
}

.gst-stock-counter__cell {
	position: relative;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	border-radius: 1px;
	background: #fff;
	box-shadow: inset 0 0 0 1px rgba(35, 38, 42, 0.18);
}

.gst-stock-counter__cell.is-filled {
	box-shadow: none;
	animation: gst-stock-counter-cell-wave 1.95s steps(2, end) infinite;
	animation-delay: calc((30 - var(--gst-sc-cell-index, 0)) * 32ms);
}

.gst-stock-counter__cell.is-filled.is-red {
	background: #e63212;
}

.gst-stock-counter__cell.is-filled.is-orange {
	background: #ff9a1f;
}

.gst-stock-counter__cell.is-filled.is-green {
	background: #1d9b5a;
}

@media (max-width: 480px) {
	.gst-stock-counter {
		width: min(100%, 390px);
	}

	.gst-stock-counter__top {
		grid-template-columns: max-content auto;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
	}

	.gst-stock-counter__sentence {
		font-size: clamp(12px, 3.45vw, 14px);
		line-height: 1.1;
		text-align: left;
		white-space: nowrap;
	}

	.gst-stock-counter__ratio {
		font-size: 10.5px;
		letter-spacing: 0.02em;
	}
}

@keyframes gst-stock-counter-cell-wave {
	0%,
	100% {
		filter: brightness(1);
	}

	50% {
		filter: brightness(1.42) saturate(0.82);
	}
}

@media (prefers-reduced-motion: reduce) {
	.gst-stock-counter__cell.is-filled {
		animation: none;
	}
}
