/* ===========================================================================
   DISCORD WIDGET

   The "join the server" card. It deliberately reuses the store widget's
   skeleton (.game-widget-container / .game-icon-section / .game-content) so it
   sits next to the Steam card as a matching pair — everything below is just
   the Discord colouring on top of that.

   Requires: CSS/store-widget.css
   Loaded by: the-empty-halls.html
   =========================================================================== */

.game-widget-container.discord-version {
	/* The border must not push this card 2px wider than the Steam one above. */
	box-sizing: border-box;
	margin: 0;
	float: none;
	height: auto;
	min-height: 180px;
	border: 1px solid var(--color-discord-border);
	transition:
		transform var(--dur-hover) var(--ease-out),
		box-shadow var(--dur-hover) var(--ease-out),
		border-color var(--dur-hover) var(--ease-soft);
}

@media (hover: hover) {
	.game-widget-container.discord-version:hover {
		transform: translateY(-3px);
		border-color: var(--color-discord);
		box-shadow: 0 10px 28px var(--color-discord-glow);
	}
}

/* Blurple panel instead of the store card's blurred screenshot. */
.discord-version .game-icon-section {
	background: linear-gradient(160deg, #7289da 0%, #5865f2 55%, #4752c4 100%);
	overflow: hidden;
}

/* Soft light behind the logo so the flat blurple has some depth. */
.discord-version .game-icon-section::after {
	content: "";
	position: absolute;
	inset: -40% -60%;
	background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), transparent 60%);
	pointer-events: none;
}

/* Unlike the Steam card's icon this is a bare transparent logo, not a square
   tile, so it uses a drop-shadow that follows the shape. .game-icon's own
   box-shadow has to be cleared in both states or it draws a hard rectangle
   around the mark on hover.

   The hovered selector has to match the one that sets it in store-widget.css —
   that is a descendant rule keyed off the card, so a bare .discord-icon:hover
   is a specificity below it and the rectangle comes back. */
.discord-icon,
.game-widget-container:hover .discord-icon {
	width: 54px;
	height: 54px;
	background: url("../Icons/discord.svg") center / contain no-repeat;
	border-radius: 0;
	box-shadow: none;
}

.discord-icon {
	filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
	transition:
		transform var(--dur-hover) var(--ease-pop),
		filter var(--dur-hover) var(--ease-out);
}

/* Keyed off the card, matching the Steam icon — see the note there. */
@media (hover: hover) {
	.game-widget-container:hover .discord-icon {
		transform: scale(1.06);
		filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
	}
}

.discord-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	background: var(--color-discord);
	padding: 6px 10px;
	border-radius: 12px;
	font-size: 10px;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 4px;
	z-index: 10;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.discord-badge-logo {
	width: 14px;
	height: 14px;
	background: url("../Icons/discord.svg") center / contain no-repeat;
}

/* Same shape as the Steam card's price tag, so the two line up. */
.discord-tag {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: var(--color-discord-text);
	background: var(--color-discord-bg);
	padding: 4px 10px;
	border-radius: 10px;
	margin-bottom: 14px;
	width: fit-content;
	border: 1px solid var(--color-discord-border);
}

.discord-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #23a55a;
	box-shadow: 0 0 0 0 rgba(35, 165, 90, 0.6);
	animation: discord-pulse 2.4s ease-out infinite;
}

@keyframes discord-pulse {
	0% { box-shadow: 0 0 0 0 rgba(35, 165, 90, 0.55); }
	70% { box-shadow: 0 0 0 7px rgba(35, 165, 90, 0); }
	100% { box-shadow: 0 0 0 0 rgba(35, 165, 90, 0); }
}

.discord-button {
	background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
}

/* The lift, the shadow and the press come from .button-primary in
   store-widget.css; this is only the blurple. */
@media (hover: hover) {
	.discord-button:hover {
		background: linear-gradient(135deg, #6b76f5 0%, #5865f2 100%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.discord-dot {
		animation: none;
	}

	.game-widget-container.discord-version:hover {
		transform: none;
	}
}
