/* Game tiles grid (home page, Black Friday landing): Black Friday badge and percent background. */

.hg_tile {
	--hg-percent-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='96' viewBox='0 0 120 96'%3E%3Cg fill='%23ffffff' font-family='Arial,sans-serif' font-weight='700'%3E%3Ctext x='4' y='26' font-size='22' fill-opacity='.16'%3E%25%3C/text%3E%3Ctext x='62' y='40' font-size='14' fill-opacity='.12'%3E%25%3C/text%3E%3Ctext x='30' y='72' font-size='16' fill-opacity='.14'%3E%25%3C/text%3E%3Ctext x='88' y='88' font-size='24' fill-opacity='.16'%3E%25%3C/text%3E%3Ctext x='96' y='18' font-size='12' fill-opacity='.1'%3E%25%3C/text%3E%3C/g%3E%3C/svg%3E");

	position: relative;
}

.promo-banner-tile__link {
	position: absolute;
	inset: 0;
	display: block;
	color: inherit;

	&:hover {
		color: inherit;
	}
}

.hg_percent {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 10px;

	&::after {
		content: "";
		position: absolute;
		inset: 0;
		background-image: var(--hg-percent-pattern);
		background-size: 120px 96px;
		pointer-events: none;
	}
}

.promo-banner-tile__link.hg_percent {
	position: absolute;
	border-radius: inherit;
}

.hg_percent img {
	display: block;
}

.hg_badge {
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	z-index: 2;
	display: block;
	inline-size: var(--hg-badge-width);
	aspect-ratio: 290 / 60;
	/* The sticker from the design sits flush in the tile's top-left corner: straight top and left
	   edges, torn right and bottom edges, heavy lettering. It is an image; the text stays in the
	   markup for screen readers and search engines. The corner follows the tile image radius. */
	border-start-start-radius: 10px;
	background: url("/assets/img/black-friday/deal-badge-corner@2x.png") no-repeat 0 0 / 100% 100%;
	color: transparent;
	font-size: 0;
	text-decoration: none;
	transform-origin: 0 0;
	transition: transform 0.2s ease;

	&:hover {
		color: transparent;
		transform: scale(1.04);
	}
}

.hg_tile {
	--hg-badge-width: 100px;
}

.promo-banner-tile.hg_tile {
	--hg-badge-width: 145px;
}

@media (max-width: 610px) {
	.hg_tile {
		--hg-badge-width: 80px;
	}

	.promo-banner-tile.hg_tile {
		--hg-badge-width: 100px;
	}
}
