/* Public calendar report styles, loaded independently of the coach app. */
.junior-match-stats {
	--junior-stat-home: #7c3fb3;
	--junior-stat-away: #f3cb57;
}

.urfc-junior-score-display {
	display: grid;
	justify-items: center;
	gap: .65rem;
	margin-block: 0 1.5rem;
	text-align: center;
}

.urfc-junior-score-display .junior-score-line {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: clamp(1.75rem, 7vw, 2.75rem);
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.urfc-junior-score-display .junior-score-badge {
	padding: .4em .3em;
	min-width: 2.05em;
	border-radius: .25em;
	font-weight: 750;
	background: #303640;
	color: #fff;
}

.urfc-junior-score-display .junior-score-divider { color: #626974; font-size: .65em; }
.urfc-junior-score-display .junior-score-teams {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: start;
	gap: .5rem;
	width: 100%;
	font-size: clamp(1rem, 4vw, 1.35rem);
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.urfc-junior-score-display .junior-score-teams > :first-child { text-align: end; }
.urfc-junior-score-display .junior-score-teams > :last-child { text-align: start; }
.urfc-junior-score-display .junior-score-versus { font-weight: 400; }

.junior-match-stats :is(dl, dd) { margin: 0; }
.junior-match-stats .junior-stat-teams,
.junior-match-stats .junior-stat-values {
	display: flex;
	justify-content: space-between;
	gap: .75rem;
}

.junior-match-stats .junior-stat-teams { font-weight: 700; }
.junior-match-stats .junior-stat-teams span:last-child { text-align: right; }
.junior-match-stats .junior-stat-teams span::before {
	content: "";
	display: inline-block;
	width: .65em;
	height: .65em;
	margin-inline-end: .35em;
	border-radius: 50%;
	background: var(--junior-stat-home);
}

.junior-match-stats .junior-stat-teams span:last-child::before { background: var(--junior-stat-away); }
.junior-match-stats .junior-stat { margin-block: .65rem; }
.junior-match-stats dt { text-align: center; }
.junior-match-stats .junior-stat-values { font-variant-numeric: tabular-nums; font-weight: 650; }

.junior-match-stats .junior-stat-team-name {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.junior-match-stats progress {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: .65rem;
	margin-block-start: .25rem;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 999px;
	background: var(--junior-stat-away);
}

.junior-match-stats progress::-webkit-progress-bar {
	height: 100%;
	background: var(--junior-stat-away);
}

.junior-match-stats progress::-webkit-progress-value {
	height: 100%;
	background: var(--junior-stat-home);
}

.junior-match-stats progress::-moz-progress-bar {
	height: 100%;
	background: var(--junior-stat-home);
}

.junior-match-notes {
	margin-block-start: 1.5rem;
	padding-block-start: 1rem;
	border-block-start: 1px solid #e1d8e9;
}

.junior-match-gallery {
	margin-block-start: 1.5rem;
}

.junior-match-gallery > div {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(8rem, 100%), 1fr));
	gap: .75rem;
}

.junior-match-gallery img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: .4rem;
}

.junior-match-timeline { margin-block-start: 1.5rem; }
.junior-match-timeline summary { cursor: pointer; font-weight: 700; padding-block: .5rem; }
.junior-match-timeline ol { list-style: none; padding: 0; margin: .75rem 0 0; position: relative; isolation: isolate; }
.junior-match-timeline ol::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset-block: .5rem;
	inset-inline-start: 50%;
	transform: translateX(-50%);
	border-inline-start: 2px solid #d9e1ea;
}

.junior-match-timeline li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 3.8rem minmax(0, 1fr);
	gap: .55rem;
	align-items: start;
	margin-block: .65rem;
}

.junior-match-timeline .junior-timeline-marker {
	position: relative;
	grid-column: 2;
	grid-row: 1;
	justify-self: center;
	margin-block-start: .65rem;
	padding: .2rem .35rem;
	border-radius: 999px;
	background: #2563eb;
	color: white;
	font: 700 .68rem/1.25 system-ui, sans-serif;
	white-space: nowrap;
}

.junior-match-timeline li[data-side="match"] .junior-timeline-marker {
	width: .85rem;
	height: .85rem;
	padding: 0;
	background: #0f766e;
}

.junior-match-timeline li[data-marker="major"] .junior-timeline-marker { background: #d97706; }
.junior-match-timeline li:is([data-marker="yellow-card"], [data-marker="red-card"]) .junior-timeline-marker {
	width: .85rem;
	height: 1.2rem;
	padding: 0;
	border-radius: .15rem;
	background: #facc15;
}
.junior-match-timeline li[data-marker="red-card"] .junior-timeline-marker { background: #dc2626; }

.junior-match-timeline li p {
	position: relative;
	grid-row: 1;
	min-width: 0;
	overflow-wrap: anywhere;
	margin: 0;
	padding: .5rem .65rem;
	border: 2px solid #452365;
	border-radius: .65rem;
	background: #fff;
	color: #28163b;
}

.junior-match-timeline li[data-side="home"] p { grid-column: 1; text-align: end; }
.junior-match-timeline li[data-side="away"] p { grid-column: 3; background: #f8fbff; border-color: #53667a; }
.junior-match-timeline li[data-side="match"] p {
	grid-column: 1 / -1;
	grid-row: 2;
	justify-self: center;
	border-color: #0f766e;
	text-align: center;
}
.junior-match-timeline li[data-marker="major"] p { background: #fff7ed; border-color: #d97706; font-weight: 700; }
.junior-match-timeline li strong { font-variant-numeric: tabular-nums; margin-inline-end: .25rem; }
