/* Casino Games Catalog — minimal structural styles.
   The theme owns the visual design; these are safe defaults. */

.cg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cg-card {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.cg-card__cover img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
}

.cg-card__title {
	font-weight: 600;
}

.cg-card__provider,
.cg-card__meta {
	font-size: 0.85em;
	opacity: 0.8;
}

.cg-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.cg-card__demo-badge {
	border: 1px solid currentColor;
	border-radius: 3px;
	padding: 0 0.35em;
	font-size: 0.85em;
}

.cg-facts {
	width: 100%;
	border-collapse: collapse;
}

.cg-facts th,
.cg-facts td {
	text-align: left;
	padding: 0.5em 0.75em;
	border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

.cg-facts__note {
	display: block;
	opacity: 0.7;
}

.cg-demo {
	position: relative;
}

/* The hidden attribute must win over display rules below,
   otherwise the poster stays visible after Play is clicked. */
.cg-demo [hidden] {
	display: none !important;
}

.cg-demo__poster {
	position: relative;
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #111;
	background-size: cover;
	background-position: center;
	border-radius: 8px;
	overflow: hidden;
}

/* Heavy dark scrim: the poster is a placeholder, not the focal image, on
   every embed mode (iframe or widget), so it stays dark regardless of
   how bright the underlying cover art is. */
.cg-demo__poster::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(4, 5, 8, 0.72);
	pointer-events: none;
}

/* Opaque panel for the Play button + disclaimer. Fixed near-black,
   independent of any theme/skin color tokens, so the white text on it
   holds a ~15:1 contrast ratio (WCAG AAA needs 7:1) no matter what
   colors a skin defines or how bright the cover photo behind it is. */
.cg-demo__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85em;
	padding: 1.5em 1.75em;
	background: #06070b;
	border-radius: 10px;
	max-width: 90%;
	text-align: center;
}

.cg-demo__play {
	position: relative;
	font-size: 1.1em;
	padding: 0.75em 2em;
	cursor: pointer;
}

.cg-demo__frame iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 8px;
}

.cg-demo__note {
	margin: 0;
	font-size: 0.8em;
	color: #f3f4f6;
}

.cg-empty {
	opacity: 0.8;
}

@media (max-width: 600px) {
	.cg-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}

	/* Slots run portrait on phones: vertical demo frame (SPEC §83). */
	.cg-demo__poster {
		aspect-ratio: 3 / 4;
	}

	.cg-demo__frame iframe {
		aspect-ratio: auto;
		height: 75vh;
	}
}
