/* GENERIC STUFF */

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

	overflow-wrap: anywhere;
	word-wrap: anywhere;
	
	word-break: break-word;

	overflow-x: hidden;
	
	/* safari work around */
	/*-webkit-tap-highlight-color: transparent;*/
}

* {
	box-sizing: border-box;
	max-width: 100%;
}

input, select {
	font-family: inherit;
	font-size: inherit;
	text-align: inherit;
	color: inherit;
}

input:disabled + label {
	color: grey;
}

input[type=submit] {
	cursor: pointer;
}

p {
	text-align: justify;
}

a, .a {
	text-decoration: none;
	cursor: pointer;
}

	a:focus, a:active, a:hover,
	.a:focus, .a:active, .a:hover {
		outline: none;
		text-decoration: underline;
	}

svg {
	vertical-align: middle;
	width: 1em;
}

/* MORSS SPECIFIC */

/* #FF7B0A */
/* compl: #0A8EFF */
/* 255 1123 100 */

body {
	padding: 2%;
	
	font-family: sans-serif;
	background-image: url("noise.png");
	background-color: #FFFAF4;
	
	line-height: 1.5em;
	
	width: 800px;
	max-width: 100%;
	margin: auto;
}

header {
	text-shadow: 0px 1px 0px white;
}

body > :not(:first-child):not(:empty) {
	border-top: 1px solid silver;
	margin-top: 1rem;
	padding-top: 1rem;
}

header div {
	text-align: center;
}

header svg, header img {
	height: 5em;
	width: auto;
	vertical-align: -1.75em;
}

header h1 {
	display: inline-block;
}

h1, h2, h3, h4 {
	color: #FF7B0A;
	font-weight: bold;
}

	h1 {
		font-size: 2em;
		margin: 0.5em;
	}

	h2 {
		font-size: 1em;
		font-weight: normal;
		color: inherit;
		margin-bottom: 1em;
	}

	h1, h2 {
		text-align: center;
	}

a, .a {
	color: #0A8EFF;
}

#notif:not(:empty) {
	background-color: silver;
	padding: .5em;
	
	position: fixed;
	left: 0;
	bottom: 0;
	
	width: 100%;
	
	text-align: center;
	
	cursor: pointer;
}

form:not(:focus-within) .hide-inactive {
	max-width: 0 !important; height: 0;
	margin: 0; padding: 0;
	border: none; outline: none;
}

form:focus-within .hide-inactive {
	max-width: 100em !important;
}

#feedback {
	display: block;
	
	position: fixed;
	bottom: 2em; right: 2em;
	
	padding: 1em;
	border-radius: 2em;
	
	background: #06f;
	color: white;
	
	font-weight: bold;
}

/* APP SPECIFIC STUFF */

body[data-loading=true] {
	cursor: progress;
}

	body[data-loading=true] > * {
		filter: blur(0.25em);
	}

	body[data-loading=true]::after {
		content: "loading";
		
		display: flex;
		align-items: center; 	
		justify-content: center;
		
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		
		font-weight: bold;
		background-color: rgba(0,0,0,0.1);
		text-align: center;
		
		animation: blink 1s ease-in infinite alternate;
		}
		
		@keyframes blink {
			from { background-color: rgba(0,0,0,0.1); }
			to	 { background-color: rgba(0,0,0,0); }
		}

.input-combo {
	display: flex;
	flex-flow: row;
	flex-wrap: wrap;
	align-items: stretch;

	width: 100%;
	border: 1px solid grey;

	padding: .5em .5em;
	background-color: white;
}

	.input-combo.tight {
		width: auto;
		display: inline-flex;
		align-self: flex-start;
	}

	.input-combo * {
		display: inline-block;
		line-height: 2em;
		
		border: 0;
		border-radius: 0;
		background: transparent;
	}

	.input-combo > :not(.button) {
		max-width: 100%;
		
		flex-grow: 1;
		flex-shrink: 0;
		
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
	}

	.input-combo .button {
		min-width: 5em;
		
		flex-grow: 0;
		flex-shrink: 0;
		
		text-align: center;
		font-weight: bold;

		border-left: 1px solid silver;
	}

	.input-combo .button:not(:disabled) {
		color: #06f;
	}

	.input-combo .small {
		min-width: 2em;
	}
	
	label  * {
		/*display: block;*/
		pointer-events: none;
	}

[onclick_title] {
	cursor: pointer;
	position: relative;
}

	[onclick_title]::before, [onclick_title]::after {
		opacity: 0;
	}

	[onclick_title]:not(:active)::before, [onclick_title]:not(:active)::after {
		transition: opacity 1s ease-in-out;
	}

	[onclick_title]:active::before, [onclick_title]:active::after {
		opacity: 1;
	}

	[onclick_title]::before {
		content: attr(onclick_title);
		font-weight: normal;
		
		position: absolute;
		top: calc(-1em	- 100%);
		left: -50%;
		
		z-index: 2;
		
		background: grey;
		color: white;
		
		border: 1px solid grey;
		border-radius: 0.5em;
		padding: 0 1em;
		
		overflow: visible;
		white-space: nowrap;
	}

	[onclick_title]::after {
		/* triangle */
		content: "";
		
		border-right: 1em solid transparent;
		border-left: 1em solid transparent;
		
		border-top: 1em solid grey;
		
		width: 0;
		height: 0;
		
		position: absolute;

		z-index: 1;
		
		top: -1em;
		left: 0;
	}

	.examples div:hover {
		text-decoration: underline;
	}

label, label svg, label img {
	margin: 0 0.5em;
}

#picker {
}

	#picker:focus-within {
		display: flex;
		flex-direction: column;
		align-items: stretch;

		height: 15em;
		height: 100vh;
	}

		#picker:focus-within .input-combo {
			color: white;
			background: DeepSkyBlue;
			box-shadow: inset 0 0 3px white;
		}

		#picker:valid input[type=submit] {
			background: aquamarine;
		}

	#iframe_wrapper {
		display: block;
		
		overflow-y: scroll;
		-webkit-overflow-scrolling: touch;

		max-width: none;
		width: calc(100vw - 1em);
		height: 15em;
		
		margin-left: calc( ( -100vw + 1em ) /2 + 50%);
		margin-top: 1em;
		
		border: 1px solid grey;
		
		flex-grow: 1;
	}
	
	iframe {
		width: 100%;
		height: 100%;
		border: 0;
	}


