/*
 * events.css — cards for /events/ (inside the Foxiz/Pixwell theme's own
 * content area — cryptogames.css is NEVER enqueued there, see the header on
 * EventsList::eventsList()) and for the event single takeover (which DOES
 * load cryptogames.css; these rules only ADD the hero/facts pieces that file
 * does not already have — see single-calendar.php).
 *
 * Built the way assets/css/modules.css is: our own custom properties with a
 * DARK LITERAL fallback, so the section reads correctly with or without the
 * theme defining anything — two sites, one plugin, never a Foxiz-only string.
 * Everything is scoped under .cg-ev-* / .cg-events-filters so a bare class
 * name here cannot collide with either theme.
 */

.cg-events-filters,
.cg-ev-grid,
.cg-ev-card,
.cg-ev-section-heading {
	--cg-ev-bg: var(--cg-card-bg, #1c1b1c);
	--cg-ev-ink: var(--cg-text, #e5e2e3);
	--cg-ev-muted: var(--cg-text-muted, #b9cacb);
	--cg-ev-faint: var(--cg-text-faint, #8fa3a5);
	--cg-ev-hair: var(--cg-hairline, rgba(59, 73, 75, 0.3));
	--cg-ev-accent: var(--cg-accent, #00dbe9);
	box-sizing: border-box;
}
.cg-ev-grid *, .cg-ev-card * { box-sizing: border-box; }

/* ---------- filter chips ---------- */

.cg-events-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}
.cg-ev-chip {
	font-size: 12px;
	color: var(--cg-ev-muted);
	padding: 4px 12px;
	border: 1px solid var(--cg-ev-hair);
	border-radius: 999px;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color .15s ease, color .15s ease;
}
.cg-ev-chip:hover { color: var(--cg-ev-ink); border-color: var(--cg-ev-accent); }
.cg-ev-chip.is-active {
	font-weight: 700;
	color: var(--cg-ev-ink);
	border-color: var(--cg-ev-accent);
}

/* ---------- section headings (Live now / Upcoming / Past) ---------- */

.cg-ev-section-heading {
	font-size: 18px;
	font-weight: 700;
	color: var(--cg-ev-ink);
	margin: 32px 0 16px;
}
.cg-ev-section-heading:first-of-type { margin-top: 0; }

/* ---------- the grid ---------- */

.cg-ev-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-bottom: 8px;
}
@media (min-width: 640px) { .cg-ev-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cg-ev-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- the card ---------- */

.cg-ev-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--cg-ev-bg);
	border: 1px solid var(--cg-ev-hair);
	border-radius: 10px;
	padding: 18px;
	transition: border-color .15s ease, transform .15s ease;
}
.cg-ev-card:hover { border-color: var(--cg-ev-accent); transform: translateY(-2px); }

.cg-ev-date {
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.cg-ev-day {
	font-size: 28px;
	font-weight: 800;
	line-height: 1;
	color: var(--cg-ev-ink);
	font-family: var(--font-headline, inherit);
}
.cg-ev-monthyear, .cg-ev-year {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--cg-ev-muted);
}
.cg-ev-daterange {
	font-size: 16px;
	font-weight: 700;
	color: var(--cg-ev-ink);
	font-family: var(--font-headline, inherit);
}

.cg-ev-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

.cg-ev-type-chip {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 3px 9px;
	border-radius: 4px;
	background: rgba(0, 219, 233, 0.12);
	color: var(--cg-ev-accent);
	border: 1px solid rgba(0, 219, 233, 0.3);
}

.cg-ev-game {
	position: relative;
	z-index: 2; /* above the card's stretched title link, see .cg-ev-card-link */
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: var(--cg-ev-muted);
	font-size: 13px;
	width: fit-content;
}
.cg-ev-game:hover { color: var(--cg-ev-ink); }
.cg-ev-game-icon { border-radius: 6px; object-fit: cover; flex: 0 0 28px; }

.cg-ev-title {
	font-family: var(--font-headline, inherit);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}
.cg-ev-card-link {
	color: var(--cg-ev-ink);
	text-decoration: none;
}
/* The stretched-link pattern: the title's own <a> covers the whole card, so
 * the card is one real, crawlable link — and .cg-ev-game above it sits on a
 * higher z-index so it stays clickable in its own right. */
.cg-ev-card-link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}
.cg-ev-card:hover .cg-ev-card-link { color: var(--cg-ev-accent); }

.cg-ev-excerpt {
	font-size: 13px;
	line-height: 1.5;
	color: var(--cg-ev-muted);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cg-ev-foot {
	font-size: 12px;
	color: var(--cg-ev-faint);
	margin-top: auto;
	padding-top: 8px;
}

/* ---------- single event: hero date block, facts grid extras, mini cards ---------- */

.cg-ev-hero-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	line-height: 1;
	padding: 6px 14px;
	border: 1px solid rgba(229, 226, 227, 0.25);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.25);
}
.cg-ev-hero-date .cg-ev-day { font-size: 26px; }
.cg-ev-hero-date .cg-ev-daterange { font-size: 15px; }

.cg-ev-gcal {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
}

.cg-ev-mini-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 48px; }
.cg-ev-mini-card {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 14px;
	text-decoration: none;
	color: var(--cg-ev-ink, #e5e2e3);
	background: var(--cg-ev-bg, #1c1b1c);
	border: 1px solid var(--cg-ev-hair, rgba(59, 73, 75, 0.3));
	border-radius: 8px;
	transition: border-color .15s ease;
}
.cg-ev-mini-card:hover { border-color: var(--cg-ev-accent, #00dbe9); }
.cg-ev-mini-date { font-size: 12px; color: var(--cg-ev-muted, #b9cacb); white-space: nowrap; }
