@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

/* ───────────────────────────
   General Layout
──────────────────────────── */
.matchday-grid-container {
	font-family: 'Montserrat', sans-serif;
	color: #F6BC5E;
	padding: 20px;
}

/* ───────────────────────────
   Toolbar Layout
──────────────────────────── */
.matchday-grid-toolbar {
	margin-bottom: 15px;
}

.matchday-grid-toolbar-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	text-align: left;
}

/* Left and Right Toolbar Groups */
.toolbar-left {
	display: flex;
	align-items: center;
	gap: 10px;
}

.toolbar-right {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

/* ───────────────────────────
   Search Input + Clear Button
──────────────────────────── */
.search-box {
	position: relative;
	display: flex;
	align-items: center;
}

.search-box input {
	width: 250px;
	padding: 8px 35px 8px 8px;
	font-size: 14px;
	border: 0px;
	outline: none;
    border-radius: 6px;
}

.clear-icon {
	position: absolute;
	right: 8px;
	font-size: 20px;
	color: #631832;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	transition: background-color 0.2s;
}

.clear-icon:hover {
	background-color: #F6BC5E;
	color: #220b17;
}

/* ───────────────────────────
   Date Picker
──────────────────────────── */
.date-picker-box input[type="date"] {
	padding: 7px 10px;
	font-size: 14px;
}

/* ───────────────────────────
   Filter Button + Dropdown
──────────────────────────── */
.filter-wrapper {
	position: relative;
}

.filter-toggle {
	cursor: pointer;
	background-color: #F6BC5E;
	color: #631832;
	border: none;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: background-color 0.2s;
}

.filter-toggle:hover {
	background-color: #ffcf7e;
}

.filter-options {
	display: none;
	background: #F6BC5E;
	color: #631832;
	position: absolute;
	right: 0;
	top: 45px;
	width: 250px;
	padding: 20px;
	z-index: 10;
	border-radius: 6px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Section titles (e.g. "Filter by Category", "Sort By") */
.filter-options > span {
	display: block;
	font-weight: 700;       /* make them bold */
	margin-bottom: 8px;
}

/* Add spacing between checkbox items */
.category-container {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 10px;
	margin-bottom: 14px;    /* adds breathing room before divider */
}

.category-container label {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 14px;
}

/* Divider positioned cleanly */
.divider {
	background-color: #631832;
	height: 2px;
	margin: 14px 0;         /* balanced spacing above and below */
	border: none;
	opacity: 0.6;
}

/* Sort section */
.sort-filters-container {
	margin-top: 12px;
}

.sort-filters-container > span {
	font-weight: 700;       /* bold heading for "Sort By" */
	margin-bottom: 8px;
	display: block;
}

.sort-filters {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 5px;
}

/* Active / Focus state for Filter Button */
.filter-toggle:focus,
.filter-toggle:active {
	outline: none;
	box-shadow: none;
	background-color: #7a1e3d; /* light maroon */
	color: #F6BC5E;            /* gold icon */
}

/* ───────────────────────────
   Active Filter Tags
──────────────────────────── */
.matchday-active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin-top: 5px;
}

.active-filter-tag {
	display: inline-flex;
	align-items: center;
	background-color: #F6BC5E;
	color: #631832;
	padding: 5px 10px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
	cursor: default;
	transition: background-color 0.2s ease;
}

.active-filter-tag:hover {
	background-color: #ffcf7e;
}

.active-filter-tag .remove-tag {
	font-size: 16px;
	margin-left: 5px;
	cursor: pointer;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	color: #631832;
}

.active-filter-tag .remove-tag:hover {
	background-color: rgba(99, 24, 50, 0.1);
}

/* ───────────────────────────
   Grid + Pagination (Transparent + Clean Links)
──────────────────────────── */
.matchday-grid-posts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 15px;
}

/* Each card — transparent, no background */
.matchday-grid-item {
	background: transparent;
	padding: 0;
	position: relative; /* ensures NEW badge positions correctly */
}

/* Thumbnails remain full width */
.matchday-grid-item img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
}

/* Titles and dates */
.grid-title {
	font-size: 16px;
	margin: 10px 0 0;
	color: #F6BC5E;
	font-weight: 600;
}

/* Remove underline globally for this grid */
.matchday-grid-container a {
	color: #F6BC5E;
	text-decoration: none !important;
}

/* Optional hover colour tweak instead of underline */
.matchday-grid-container a:hover {
	color: #ffcf7e;
}

/* Dates below titles */
.grid-date {
	font-size: 13px;
	color: #F6BC5E;
	opacity: 0.85;
}

/* Pagination */
.matchday-grid-pagination {
	text-align: center;
	margin-top: 20px;
}

.matchday-grid-pagination a {
	color: #F6BC5E;
	margin: 0 4px;
	text-decoration: none !important;
}

.matchday-grid-item:hover img {
	transform: scale(1.02);
	transition: transform 0.2s ease-in-out;
}


/* ───────────────────────────
   Responsive Adjustments
──────────────────────────── */
@media (max-width: 700px) {
	.toolbar-left,
	.toolbar-right {
		width: 100%;
		justify-content: space-between;
	}
}

.clear-all-btn {
	background-color: #F6BC5E;
	color: #631832;
	border: none;
	border-radius: 6px;
	width: 80px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s;
	padding: 0;
}

.clear-all-btn:hover {
	background-color: #ffcf7e;
}

.matchday-grid-summary {
	color: #F6BC5E;
	font-size: 15px;
	font-style: italic;
	margin: 8px 0 15px 0;
	text-align: left;
	opacity: 0.85;
}

.no-results {
	text-align: center;
	margin: 40px 0;
	color: #F6BC5E;
	font-style: italic;
	font-size: 15px;
	opacity: 0.8;
}

.grid-loading {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(34, 11, 23, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 20;
}

.spinner {
	border: 3px solid rgba(246,188,94,0.4);
	border-top: 3px solid #F6BC5E;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* ───────────────────────────
   Pagination Buttons (Reversed Colours + Centered)
──────────────────────────── */
.matchday-grid-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 25px;
	width: 100%;
}

.pagination-buttons {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
}

/* Default button – gold background, maroon text */
.matchday-grid-pagination a,
.matchday-grid-pagination span,
.page-btn,
.page-numbers {
	background-color: #F6BC5E;   /* gold base */
	color: #220b17;              /* dark maroon text */
	padding: 6px 14px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	transition: all 0.2s ease;
	min-width: 36px;
	text-align: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Hover state – lighter gold */
.matchday-grid-pagination a:hover,
.page-btn:hover,
.page-numbers:hover {
	background-color: #ffcf7e;   /* lighter gold */
	color: #220b17;
}

/* Active/current page – maroon background, gold text */
.matchday-grid-pagination .current,
.page-btn.current,
.page-numbers.current {
	background-color: #631832;   /* maroon */
	color: #F6BC5E;              /* gold text */
	cursor: default;
}

/* Dots (...) for truncation */
.page-dots {
	color: #F6BC5E;
	font-size: 16px;
	padding: 0 6px;
	user-select: none;
	opacity: 0.8;
}

/* First/Last emphasis */
.first-page,
.last-page {
	font-weight: 700;
}

/* ───────────────────────────
   NEW Badge Overlay
──────────────────────────── */
.new-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #F6BC5E;           /* bright accent gold-orange */
	color: #220b17;                /* maroon text */
	font-weight: 700;
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
	animation: fadeInBadge 0.4s ease-in-out;
	z-index: 2;
}

.thumb-link {
	position: relative; /* ensure badge is positioned inside */
	display: block;
}

@keyframes fadeInBadge {
	from { opacity: 0; transform: scale(0.8); }
	to   { opacity: 1; transform: scale(1); }
}

