/*
 * Copyright (C) 2026 Fluxer Contributors
 *
 * This file is part of Fluxer.
 *
 * Fluxer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Fluxer 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Fluxer. If not, see <https://www.gnu.org/licenses/>.
 */

.scrollerWrap {
	--scroller-track-size: 8px;
	position: relative;
	display: flex;
	min-height: 0;
	min-width: 0;
	width: 100%;
	height: 100%;
	max-height: inherit;
	flex: 1 1 auto;
}

.scroller {
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
	width: 100%;
	height: 100%;
	max-height: inherit;
	flex: 1 1 auto;
	overscroll-behavior: contain;
	overflow-anchor: none;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.scroller::-webkit-scrollbar {
	width: 0;
	height: 0;
}

.horizontal .scroller {
	overscroll-behavior-x: contain;
	overscroll-behavior-y: none;
}

.scrollbarReserve {
	padding-inline-end: var(--scroller-track-size);
}

.scrollerChildren {
	display: flex;
	flex: 1 1 0%;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
}

.horizontal .scrollerChildren {
	margin-inline-end: 0;
	flex-direction: row;
}

.dragging {
	pointer-events: none;
}

.regular {
	--scroller-track-size: 16px;
}

.horizontal.scrollerWrap {
	height: auto;
	flex: 0 1 auto;
	width: 100%;
}

.horizontal .scroller {
	height: auto;
	flex: 0 1 auto;
	width: 100%;
}

.horizontal.scrollbarReserve {
	padding-inline-end: 0;
	padding-block-end: var(--scroller-track-size);
}
