/* Gamersland Wishlist: uses the theme's colours (custom properties from Gamersland). */

.gl-card {
	position: relative;
}

.glw-heart {
	display: grid;
	place-items: center;
	padding: 0;
	border: 1px solid var(--gl-line, rgba(157, 0, 255, .3));
	background: rgba(10, 9, 19, .72);
	color: #fff;
	cursor: pointer;
	transition: background .18s, color .18s, box-shadow .18s, transform .18s;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.glw-heart__icon {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linejoin: round;
}

.glw-heart:hover,
.glw-heart:focus-visible {
	color: var(--gl-sale, #ff3d71);
	box-shadow: 0 0 0 1px var(--gl-sale, #ff3d71), 0 0 18px color-mix(in srgb, var(--gl-sale, #ff3d71) 50%, transparent);
}

.glw-heart[aria-pressed="true"] {
	color: var(--gl-sale, #ff3d71);
}

.glw-heart[aria-pressed="true"] .glw-heart__icon {
	fill: currentColor;
}

.glw-heart.is-pop {
	animation: glw-pop .32s ease;
}

@keyframes glw-pop {
	50% { transform: scale(1.22); }
}

/* On the card: bottom right corner of the cover, clear of the game's title.
   The card is a container so the cover's height can be worked out from its width
   (10px is the card's padding; the cover keeps the theme's --gl-cover ratio). */
.gl-card:has(> .glw-heart--card) {
	container-type: inline-size;
}

.glw-heart--card {
	position: absolute;
	top: 18px;
	top: calc(10px + 100cqw / (var(--gl-cover, 45 / 61)) - 38px - 8px);
	right: 18px;
	z-index: 2;
	width: 38px;
	height: 38px;
	border-radius: 50%;
}

/* On the game page: square button beside the store button, same height. */
.glw-buy-row {
	display: flex;
	align-items: stretch;
	gap: 12px;
	max-width: 486px;
}

.glw-buy-row .gl-buy {
	flex: 1;
	min-width: 0;
}

.glw-heart--page {
	flex: none;
	width: 56px;
	min-height: 54px;
	margin: 0 0 18px;
	border-radius: 14px;
	background: var(--gl-card, #17142a);
}

.glw-buy-row .glw-heart--page {
	margin: 0;
}

.glw-heart--page .glw-heart__icon {
	width: 26px;
	height: 26px;
}

/* Header button: same look as the theme's account and cart buttons. */
.glw-action .glw-heart__icon {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linejoin: round;
}

.glw-count {
	background: var(--gl-sale, #ff3d71);
	box-shadow: 0 0 10px var(--gl-sale, #ff3d71);
}

/* Wishlist page: as wide as the shop, not the narrow text column of other pages. */
.gl-content:has([data-glw-list]) {
	max-width: 1320px;
}

.glw-list.is-loading {
	min-height: 240px;
	opacity: .5;
}

.glw-empty {
	padding: 28px;
	border: 1px dashed var(--gl-line, rgba(157, 0, 255, .3));
	border-radius: var(--gl-radius, 14px);
	color: var(--gl-muted, #a89fc8);
	font-size: 17px;
	text-align: center;
}

.glw-empty a {
	display: inline-block;
	margin-left: 6px;
	color: var(--gl-glow, #e6bfff);
	font-weight: 600;
}

@media (max-width: 639px) {
	.glw-heart--card {
		top: 14px;
		top: calc(10px + 100cqw / (var(--gl-cover, 45 / 61)) - 34px - 6px);
		right: 16px;
		width: 34px;
		height: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.glw-heart.is-pop {
		animation: none;
	}
}
