/*
 * Tableaux triables (style de bloc « Triable », voir inc/sortable-table.php et assets/js/sortable-table.js).
 */

/* En-tête collé à la fenêtre : le bloc ne doit pas être un conteneur de défilement, et le tableau (overflow:hidden dans style.css) non plus.
   overflow:clip garde les coins arrondis sans créer de conteneur de défilement. */
.wp-block-table.is-style-triable {
	overflow: visible;
}
.wp-block-table.is-style-triable:not(.gamepass_array) table {
	width: 100%;
	overflow: clip;
}
.wp-block-table.is-style-triable thead th {
	position: sticky;
	top: var(--xbx-sticky-top, 0);
	z-index: 2;
	background: var(--dark);
}
body.lighttheme .wp-block-table.is-style-triable thead th {
	background: var(--lighttheme_bg);
}

/* titres d'en-tête = boutons */
.xbx-sort-btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: inherit;
	cursor: pointer;
}
.is-style-triable th.has-text-align-center .xbx-sort-btn {
	justify-content: center;
}
.is-style-triable th.has-text-align-right .xbx-sort-btn {
	justify-content: flex-end;
}
.xbx-sort-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
	border-radius: 4px;
}
.xbx-sort-ind {
	flex: none;
	font-size: 0.75em;
	line-height: 1;
}
.xbx-sort-ind::before {
	content: "\2195";
	opacity: 0.45;
}
.is-style-triable th[aria-sort="ascending"] .xbx-sort-ind::before {
	content: "\25B2";
	opacity: 1;
}
.is-style-triable th[aria-sort="descending"] .xbx-sort-ind::before {
	content: "\25BC";
	opacity: 1;
}

/* recherche */
.xbx-table-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin: 0 0 1rem;
}
.xbx-table-search {
	flex: 1 1 16rem;
	max-width: 24rem;
	margin: 0;
	padding: 0.65rem 1rem;
	border: 0;
	border-radius: 20px;
	background: var(--cgrey);
	color: #fff;
	font-size: 14px;
}
.xbx-table-search::placeholder {
	color: var(--greylight);
	opacity: 1;
}
.xbx-table-search:focus-visible {
	outline: 2px solid var(--cpost);
	outline-offset: 2px;
}
.xbx-table-count {
	font-size: 14px;
	opacity: 0.85;
}
.xbx-table-empty {
	margin: 1rem 0;
	text-align: center;
}
.is-style-triable tbody tr[hidden] {
	display: none;
}

/* texte réservé aux lecteurs d'écran */
.xbx-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
