tbody,
td,
tfoot,
th,
thead,
tr {
	border: 0 solid;
	border-color: inherit;
}

.table {
	vertical-align: top;
	width: 100%;
	border-spacing: 0;

	thead {
		vertical-align: bottom;
		position: relative;
		z-index: 0;
		transform: translateZ(0);

		@supports (-webkit-touch-callout: none) {
			&::before {
				bottom: auto;
			}
		}

		tr {
			background-color: var(--transp-05);

			th {
				border-top: 0;
				color: var(--text-400);
				font-weight: 600;
				vertical-align: baseline;
				padding: 0.75em 1em;
				position: relative;
				@include transition();

				.table-th {
					display: flex;
					align-items: center;
					gap: 0.5rem;
					flex-direction: row;
					font-size: var(--small);
				}

				&:first-child {
					padding-left: 2rem;
				}

				&.sortable {
					cursor: pointer;

					&:hover {
						color: var(--text);
					}

					.sort-icon {
						display: inline-flex;
					}
				}
			}
		}
	}

	tbody {
		vertical-align: inherit;

		tr {
			td {
				border-top: 0;
				font-size: var(--p-small);
				padding: 1rem;
				vertical-align: middle;

				&:first-child {
					padding-left: 1.5rem !important;
				}
			}
		}
	}

	tbody {
		tr {
			> td {
				border-bottom: 1px solid var(--transp-1);
				padding: 8px 15px;
			}

			&:last-of-type > td {
				border-bottom: 0;
			}
		}
	}

	&__pagination {
		@extend .flex-row, .align-center, .gap-2;

		margin: 0;
		padding: 0;

		&-item {
			@extend .flex-center;

			width: 38px;
			height: 38px;
			color: var(--text-400);
			border-radius: var(--border05);
			font-weight: 500;
			font-size: var(--p-small);
			line-height: 1.4;
			border: 1px solid var(--transp-3);
			@include transition();

			button,
			span {
				@extend .flex-center;

				cursor: pointer;
				height: 100%;
				width: 100%;
				color: inherit;
				font-size: var(--p-small);

				&.link-icon {
					font-size: var(--h5);
				}
			}

			&:not(.disabled) {
				&:hover {
					background-color: var(--transp-2);
					color: var(--text);
				}

				&.active {
					color: var(--accent-900);
					background-color: var(--accent);
				}
			}

			&.disabled {
				pointer-events: none;
				opacity: 0.7;
			}
		}
	}

	&__header {
		padding: 0.8rem 1rem;
	}

	&__footer {
		@extend .d-flex, .flex-row, .align-center, .flex-between;

		border-top: 1px solid var(--transp-1);
		padding: 1rem 1.2rem;
		padding-left: 1rem;

		@include media(mobile) {
			@extend .gap-3;

			flex-direction: column;
			padding-left: 1rem;
		}

		&-per-page {
			select {
				padding: 0.3em 1em;
				text-align: center;
			}

			.select__toggle-icon {
				display: none;
			}
		}
	}

	&__columns {
		@extend .flex-column;

		gap: 10px;

		padding: 0.7rem;

		label {
			width: 100%;
		}
	}

	&__search {
		max-width: 400px;
	}
}

.table-compact > :not(caption) > * > * {
	padding: 0.25rem !important;
}
