/**
 * Restyle Freedemo Games archive to match site filters + casino CTAs.
 *
 * @package mercury-child
 */

.fgames-cards-wrapper {
	font-family: inherit;
}

/* --- Filters (match archive toolbar) --- */
.fdgames-filters {
	margin: 0 0 24px;
}

.fdgames-filters form {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--mrc-border-light, #e6e1d6);
	border-radius: 12px;
	background: var(--mrc-white, #fff);
	box-shadow: none;
	width: 100%;
}

.fdgames-filters input,
.fdgames-filters select {
	flex: none;
	width: 100%;
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid var(--mrc-border-light, #e6e1d6);
	border-radius: 8px;
	background: var(--mrc-warm-white, #faf8f4);
	box-shadow: none;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--mrc-text-dark, #14171f);
	appearance: none;
	-webkit-appearance: none;
}

.fdgames-filters select {
	padding-right: 2.25rem;
	background-color: var(--mrc-warm-white, #faf8f4);
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='10' height='7' viewBox='0 0 10 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.85rem center;
	cursor: pointer;
}

.fdgames-filters input[type="search"],
.fdgames-filters input[type="text"].fdgames-search {
	padding-left: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg fill='%236b7280' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5C16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 0.85rem center;
	background-size: 1rem;
}

.fdgames-filters input:focus,
.fdgames-filters select:focus {
	outline: none;
	border-color: var(--mrc-gold, #c79a3b);
	box-shadow: 0 0 0 2px var(--mrc-white, #fff), 0 0 0 4px rgba(199, 154, 59, 0.45);
}

.fdgames-filters input::placeholder {
	color: var(--mrc-text-muted-dark, #6b7280);
	opacity: 1;
}

@media (max-width: 768px) {
	.fdgames-filters form {
		grid-template-columns: 1fr;
	}
}

/* --- Cards --- */
.fdgames-grid {
	gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.fdgames-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--mrc-white, #fff);
	border: 1px solid var(--mrc-border-light, #e6e1d6);
	border-radius: var(--mrc-radius-md, 10px);
	box-shadow: none;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.fdgames-card:hover {
	transform: translateY(-2px);
	border-color: var(--mrc-accent, #c79a3b);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.fdgames-card img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: rgba(0, 0, 0, 0.04);
}

.fdgames-card-content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 12px 14px 14px;
	gap: 8px;
}

.fdgames-card-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	min-height: calc(1.3em * 2);
	margin: 0;
	/* Beat Mercury parent `h3, h3 a { font-size: 1.777em }` on provider cards. */
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--mrc-text-dark, #14171f);
}

.fdgames-card-title a {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: inherit;
	text-decoration: none;
}

.fdgames-card-provider {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--mrc-text-muted-dark, #6b7280);
}

/* --- Play demo = casino card primary CTA --- */
.fdgames-play-demo-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin: auto 0 0;
	padding: 10px 12px;
	border: 0;
	border-radius: 8px;
	background: var(--mrc-success, #1a7f37);
	color: #fff;
	font-family: inherit;
	font-size: 12px;
	font-weight: 800;
	font-style: normal;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.fdgames-play-demo-btn:hover,
.fdgames-play-demo-btn:focus-visible {
	background: var(--mrc-success, #1a7f37);
	color: #fff;
	filter: brightness(1.05);
	outline: none;
	box-shadow: 0 0 0 2px var(--mrc-white, #fff), 0 0 0 4px var(--mrc-success, #1a7f37);
}

/* --- Load more = gold casino-style button --- */
.fdgames-inthelist {
	margin: 28px 0 12px;
	font-family: inherit;
	font-size: 0.875rem;
	color: var(--mrc-text-muted-dark, #6b7280);
}

.fdgames-load-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin: 8px 0 0;
	padding: 12px 28px;
	width: auto;
	border: 0;
	border-radius: 8px;
	background: var(--mrc-gold, #c79a3b);
	color: var(--mrc-black, #111);
	font-family: inherit;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.fdgames-load-more-btn:hover,
.fdgames-load-more-btn:focus-visible {
	transform: none;
	background: var(--mrc-gold-light, #e8c96a);
	color: var(--mrc-black, #111);
	outline: none;
	box-shadow: 0 0 0 2px var(--mrc-white, #fff), 0 0 0 4px var(--mrc-gold, #c79a3b);
}
