*:has(> table[jq_table_sorter]),
*:has(> table.tablesorter-ketek) {
	position: relative;

	&.table-responsive {
		scrollbar-width: thin;
		overflow: auto;
		max-width: 100%;
	}
}

table[jq_table_sorter],
table.tablesorter-ketek {
	background-color: #ffffff;
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border-color: #cccccc;
	border-style: solid;
	border-width: 0;
	text-align: start;

	:is(.header, .tablesorter-header) {
		background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
		background-repeat: no-repeat;
		background-position: center left 4px;
		padding: 8px;
		padding-left: 24px;
		cursor: pointer;
		white-space: normal;
		color: #000;
		vertical-align: middle;
	}

	& > thead {
		:is(.headerSortUp, .tablesorter-headerAsc, .tablesorter-headerSortUp) {
			background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
			border-bottom: #888 1px solid;
		}

		:is(.headerSortDown, .tablesorter-headerDesc, .tablesorter-headerSortDown) {
			background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
			border-bottom: #888 1px solid;
		}

		:is(.sorter-false, .sorter-false:last-child) {
			background-image: none;
			cursor: default;
			padding: 8px;
		}

		.tablesorter-filter-row {
			background-color: #eee;

			td {
				border-bottom: #ccc 1px solid;
				line-height: normal;
				text-align: center;
				-webkit-transition: line-height .1s ease;
				-moz-transition: line-height .1s ease;
				-o-transition: line-height .1s ease;
				transition: line-height .1s ease;

				input.tablesorter-filter,
				select.tablesorter-filter {
					width: 100%;
					background-color: #fff;
					border: 1px solid #bbb;
					color: #333;
					-webkit-box-sizing: border-box;
					-moz-box-sizing: border-box;
					box-sizing: border-box;
					-webkit-transition: height .1s ease;
					-moz-transition: height .1s ease;
					-o-transition: height .1s ease;
					transition: height .1s ease;
					height: 2rem;

					&::placeholder {
						color: gray;
						font-style: italic;
						opacity: 0.75;
					}

					&:focus {
						box-shadow: none !important;
					}
				}

				select.tablesorter-filter {
					background-position: right 0.25rem center;
					padding-right: 1.25rem;
				}

				.tablesorter-filter {
					&.tablesorter-filter-placeholder {
						font-style: italic;
						opacity: 0.75;
						color: gray;
					}

					option {
						&.tablesorter-option-placeholder {
							font-style: italic;
							opacity: 0.75;
							color: gray;
						}

						&:not(.tablesorter-option-placeholder) {
							font-style: normal;
							opacity: 1;
							color: black;
						}
					}
				}
			}

			.disabled {
				opacity: 0.5;
				cursor: not-allowed;
			}

			&.hideme {
				td {
					padding: 2px;
					margin: 0;
					line-height: 0;
					cursor: pointer;
				}

				* {
					height: 1px;
					min-height: 0;
					border: 0;
					padding: 0;
					margin: 0;
					opacity: 0;
				}
			}
		}
	}

	& > tbody {
		& > tr {

			&.even:hover > td,
			&.hover > td,
			&.odd:hover > td,
			&:hover > td {
				background-color: #fff;
				color: #000;
			}

			&.odd {
				& > td {
					background-color: #f0f0f0;

					&.primary {
						background-color: #bfbfbf;
					}

					&.secondary {
						background-color: #d9d9d9;
					}

					&.tertiary {
						background-color: #e6e6e6;
					}
				}
			}

			&.even {
				& > td {
					background-color: #f8f8f8;

					&.primary {
						background-color: #d9d9d9;
					}

					&.secondary {
						background-color: #e6e6e6;
					}

					&.tertiary {
						background-color: #f2f2f2;
					}
				}
			}

			td {
				&.primary {
					background-color: #d9d9d9;
				}

				&.secondary {
					background-color: #e6e6e6;
				}

				&.tertiary {
					background-color: #f2f2f2;
				}
			}
		}
	}

	& > tfoot {
		:is(td, th) {
			border: 0;
		}

		:is(.tablesorter-headerAsc, .tablesorter-headerDesc, .tablesorter-headerSortDown, .tablesorter-headerSortUp) {
			border-top: #888 2px solid;
		}
	}

	.tablesorter-processing {
		background-position: center center !important;
		background-repeat: no-repeat !important;
		background-image: url(data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=) !important;
	}

	& > caption {
		background-color: #fff;
	}

	:is(thead, tbody) {
		:is(th, td) {
			padding: 0.25rem;
			align-content: start;
			text-align: -webkit-match-parent;
			border-color: inherit;
			border-style: solid;
			border-width: 0 1px 1px 0;
		}

		:is(th, td):first-child {
			border-left-width: 1px;
		}


		&:is(tbody) {
			tr:hover {
				:is(th, td) {
					background-color: #f5f5f5;
				}
			}
		}
	}

	:is(thead, tbody):first-child {
		tr:first-child {
			:is(th, td) {
				border-top-width: 1px;
			}
		}

		th {
			white-space: nowrap;
			text-transform: initial;
			font-variant: petite-caps;
			align-content: center;
		}
	}

	.tablesorter-errorRow {
		td {
			text-align: center;
			cursor: pointer;
			background-color: #e6bf99;
		}
	}

	.filtered {
		display: none;
	}
}
