
/* --- general --- */

body, p, li, h1, h2, h3, h4, h5, h6, input, textarea, select, .mdc-text-field *, .mdc-select * {
	font-family: 'Josefin Sans', sans-serif;
	font-size: 16px;
}
p, li {
	line-height: 1.5em;
}
p {
	margin: 0;
}
h1 { font-size: 28px; font-weight: bold; margin: 0 0 0.5em; }
h2 { font-size: 22px; font-weight: bold; margin: 0 0 0.5em; }
h3 { font-size: 18px; font-weight: bold; margin: 0 0 0.5em; }

form {
	margin: 0;
}
input, textarea, select,
.mdc-select .mdc-select__selected-text {
	font-size: 14px;
	background-color: rgba(179, 212, 252, 0.33) !important;
	box-shadow: inset 0px 0px 6px 0px rgba(0,0,0,0.75);
}
input:focus, textarea:focus, [contenteditable=true]:focus {
	outline: none;
}
hr {
	display: block;
	height: 1px;
	border: 0;
	border-top: 1px solid #ccc;
	margin: 1em 0;
	padding: 0;
}

/* --- app --- */

body {
	overflow: hidden;
}
.mdc-list-item__secondary-text {
	font-family: inherit;
}
#app>header {
	position: absolute; display: flex;
	top: 0;
	height: 48px;
	width: 100%;
	z-index: 2;
	background-color: white;
}
	#app>header h1 {
		width: calc(100% - 64px * 2);
		height: 100%;
		display: flex;
		overflow: overlay;
	}
	#app>header h1>a {
		margin: auto;
		width: 100%;
		text-align: center;
		overflow-wrap: break-word;
	}
#app>nav.nav1 {
	position: absolute;
	display: none;
	/*display: flex;*/
	flex-direction: column;
	overflow: auto;
	opacity: 0;
	left: -48px; top: 48px;
	width: 48px;
	height: calc(100% - 48px * 2);
	z-index: 2;
	background-color: white;
}
#app>nav.nav2 {
	position: absolute;
	display: none;
	opacity: 0;
	right: -48px; top: 48px;
	width: 48px;
	height: calc(100% - 48px * 2);
	z-index: 2;
	background-color: white;
}
	#app>nav.nav2>div {
		overflow: hidden;
	}
#app>section#app-background {
	position: absolute;
	width: 100%;
	height: 100%;
}
#app>section#app-body {
	position: absolute;
	width: calc(100% - (48px * 2));
	height: calc(100% - (48px * 2));
	margin-left: 48px;
	margin-top: 48px;
}
	#app>section#app-body .container {
		margin: calc(48px + 16px);
	}
	#app>section#app-body .page {
		display: none;
		background-color: white;
		margin: 0 auto;
		padding: 16px;
	}
	#app>section#app-body .page.small {
		max-width: 480px;
	}
	#app>section#app-body .page .action {
		padding: 16px 0 0 0;
		text-align: right;
	}
#app>footer {
	position: absolute;
	bottom: 0;
	height: 48px;
	width: 100%;
	z-index: 2;
	background-color: white;
	display: flex;
	flex-direction: row;
	overflow: auto;
}
#app #app-body {
	display: flex;
	align-items: center;
}
#app #app-body div.mdc-card {
	margin-left: auto;
	margin-right: auto;
	z-index: 1;
}
	#app #app-body div.mdc-card header .title,
	#app #app-body div.mdc-card footer .title {
		margin: 0;
		width: calc(100% - 64px * 2);
		height: 100%;
		display: flex;
		overflow: overlay;
	}
		#app #app-body div.mdc-card header .title a,
		#app #app-body div.mdc-card footer .title a {
			margin: auto;
			width: 100%;
			text-align: center;
			overflow-wrap: break-word;
		}
#app .spacer {
	margin: auto;
}
#app .block-fab {
	width: 56px;
	height: 56px;
}
#app .block-icon {
	width: 48px;
	height: 48px;
}
#app .hide {
	display: none;
}
#app .draft, #app .disabled {
	opacity: 0.33;
}
#app .model {
	display: none;
}

/* --- material --- */

#app .mdc-text-field, .mdc-select {
	margin: 4px;
}
#app .mdc-card .mdc-icon-button {
	margin: 8px;
}
#app .mdc-card .mdc-fab,
#app .mdc-card .block-fab {
	margin: 4px;
}
#app .mdc-text-field--textarea .mdc-text-field__input {
	margin: 0;
	padding: 12px 16px;
}

/* --- fluid --- */

@media screen and (max-width: 832px) {
	#app #app-body {
		width: calc(100%) !important;
		margin-left: 0 !important;
	}
	#app #app-body .mdc-card {
		width: 100% !important;
	}
	#app #app-body .mdc-card header .title {
		width: calc(100% - 48px * 2);
	}
	.mdc-text-field, .mdc-select {
		margin: 0 !important;
	}
	.mdc-list-item {
		padding: 0 !important;
	}
	.mdc-list--avatar-list .mdc-list-item__graphic {
		margin-right: 0 !important;
	}
}

@media screen and (max-height: 832px) {
	#app>nav.nav1 {
		z-index: 8 !important;
	}
	#app #app-body {
		height: 100% !important;
		margin-top: 0 !important;
	}
	#app #app-body .mdc-card {
		height: 100% !important;
		z-index: 4 !important;
	}
	#app #app-body .mdc-card header {
		height: 48px !important;
	}
	#app #app-body .mdc-card bodyer {
		height: calc(100% - 48px * 2) !important;
	}
	#app #app-body .mdc-card footer {
		height: 48px !important;
	}
	#app #app-body .mdc-card header .mdc-text-field,
	#app #app-body .mdc-card footer .mdc-text-field {
		height: 100% !important;
	}
	#app #app-body .mdc-card header button,
	#app #app-body .mdc-card footer button,
	#app #app-body .mdc-card .block-fab {
		margin: 0 !important;
	}
	#app #login {
		max-height: 360px !important;
	}
	#app #logout {
		max-height: 300px !important;
	}
	.mdc-fab,
	.block-fab {
		width: 48px !important;
		height: 48px !important;
	}
	.mdc-text-field, .mdc-select {
		margin: 0 !important;
	}
	.mdc-fab--extended .mdc-fab__icon {
		margin-right: -8px !important;
	}

}

@media screen and (max-width: 832px) and (max-height: 832px) {
	#app>nav.nav1 {
		border-top-right-radius: 24px;
		border-bottom-right-radius: 24px;
	}

	#app .cornered {
		display: none !important;
	}
	#app .corner button {
		display: block !important;
		z-index: 6;
	}

	#app #app-body .mdc-card {
		border-radius: 24px;
	}
	#app #app-body .mdc-card bodyer {
		height: calc(100% - 48px - 16px) !important;
	}
	#app #app-body .mdc-card footer {
		height: 16px !important;
	}
	#app #app-body .mdc-card footer .mdc-fab {
		position: absolute;
		bottom: 0 !important;
		right: 0 !important;
	}
	#app #app-body .mdc-card footer .mdc-icon-button.cornered {
		position: absolute;
		bottom: 0 !important;
		left: 0 !important;
	}
}

@media screen and (max-height: 224px) {
	#app #app-body .mdc-card header {
		height: 16px !important;
	}
	#app #app-body .mdc-card bodyer {
		height: calc(100% - 16px * 2) !important;
	}
	#app #app-body .mdc-card footer {
		height: 16px !important;
	}
	#app #app-body .mdc-card footer .mdc-fab {
		position: absolute;
		bottom: 0 !important;
		right: 0 !important;
	}
}

@media screen and (orientation: portrait) {
	#app #app-body {
		flex-direction: column;
	}
	#app #app-body div.mdc-card {
		margin-top: auto;
		margin-bottom: auto;
	}
}
