/* Flag Manager – public. Colours follow the existing americanflagrescue.org cards; override in the theme if needed. */
.gffm-flags,
.gffm-locations,
.gffm-stats {
	--gffm-border: #d8d0c3;
	--gffm-muted: #6f6a63;
	--gffm-caption-bg: #f6f3ee;
	--gffm-badge-bg: #dcf6e4;
	--gffm-badge-text: #2e8b3e;
	--gffm-gap: 40px;
}

/* Filters */
.gffm-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 24px; }
.gffm-filters select { min-width: 160px; padding: 6px 8px; }
.gffm-filters button { padding: 7px 16px; cursor: pointer; }

/* Flag cards */
.gffm-flags__grid {
	display: grid;
	grid-template-columns: repeat(var(--gffm-cols, 3), minmax(0, 1fr));
	gap: var(--gffm-gap);
}
.gffm-card { border: 1px solid var(--gffm-border); background: #fff; }
.gffm-card__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gffm-card__photo { margin: 0; }
.gffm-card__photo img,
.gffm-card__placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}
.gffm-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eee9e1;
	color: var(--gffm-muted);
	font-size: 14px;
}
.gffm-card__photo figcaption {
	background: var(--gffm-caption-bg);
	text-align: center;
	padding: 8px 4px;
	color: var(--gffm-muted);
}
.gffm-card__body { padding: 30px 20px 24px; color: var(--gffm-muted); line-height: 1.75; }
.gffm-card__title { margin: 0; font-size: 1em; font-weight: 700; color: inherit; }

/* Pagination */
.gffm-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 32px; }
.gffm-pagination a,
.gffm-pagination span { padding: 4px 11px; border: 1px solid var(--gffm-border); text-decoration: none; }
.gffm-pagination .current { background: var(--gffm-caption-bg); font-weight: 700; }

/* Locations list */
.gffm-locations__count { color: var(--gffm-muted); margin: 0 0 28px; }
.gffm-locations__grid {
	display: grid;
	grid-template-columns: repeat(var(--gffm-cols, 3), minmax(0, 1fr));
	gap: 16px;
}
.gffm-location {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 18px 16px;
	border: 1px solid var(--gffm-border);
	background: #fff;
	color: inherit;
	text-decoration: none;
}
a.gffm-location:hover { border-color: var(--gffm-badge-text); }
.gffm-location__count {
	flex-shrink: 0;
	padding: 1px 10px;
	border-radius: 10px;
	background: var(--gffm-badge-bg);
	color: var(--gffm-badge-text);
	font-size: 12px;
}

/* Stats */
.gffm-stats {
	--gffm-stat-impacted: #b22234;
	--gffm-stat-rescued: #1e9e4a;
	--gffm-stat-states: #2563eb;
	--gffm-stat-cities: #d97706;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px 24px;
	text-align: center;
	padding: 24px 0;
}
.gffm-stat { display: flex; flex-direction: column; align-items: center; }
.gffm-stat__icon { width: 24px; height: 24px; margin-bottom: 14px; }
.gffm-stat__number {
	display: block;
	font-family: var(--gffm-stat-font, "Playfair Display", Georgia, "Times New Roman", serif);
	font-variant-numeric: oldstyle-nums;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.1;
	margin-bottom: 10px;
}
.gffm-stat__label { display: block; color: #5f6368; font-size: 15px; }
.gffm-stat--impacted { color: var(--gffm-stat-impacted); }
.gffm-stat--rescued  { color: var(--gffm-stat-rescued); }
.gffm-stat--states   { color: var(--gffm-stat-states); }
.gffm-stat--cities   { color: var(--gffm-stat-cities); }

/* Patriot Sticker cards */
.gffm-winners {
	display: grid;
	grid-template-columns: repeat(var(--gffm-cols, 5), minmax(0, 1fr));
	gap: 16px;
	align-items: start;
}
.gffm-winner { background: #f7f5f0; border: 1px solid #d8d0c3; color: #5f6368; }
.gffm-winner__photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gffm-winner__body { padding: 16px 16px 18px; font-size: 13px; line-height: 1.6; }
.gffm-winner__name {
	margin: 0 0 6px;
	font-family: var(--gffm-stat-font, "Playfair Display", Georgia, "Times New Roman", serif);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: #14213d;
}
.gffm-winner__stars { color: #f5b301; letter-spacing: 2px; font-size: 16px; margin-bottom: 10px; }
.gffm-winner p { margin: 0; }
.gffm-winner__number strong,
.gffm-winner__prize strong { color: #3c4043; }
.gffm-winner__date { margin-top: 12px !important; }

@media (max-width: 900px) {
	.gffm-winners { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.gffm-flags__grid,
	.gffm-locations__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gffm-flags { --gffm-gap: 24px; }
}
@media (max-width: 700px) {
	.gffm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.gffm-winners { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gffm-flags__grid,
	.gffm-locations__grid { grid-template-columns: 1fr; }
}
