/**
 * Gongbi Skin
 * © 2015-2021 Issara
 * © 2022-2024 WaitSpring
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
@import '../variables.less';

/* Experimental overflowing table scrolling */
.overflowed {
	position: relative;
	overflow: hidden;
	margin: 1em 0;

	/* Shadow-border containers */
	.content-table-left,
	.content-table-right {
		position: absolute;
		z-index: 1;
		bottom: 0;
		height: 100%;
	}

	/* Noflips because scrollbar direction depends on the content direction */
	.content-table-right {
		/* @noflip */
		right: 0;

		.mw-content-rtl & {
			/* @noflip */
			right: unset;
			/* @noflip */
			left: 0;
		}

		.scroll-right& {
			border-left: solid 1px @base80;
			box-shadow: 0 0 4px 1px rgba( 0, 0, 0, 0.25 );
		}
	}

	.content-table-left {
		/* @noflip */
		left: 0;

		.mw-content-rtl & {
			/* @noflip */
			right: 0;
			/* @noflip */
			left: unset;
		}

		.scroll-left& {
			border-left: solid 1px @base80;
			box-shadow: 0 0 4px 1px rgba( 0, 0, 0, 0.25 );
		}
	}

	.content-table {
		overflow: hidden;
		overflow-x: auto;

		> table {
			margin: 0;

			&.mw_metadata,
			&.mw-datatable,
			&.wikitable {
				border-bottom-width: 0;
			}
		}
	}
}

/* Desktop sticky scrollbars */
.content-table-scrollbar.inactive {
	position: absolute;
	top: -9999px;
	bottom: unset;
	left: -9999px;
}

.content-table-scrollbar {
	position: fixed;
	z-index: 1;
	bottom: 0;
	overflow-x: auto;
}

.content-table-spoof {
	height: 1px;
}
