/*!
 * Structures generated by the TablePager PHP class
 * in MediaWiki (used e.g. on Special:ListFiles).
 */

/* stylelint-disable selector-class-pattern */

// TablePager uses `.mw-datatable` and is loaded in the right order by RL
.mw-datatable {
	min-width: 80%;

	&-is-sorted a {
		background-position: left center;
		background-repeat: no-repeat;
		padding-left: 15px;
	}

	&-is-ascending a {
		background-image: url( images/arrow-sort-ascending.svg );
	}

	&-is-descending a {
		background-image: url( images/arrow-sort-descending.svg );
	}
}

.TablePager_nav {
	&.oo-ui-buttonGroupWidget {
		display: block;
		margin: 1em;
		text-align: center;
	}

	// Overrule default OOUI frameless special treatment for left-aligned widgets
	& .oo-ui-buttonElement-frameless {
		&.oo-ui-labelElement > .oo-ui-buttonElement-button {
			padding-right: 0.5em;
		}

		&.oo-ui-labelElement.oo-ui-iconElement:first-child {
			margin-left: 0;
		}
	}

	.TablePager-button-next,
	.TablePager-button-last {
		&.oo-ui-buttonElement-frameless.oo-ui-iconElement > .oo-ui-buttonElement-button {
			padding-left: 0.5em;
			padding-right: 2.14285714em;

			> .oo-ui-iconElement-icon {
				left: auto;
				right: 0.35714286em;
			}
		}
	}
}
