/**
 * OneTwenty Giveaways — PDF entry lists (public index + product button).
 * Own markup + classes, so nothing collides with theme CSS.
 * Palette (portable): navy #14263a, violet #7c3aed, violet-deep #6d28d9,
 * plum #5b21b6, tint #f4efff, line #4c1d9540, muted #64748b.
 */

.otg-el-grid {
	display: grid;
	grid-template-columns: repeat(var(--otg-el-cols, 3), minmax(0, 1fr));
	gap: 1.5rem;
	margin: 0 0 2rem;
	padding: 0;
}

.otg-el-grid--1 { --otg-el-cols: 1; }
.otg-el-grid--2 { --otg-el-cols: 2; }
.otg-el-grid--3 { --otg-el-cols: 3; }
.otg-el-grid--4 { --otg-el-cols: 4; }

@media (max-width: 991px) {
	.otg-el-grid { --otg-el-cols: 2; }
}

@media (max-width: 575px) {
	.otg-el-grid { --otg-el-cols: 1; }
}

/* ---- Card ---- */
/* Matches the competition card in the shop grid: 16px corners, hairline violet
 * border, no shadow, and a full-bleed CTA that darkens when the *card* is
 * hovered rather than only the button. */
.otg-el-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid #4c1d9540;
	border-radius: 16px;
}

.otg-el-card__media {
	margin: 0;
	background: #f4efff;
	line-height: 0;
}

.otg-el-card__media img,
img.otg-el-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.otg-el-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	padding: 25px 15px 0;
	text-align: center;
}

.otg-el-card__title {
	margin: 0 0 0.5rem;
	color: #14263a;
	font-size: var(--ep-fs-lg, 1.125rem);
	font-weight: 700;
	line-height: 1.35;
}

.otg-el-card__date {
	margin: 0 0 1.25rem;
	color: #64748b;
	font-size: var(--ep-fs-sm, 0.875rem);
}

/* Full-bleed to the card edges, pushed to the bottom so cards in a row line up.
 * Negative margins cancel the body padding; the card's overflow:hidden clips the
 * bottom corners to the card radius. */
.otg-el-card__body > .otg-el-button {
	/* The body centres its children, so the bar has to opt out of that to span
	 * the full card width. */
	align-self: stretch;
	margin: auto -15px 0;
}

/* ---- Button ---- */
.otg-el-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: auto;
	padding: 14px 1.25rem;
	border: 0;
	border-radius: 0;
	background: #6d28d9;
	color: #fff;
	font-size: var(--ep-fs-base, 1rem);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.2s ease;
}

/* The whole card is the hit area, matching the competition cards. */
.otg-el-card:hover .otg-el-button,
.otg-el-button:hover,
.otg-el-button:focus {
	background: #5b21b6;
	color: #fff;
	text-decoration: none;
}

.otg-el-button:focus-visible {
	outline: 2px solid #4c1d95;
	outline-offset: 2px;
}

.otg-el-icon {
	flex: 0 0 auto;
}

/* ---- Single product ---- */
.otg-el-product-link {
	clear: both;
	margin: 0 0 1.5rem;
}

/* Standalone on a finished competition page — not in a card, so it keeps
 * button-ish proportions rather than the card's full-bleed bar. */
.otg-el-product-link .otg-el-button {
	display: inline-flex;
	width: auto;
	padding: 12px 1.5rem;
	border-radius: 8px;
}

/* ---- Pagination ---- */
.otg-el-pager {
	margin: 0 0 2rem;
	text-align: center;
}

.otg-el-pager__count {
	margin: 0 0 0.75rem;
	color: #64748b;
	font-size: var(--ep-fs-sm, 0.875rem);
}

.otg-el-pager__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.otg-el-pager__list li {
	margin: 0;
}

.otg-el-pager__list .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid #4c1d9540;
	border-radius: 999px;
	background: #fff;
	color: #6d28d9;
	font-size: var(--ep-fs-sm, 0.875rem);
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.otg-el-pager__list a.page-numbers:hover,
.otg-el-pager__list a.page-numbers:focus {
	background: #f4efff;
	color: #4c1d95;
	text-decoration: none;
}

.otg-el-pager__list .page-numbers.current {
	background: #7c3aed;
	border-color: #7c3aed;
	color: #fff;
}

.otg-el-pager__list .page-numbers.dots {
	border-color: transparent;
	color: #64748b;
}

.otg-el-pager__list .page-numbers:focus-visible {
	outline: 2px solid #4c1d95;
	outline-offset: 2px;
}

/* ---- Empty state ---- */
.otg-el-empty {
	margin: 0 0 2rem;
	padding: 1.25rem;
	background: #f4efff;
	border-radius: 12px;
	color: #374758;
	text-align: center;
}
