/*
 * One stylesheet for every block. Colours derive from the text colour the
 * theme (or the block's own colour settings) provides, so the blocks sit in
 * light and dark themes alike; only the accent is the plugin's own.
 */
.nhrcc {
	--nhrcc-accent: #3858e9;
	--nhrcc-line: rgba(128, 128, 128, 0.25);
	--nhrcc-soft: rgba(128, 128, 128, 0.08);
	--nhrcc-muted: inherit;
	--nhrcc-tint: rgba(56, 88, 233, 0.12);
	--nhrcc-radius: 10px;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25em;
	box-sizing: border-box;
}

@supports (color: color-mix(in srgb, red, blue)) {
	.nhrcc {
		--nhrcc-line: color-mix(in srgb, currentColor 16%, transparent);
		--nhrcc-soft: color-mix(in srgb, currentColor 5%, transparent);
		--nhrcc-muted: color-mix(in srgb, currentColor 68%, transparent);
		--nhrcc-tint: color-mix(in srgb, var(--nhrcc-accent) 13%, transparent);
	}
}

.nhrcc *,
.nhrcc *::before {
	box-sizing: border-box;
}

.nhrcc p,
.nhrcc ol,
.nhrcc ul,
.nhrcc dl,
.nhrcc dd {
	margin: 0;
	padding: 0;
}

.nhrcc ol,
.nhrcc ul {
	list-style: none;
}


.nhrcc-notice {
	padding: 0.75em 1em;
	border: 1px dashed rgba(128, 128, 128, 0.5);
	border-radius: 6px;
	font-size: 0.875em;
}

.nhrcc-title {
	font-weight: 600;
}

.nhrcc-note,
.nhrcc-empty {
	color: var(--nhrcc-muted);
	font-size: 0.875em;
}

/* Contributor header */
.nhrcc-head {
	display: flex;
	align-items: center;
	gap: 0.875em;
}

.nhrcc-head__avatar {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
}

.nhrcc-head__name {
	font-size: 1.125em;
	font-weight: 700;
	line-height: 1.3;
}

.nhrcc-head__name a {
	color: inherit;
	text-decoration: none;
}

.nhrcc-head__name a:hover,
.nhrcc-head__name a:focus {
	text-decoration: underline;
}

.nhrcc-head__user,
.nhrcc-head__text {
	color: var(--nhrcc-muted);
	font-size: 0.875em;
	font-weight: 400;
}

/* Chips */
.nhrcc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.nhrcc-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.2em 0.7em;
	border-radius: 999px;
	background: var(--nhrcc-tint);
	font-size: 0.8125em;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
}

.nhrcc-chip a {
	color: inherit;
	text-decoration: none;
}

.nhrcc-chip a:hover,
.nhrcc-chip a:focus {
	text-decoration: underline;
}

.nhrcc-chip__count {
	color: var(--nhrcc-muted);
	font-weight: 400;
}

/* Contributions list */
.nhrcc-items {
	display: grid;
	gap: 0.625em;
}

.nhrcc-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em 0.75em;
	padding: 0.85em 1em;
	border: 1px solid var(--nhrcc-line);
	border-radius: var(--nhrcc-radius);
	background: var(--nhrcc-soft);
}

.nhrcc-item__title {
	flex: 1 1 16em;
	font-weight: 500;
	text-decoration: none;
}

.nhrcc-item__title:hover,
.nhrcc-item__title:focus {
	text-decoration: underline;
}

.nhrcc-item__meta {
	color: var(--nhrcc-muted);
	font-size: 0.8125em;
	font-variant-numeric: tabular-nums;
}

.is-style-minimal .nhrcc-items {
	gap: 0;
}

.is-style-minimal .nhrcc-item {
	padding: 0.75em 0;
	border: 0;
	border-bottom: 1px solid var(--nhrcc-line);
	border-radius: 0;
	background: none;
}

.is-style-timeline .nhrcc-items {
	gap: 0;
	margin-inline-start: 0.4em;
	border-inline-start: 2px solid var(--nhrcc-line);
}

.is-style-timeline .nhrcc-item {
	position: relative;
	padding: 0.6em 0 0.6em 1.4em;
	border: 0;
	border-radius: 0;
	background: none;
}

.is-style-timeline .nhrcc-item::before {
	content: "";
	position: absolute;
	top: 1.15em;
	left: -6px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--nhrcc-accent);
}

/* Pagination */
.nhrcc-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.375em;
}

.nhrcc-pagination .page-numbers {
	min-width: 2.4em;
	padding: 0.35em 0.7em;
	border: 1px solid var(--nhrcc-line);
	border-radius: 8px;
	font-size: 0.875em;
	font-variant-numeric: tabular-nums;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
}

.nhrcc-pagination a.page-numbers:hover,
.nhrcc-pagination a.page-numbers:focus {
	border-color: var(--nhrcc-accent);
}

.nhrcc-pagination .page-numbers.current {
	border-color: var(--nhrcc-accent);
	background: var(--nhrcc-accent);
	color: #fff;
	font-weight: 600;
}

.nhrcc-pagination .page-numbers.dots {
	border-color: transparent;
}

.nhrcc-pagination + .nhrcc-note {
	margin-top: -0.5em;
	text-align: center;
}

/* Number tiles */
.nhrcc-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(6.5em, 1fr));
	gap: 0.75em;
}

.nhrcc-tile {
	display: flex;
	flex-direction: column-reverse;
	gap: 0.15em;
	padding: 1em 1.1em;
	border: 1px solid var(--nhrcc-line);
	border-radius: var(--nhrcc-radius);
	background: var(--nhrcc-soft);
}

.nhrcc-tile__value {
	color: var(--nhrcc-accent);
	font-size: 1.75em;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1.15;
}

.nhrcc-tile__label {
	color: var(--nhrcc-muted);
	font-size: 0.8125em;
}

/* Contributor card */
.nhrcc-card {
	padding: 1.5em;
	border: 1px solid var(--nhrcc-line);
	border-radius: calc(var(--nhrcc-radius) + 4px);
}

.nhrcc-card .nhrcc-tiles {
	grid-template-columns: repeat(auto-fit, minmax(5.5em, 1fr));
}

.nhrcc-card .nhrcc-tile {
	padding: 0.85em 0.9em;
}

/* Activity chart */
.nhrcc-chart {
	display: flex;
	align-items: flex-end;
	gap: 0.5em;
	height: 13em;
	overflow-x: auto;
}

.nhrcc-chart__col {
	display: flex;
	flex: 1 0 2.2em;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 0.25em;
	height: 100%;
}

.nhrcc-chart__value,
.nhrcc-chart__label {
	color: var(--nhrcc-muted);
	font-size: 0.75em;
	font-variant-numeric: tabular-nums;
	line-height: 1.4;
}

/* The bar's share of the column, less the two text lines above and below it. */
.nhrcc-chart__bar {
	flex: none;
	width: 100%;
	max-width: 3em;
	height: calc((100% - 2.8em) * var(--nhrcc-share, 0));
	min-height: 2px;
	border-radius: 6px 6px 0 0;
	background: var(--nhrcc-accent);
}

/* Plugins and themes */
.nhrcc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(17em, 1fr));
	gap: 0.875em;
}

.nhrcc-entry {
	display: flex;
	gap: 0.875em;
	padding: 1em;
	border: 1px solid var(--nhrcc-line);
	border-radius: var(--nhrcc-radius);
	background: var(--nhrcc-soft);
}

.nhrcc-entry--themes {
	flex-direction: column;
}

.nhrcc-entry__image {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	object-fit: cover;
}

.nhrcc-entry--themes .nhrcc-entry__image {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
}

.nhrcc-entry__body {
	display: grid;
	gap: 0.3em;
	align-content: start;
	min-width: 0;
}

.nhrcc-entry__name {
	font-weight: 600;
	text-decoration: none;
}

.nhrcc-entry__name:hover,
.nhrcc-entry__name:focus {
	text-decoration: underline;
}

.nhrcc-entry__text {
	font-size: 0.875em;
}
