
// NOTE The styling for row selection is part of the core DataTables stylesheet

// Selection colour
$selected-background-color: rgba(13, 110, 253, 0.9) !default;
$selected-text-color: white;

// Checkbox absolute positioning correction
$checkbox-margin-top: -6px !default;

table.dataTable {
	> tbody > tr > .selected {
		background-color: $selected-background-color;
		color: $selected-text-color;
	}

	tbody td.select-checkbox,
	tbody th.select-checkbox {
		position: relative;

		&:before,
		&:after {
			display: block;
			position: absolute;
			top: 1.2em; // Should be 50% but IE doesn't like it
			left: 50%;
			width: 12px;
			height: 12px;
			box-sizing: border-box;
		}

		&:before {
			content: ' ';
			margin-top: $checkbox-margin-top;
			margin-left: -6px;
			border: 1px solid black;
			border-radius: 3px;
		}
	}

	tr.selected {
		td.select-checkbox,
		th.select-checkbox {
			&:before {
				border: 1px solid $selected-text-color;
			}

			&:after {
				content: '\2713';
				font-size: 20px;

				margin-top: -19px;
				margin-left: -6px;

				text-align: center;
				text-shadow:
					1px 1px #B0BED9,
					-1px -1px #B0BED9,
					1px -1px #B0BED9,
					-1px 1px #B0BED9;
			}
		}
	}

	&.compact {
		tbody td.select-checkbox,
		tbody th.select-checkbox {
			&:before {
				margin-top: -12px;
			}
		}

		tr.selected {
			td.select-checkbox,
			th.select-checkbox {
				&:after {
					margin-top: -16px;
				}
			}
		}
	}
}

div.dataTables_wrapper {
	span.select-info,
	span.select-item {
		margin-left: 0.5em;
	}
}

@media screen and (max-width: 640px) {
	div.dataTables_wrapper {
		span.select-info,
		span.select-item {
			margin-left: 0;
			display: block;
		}
	}
}
