@import '../../styles/variables';
@import '../../styles/mixins';

@import './scroll';

* {
	-moz-box-sizing: border-box;
	box-sizing: border-box;

	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
}

html {
	width: 100%;
	height: 100%;

	margin: 0;
	padding: 0;

	font-size: $font-size;
	text-size-adjust: 100%;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	margin: 0;
	padding: 0;

	position: fixed;

	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;

	text-rendering: optimizeLegibility;
	overflow: hidden;
	touch-action: manipulation;
	-webkit-user-drag: none;
	-ms-content-zooming: none;
	word-wrap: break-word;
	overscroll-behavior-y: none;
	text-size-adjust: none;

	font-family: $font-family;
	font-size: .85rem;
	line-height: 1.5;
	color: var(--color-text, $color-text);
}

a {
	text-decoration: none;
	color: var(--color-link, $color-link);
}

button {
	background-color: transparent;
	font-size: 1.2rem;
	outline: none;
}

.app {
	left: 0;
	top: 0;
	position: absolute;
	z-index: 0;
	width: 100%;
	height: 100%;
	contain: layout size style;

	visibility: inherit;
	font-size: 14px;
	background-color: #fff;
	color: var(--color-text, #333);

	&.dark {
		background-color: #000;
		color: var(--color-dark-text, #FFF);
	}

	.statusbar-padded {
		padding-top: 20px;
	}

	&.ios {
		font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Roboto, sans-serif;
	}

	&.android {
		font-family: Roboto, "Helvetica Neue", sans-serif;
	}
}

.content {
	position: relative;
	display: block;
	flex: 1;
	width: 100%;
	contain: layout size style;
	padding: 0 !important;

	>.content-scroll {
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		position: absolute;
		z-index: 1;
		display: block;
		overflow-x: hidden;
		overflow-y: scroll;
		-webkit-overflow-scrolling: touch;
		will-change: scroll-position;
		contain: size style layout;

		>.content-inner {
			display: block;
		}
	}
}

.header {
	position: relative;
	z-index: 10;
	display: block;
	order: 1;
	width: 100%;
	order: -1;
	min-height: 44px;
}

.footer {
	display: block;
	position: relative;
	order: 1;
	width: 100%;
	min-height: 44px;
}

.view {
	left: 0;
	top: 0;
	position: absolute;
	z-index: 0;
	width: 100%;
	height: 100%;
	contain: layout size style;
	visibility: inherit;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.badge {
	display: inline-block;
	padding: .1rem .45rem .15rem;
	font-size: .6rem;
	line-height: 1;
	color: #3d4145;
	background-color: rgba(0, 0, 0, .15);
	border-radius: 5rem;
}

.page {
	width: 100%;
	height: 100%;
	contain: layout size style;
	visibility: inherit;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.app-statusbar{
	width: 100%;
	display: block;
	height: var(--statusbar-height, 0px);
}