@layer reset, tokens, base, components, project, utilities;

@layer project {
	.project-page--wereldbevolking {
		display: grid;
		gap: 1rem;
		color: var(--ink);
	}

	.project-page--wereldbevolking :where(.world-population-panel, .world-population-highlight) {
		display: grid;
		gap: 0.9rem;
	}

	.project-page--wereldbevolking .world-population-panel {
		padding: 1rem;
		background: var(--surface-raised);
	}

	.project-page--wereldbevolking .world-population-panel :where(h1, h2, p) {
		margin: 0;
	}

	.project-page--wereldbevolking :where(.world-population-toolbar, .world-population-visibility, .world-population-comparison, .world-population-continents, .world-population-legend) {
		display: flex;
		flex-wrap: wrap;
		gap: 0.75rem;
		align-items: center;
	}

	.project-page--wereldbevolking :where(.world-population-metric, .world-population-scale) {
		display: inline-grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	:root:not([data-theme="light"]) .project-page--wereldbevolking .project-segmented > button.is-active {
		border-color: #d33;
		background: linear-gradient(180deg, #d33, #800);
		color: #fff;
	}

	.project-page--wereldbevolking :where(.world-population-field, .world-population-slider) {
		display: grid;
		gap: 0.35rem;
		flex: 1 1 var(--field-size, 18rem);
	}

	.project-page--wereldbevolking .world-population-slider {
		--field-size: 14rem;
	}

	.project-page--wereldbevolking .world-population-comparison.is-disabled {
		cursor: help;
		opacity: 0.7;
	}

	.project-page--wereldbevolking .world-population-chip {
		display: inline-flex;
		align-items: stretch;
		border: 1px solid var(--line);
		border-radius: 999px;
		background: var(--surface-raised);
		color: var(--ink);
		overflow: clip;
	}

	.project-page--wereldbevolking .world-population-chip.is-selected {
		border-color: var(--accent);
		background: color-mix(in srgb, var(--accent) 16%, var(--surface-raised));
		box-shadow: inset 0 0 0 1px var(--accent);
		font-weight: 700;
	}

	.project-page--wereldbevolking .world-population-chip-swatch {
		flex: 0 0 auto;
		width: 0.8rem;
		height: 0.8rem;
		border-radius: 999px;
	}

	.project-page--wereldbevolking :where(.world-population-chip-label, .world-population-chip-remove) {
		border: 0;
		background: transparent;
		color: inherit;
		font: inherit;
	}

	.project-page--wereldbevolking .world-population-chip-label {
		display: inline-flex;
		gap: 0.55rem;
		align-items: center;
		padding: 0.35rem 0.35rem 0.35rem 0.7rem;
		cursor: pointer;
	}

	.project-page--wereldbevolking .world-population-chip-remove {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 2rem;
		border-inline-start: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
		padding: 0 0.6rem 0 0.35rem;
		cursor: pointer;
		font-size: 0.95rem;
		line-height: 1;
	}

	.project-page--wereldbevolking :where(.world-population-chip-remove, .world-population-chip-label):hover {
		background: color-mix(in srgb, var(--accent) 18%, transparent);
	}

	.project-page--wereldbevolking .world-population-continents button.is-active {
		background: var(--continent-button-bg, color-mix(in srgb, var(--accent) 24%, var(--surface-raised)));
		box-shadow: inset 0 0 0 1px var(--accent);
		color: var(--continent-button-fg, var(--ink));
	}

	:root:not([data-theme="light"]) .project-page--wereldbevolking .world-population-continents button.is-active {
		filter: saturate(1.35) brightness(1.45);
	}

	.project-page--wereldbevolking .world-population-stage {
		position: relative;
		padding: 0.75rem;
		background: var(--surface-raised);
	}

	.project-page--wereldbevolking #world-population-chart {
		width: 100%;
		min-height: 34rem;
	}

	.project-page--wereldbevolking .world-population-tooltip {
		display: none;
		max-width: 16rem;
		border-color: var(--accent);
		color: var(--saga-ink);
		font-size: 0.9rem;
		line-height: 1.4;
	}

	:root[data-theme="light"] .project-page--wereldbevolking .world-population-tooltip {
		color: var(--ink);
	}

	.project-page--wereldbevolking .world-population-tooltip strong {
		display: block;
		margin-bottom: 0.2rem;
		color: var(--muted);
	}

	.project-page--wereldbevolking .world-population-note {
		font-size: 0.92rem;
	}

	@media (width <= 719px) {
		.project-page--wereldbevolking #world-population-chart {
			min-height: 26rem;
		}
	}
}
