/**
 * Foireann Camogie Results Stylesheet
 * Class names preserved from the pre-2026 plugin for theme compatibility.
 */

.lcr-filter-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 12px;
	margin-bottom: 1em;
	background-color: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
}
.lcr-filter-label {
	font-weight: bold;
	color: #309b35;
	font-size: 14px;
}
.lcr-filter-select {
	flex: 1 1 240px;
	min-width: 240px;
	padding: 8px 10px;
	border: 1px solid #bbb;
	border-radius: 4px;
	background-color: #fff;
	font-size: 14px;
	max-width: 100%;
}
.lcr-filter-submit {
	background-color: #309b35;
	color: #fff;
	border: 0;
	padding: 8px 14px;
	border-radius: 4px;
	cursor: pointer;
}

.lcr-date-header {
	background-color: #309b35;
	color: #fff;
	padding: 12px 8px;
	text-align: center;
	font-size: 18px;
	font-weight: bold;
	margin-bottom: 1em;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lcr-date-group {
	margin-bottom: 2em;
}

.camogieResult {
	margin-bottom: 1em;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	background-color: #fff;
}

.camogieFixture {
	border-left: 3px solid #309b35;
}

.lcr-competition {
	font-weight: bold;
	text-align: center;
	background-color: #f5f5f5;
	padding: 10px;
	border-bottom: 1px solid #ddd;
}

.lcr-broadcast {
	font-weight: normal;
	font-size: 13px;
	color: #444;
	text-transform: uppercase;
	font-style: italic;
}

.lcr-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 2px 8px;
	border-radius: 3px;
	margin: 2px 2px 0 0;
	background-color: #999;
	color: #fff;
}

.lcr-badge-postponed,
.lcr-badge-rescheduled { background-color: #b58900; }
.lcr-badge-abandoned,
.lcr-badge-neverplayed { background-color: #c0392b; }
.lcr-badge-replay { background-color: #309b35; }

.lcr-team-crest {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.lcr-home-crest { margin-right: 5px; }
.lcr-away-crest { margin-left: 5px; }
.lcr-team-crest img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.lcr-teams-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 8px;
	border-bottom: 1px solid #ddd;
}

.lcr-team {
	font-weight: bold;
	font-size: 16px;
	width: 30%;
}
.lcr-home-team { text-align: right; padding-right: 5px; }
.lcr-away-team { text-align: left;  padding-left: 5px; }

.lcr-score {
	font-weight: bold;
	text-align: center;
	width: 15%;
	background-color: gold;
	padding: 8px 4px;
	border-radius: 4px;
	font-size: 18px;
}

.lcr-time {
	font-weight: bold;
	text-align: center;
	width: 30%;
	background-color: #f9f9f9;
	color: #000;
	padding: 8px 4px;
	border-radius: 4px;
	font-size: 18px;
}
.lcr-time a {
	color: #000;
	font-size: 12px;
	font-weight: normal;
	text-decoration: underline;
}

.lcr-meta-container {
	display: flex;
	justify-content: space-between;
	padding: 8px;
	background-color: #fafafa;
}
.lcr-venue, .lcr-referee {
	font-style: italic;
	color: #666;
	font-size: 12px;
	width: 50%;
}
.lcr-venue   { text-align: left; }
.lcr-referee { text-align: right; }

.lcr-error {
	color: #721c24;
	background-color: #f8d7da;
	padding: 10px;
	border-radius: 4px;
	margin-bottom: 1em;
}

.lcr-notice {
	text-align: center;
	font-style: italic;
	color: #666;
	padding: 20px;
	background-color: #f9f9f9;
	border-radius: 4px;
	border: 1px solid #ddd;
}

.lcr-debug {
	margin: 20px 0;
	padding: 15px;
	background-color: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 4px;
}
.lcr-debug textarea {
	width: 100%;
	height: 300px;
	font-family: monospace;
	font-size: 12px;
	border: 1px solid #ddd;
	background-color: #fff;
	padding: 8px;
}

/* --- Mobile layout ------------------------------------------------------ */
/* Goal: one row of [crest | team | V | team | crest], then the time (or
   both scores) on a centred row below. No fixed percentages — the crests
   take their natural width and the team names flex to fill. */

@media screen and (max-width: 640px) {

	.lcr-date-header {
		font-size: 15px;
		padding: 10px 6px;
		margin-bottom: 0.6em;
	}

	.lcr-competition {
		font-size: 14px;
		padding: 8px 10px;
	}

	.lcr-teams-container {
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		row-gap: 8px;
		padding: 12px 8px;
	}

	/* Row 1: crest, team, V, team, crest. Crests keep natural width; the two
	   team names share the remaining space evenly. */
	.lcr-team-crest {
		width: 32px;
		height: 32px;
		flex: 0 0 auto;
		margin: 0;
	}
	.lcr-home-crest { order: 1; }
	.lcr-home-team  { order: 2; flex: 1 1 0; width: auto; text-align: right; padding: 0 8px 0 6px; font-size: 15px; min-width: 0; }
	.lcr-away-team  { order: 3; flex: 1 1 0; width: auto; text-align: left;  padding: 0 6px 0 8px; font-size: 15px; min-width: 0; }
	.lcr-away-crest { order: 4; }

	/* Inject the "V" separator between team names without needing extra markup. */
	.lcr-away-team::before {
		content: "V";
		display: inline-block;
		margin-right: 10px;
		color: #309b35;
		font-weight: 700;
		font-size: 13px;
		letter-spacing: 0.5px;
	}

	/* Row 2: time spans the full width and sits centred. */
	.lcr-time {
		order: 10;
		flex: 0 0 100%;
		width: auto;
		font-size: 18px;
		padding: 8px 6px;
	}

	/* Row 2 (results): both scores centred, side-by-side. The ::after on the
	   container is a zero-height, full-width flex item inserted between the
	   crests (order 4) and the scores (order 10/11), which forces a line break.
	   Scoped to results only via :not(.camogieFixture) so fixtures are
	   untouched — their time element handles its own wrap via flex-basis.
	   NOTE: CSS `order` only accepts integers; fractional values are invalid
	   and silently fall back to 0, which would place the break at the start
	   of the container. Hence the big gap between the crests' orders (1–4)
	   and the row-2 orders (5 for the break, 10/11 for the scores). */
	.camogieResult:not(.camogieFixture) .lcr-teams-container::after {
		content: "";
		order: 5;
		flex-basis: 100%;
		height: 0;
	}
	.lcr-home-score {
		order: 10;
		flex: 0 1 auto;
		width: auto;
		min-width: 72px;
		font-size: 18px;
		padding: 6px 12px;
		margin-right: 6px;
	}
	.lcr-away-score {
		order: 11;
		flex: 0 1 auto;
		width: auto;
		min-width: 72px;
		font-size: 18px;
		padding: 6px 12px;
		margin-left: 6px;
	}

	/* Venue / referee stack full-width underneath. */
	.lcr-meta-container { flex-direction: column; padding: 10px 8px; }
	.lcr-venue, .lcr-referee {
		width: 100%;
		text-align: center;
		padding: 2px 0;
		font-size: 11px;
	}

	/* Filter form breathes a bit more on narrow screens. */
	.lcr-filter-form { padding: 10px; }
	.lcr-filter-select { flex-basis: 100%; min-width: 0; }
}

