@require './Scrollable.config.styl';

.scrollable {
	overflow: hidden;
	position: relative;
}

.withHorizontalScrollbar:not(.overlayContent) {
	> .wrapper > .container > .content {
		padding-bottom: $scrollableScrollBarSize;
	}
}
.withVerticalScrollbar:not(.overlayContent) {
	> .wrapper > .container > .content {
		padding-right: $scrollableScrollBarSize;
	}
}

.wrapper {
	display: block;
	width: 100%;
	height: 100%;
	max-height: inherit;
	background-color: inherit;
}

.container {
	padding: 0;
	overflow: scroll;
	max-height: inherit;
	box-sizing: border-box;
	width: 100%;
	height: 100%;

	&::-webkit-scrollbar {
		display: none;
	}
}

.content {
	display: inline-block;
	vertical-align: middle;
	position: relative;
	min-width: 100%;
	box-sizing: border-box;
}

.resizeDetector {
	position: absolute;
	top: 0;
	left: 0;

	z-index: -1;
	width: 100%;
	height: 100%;
	border: none;
}

.scrollbar {
	background-color: inherit;
}
