/* Taallem Global: what the world pages add to pays.css (the globe, the counters, the sites, the sources wall, the filters). */

.gl-filter {
	display: grid;
	gap: 0.5rem;
	margin: 0 0 1rem;
	max-width: 46rem;
}

.gl-filter label {
	font-size: 0.85rem;
	color: var(--muted);
}

.gl-select,
.gl-input {
	min-height: 44px;
	width: 100%;
	padding: 0.5rem 0.85rem;
	border: 1px solid var(--line-2);
	border-radius: 12px;
	background: var(--field);
	color: var(--ink);
	font: inherit;
}

.gl-select:focus-visible,
.gl-input:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.gl-select option {
	background: var(--surface);
	color: var(--ink);
}

.gl-calls {
	margin-top: 0.5rem;
}

.gl-tenders [hidden],
.gl-wall-box [hidden] {
	display: none !important;
}

.gl-table .rent-city {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
}

/* ---------- the globe ---------- */

.gl-stage {
	position: relative;
	width: 100%;
	max-width: 640px;
	margin: 1.25rem auto 0.75rem;
	aspect-ratio: 1000 / 400;
}

.gl-stage:has(canvas:not([hidden])) {
	aspect-ratio: 1 / 1;
}

.gl-map {
	width: 100%;
	height: 100%;
	display: block;
}

.gl-map svg {
	width: 100%;
	height: 100%;
	display: block;
}

.gl-map-hidden {
	display: none;
}

.gl-land {
	fill: var(--line-2);
	stroke: none;
}

.gl-dot {
	fill: var(--accent);
	stroke: var(--ink);
	stroke-width: 1.2;
}

.gl-dot-region {
	fill: none;
	stroke: var(--orange);
	stroke-width: 2.2;
}

.gl-map a:focus-visible .gl-dot,
.gl-map a:hover .gl-dot {
	stroke-width: 3;
}

.gl-canvas {
	display: block;
	margin: 0 auto;
	touch-action: pan-y;
	cursor: grab;
	max-width: 100%;
}

.gl-tip {
	position: absolute;
	z-index: 2;
	display: grid;
	gap: 0.15rem;
	width: 210px;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--line-2);
	border-radius: 12px;
	background: var(--surface);
	color: var(--ink);
	font-size: 0.85rem;
	box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
	pointer-events: none;
}

.gl-tip a {
	color: var(--accent);
}

.gl-canvas[hidden],
.gl-tip[hidden] {
	display: none;
}

.gl-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.25rem;
	margin: 0 0 0.5rem;
	padding: 0;
	list-style: none;
	font-size: 0.85rem;
	color: var(--muted);
}

.gl-legend i {
	display: inline-block;
	width: 0.8rem;
	height: 0.8rem;
	margin-inline-end: 0.4rem;
	border-radius: 50%;
	vertical-align: -1px;
}

.gl-legend .site i {
	background: var(--accent);
}

.gl-legend .region i {
	border: 2px solid var(--orange);
}

.gl-credit {
	text-align: center;
	font-size: 0.8rem;
	color: var(--muted);
}

/* ---------- counters ---------- */

.gl-counters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0 0.5rem;
}

.gl-counter {
	padding: 1rem 1.1rem;
	border: 1px solid var(--line-2);
	border-radius: var(--radius);
	background: var(--surface);
}

.gl-counter dd {
	margin: 0 0 0.25rem;
	font-family: var(--serif);
	font-size: clamp(1.7rem, 4vw, 2.4rem);
	line-height: 1.1;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.gl-counter dt {
	font-size: 0.85rem;
	color: var(--muted);
}

.gl-counter .live-dot {
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	margin-inline-end: 0.4rem;
	border-radius: 50%;
	background: var(--green);
}

/* ---------- the list of sites ---------- */

.gl-sites {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 0.6rem;
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
}

.gl-sites a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.55rem 0.85rem;
	border: 1px solid var(--line-2);
	border-radius: 12px;
	color: var(--ink);
	text-decoration: none;
	background: var(--surface);
}

.gl-sites a:hover,
.gl-sites a:focus-visible {
	border-color: var(--accent);
}

.gl-sites .code {
	font-size: 0.75rem;
	color: var(--muted);
}

/* ---------- the sources wall ---------- */

.gl-wall-controls {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.75rem;
	margin: 0 0 0.75rem;
}

.gl-wall-controls .gl-filter {
	margin: 0;
	max-width: none;
}

.gl-wall-controls .gl-search {
	grid-column: 1 / -1;
}

.gl-verdicts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	grid-column: 1 / -1;
}

.gl-verdicts button {
	min-height: 40px;
	padding: 0.3rem 0.9rem;
	border: 1px solid var(--line-2);
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-size: 0.85rem;
	cursor: pointer;
}

.gl-verdicts button[aria-pressed='true'] {
	border-color: var(--accent);
	background: var(--field);
}

.gl-wall-count {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	color: var(--muted);
}

.gl-wall {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	gap: 0.85rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-tile {
	display: grid;
	align-content: start;
	gap: 0.45rem;
	padding: 0.95rem 1rem;
	border: 1px solid var(--line-2);
	border-radius: var(--radius);
	background: var(--surface);
	font-size: 0.88rem;
	color: var(--body);
	overflow-wrap: anywhere;
}

.gl-tile h3 {
	margin: 0;
	font-size: 1rem;
	color: var(--ink);
}

.gl-tile[data-verdict='utilisable'] {
	border-inline-start: 4px solid var(--green);
}

.gl-tile[data-verdict='lien'] {
	border-inline-start: 4px solid var(--blue);
}

.gl-tile[data-verdict='exclu'] {
	border-inline-start: 4px solid var(--orange);
}

.gl-tile[data-verdict='nontest'] {
	border-inline-start: 4px solid var(--muted);
}

.gl-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-badges li {
	padding: 0.1rem 0.55rem;
	border: 1px solid var(--line-2);
	border-radius: 999px;
	font-size: 0.75rem;
	color: var(--muted);
}

.gl-badges .verdict {
	color: var(--ink);
}

.gl-tile p {
	margin: 0;
}

.gl-tile .gl-quote {
	font-size: 0.8rem;
	color: var(--muted);
}

.gl-tile .gl-used {
	color: var(--green);
	font-size: 0.8rem;
}

.gl-tile details summary {
	cursor: pointer;
	color: var(--accent);
	font-size: 0.8rem;
}

.gl-tile .text-link {
	justify-self: start;
}

@media (prefers-reduced-motion: reduce) {
	.gl-counter dd {
		transition: none;
	}
}
