/* Style definition for knowledge building. */

@mixin gradient($color1, $color2) {
  background: -webkit-gradient(linear, 0% 0%, 0% 100%, from($color1), to($color2));
  background: -webkit-linear-gradient(top, $color1, $color2);
  background: -moz-linear-gradient(top, $color1, $color2);
  background: -ms-linear-gradient(top, $color1, $color2);
  background: -o-linear-gradient(top, $color1, $color2);
 }
 
 @mixin gradient_stops($color1, $color2, $color3, $color4) {
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, $color1), color-stop(48%, $color2), color-stop(52%, $color3), color-stop(100%, $color4));
  background-image: -webkit-linear-gradient(top, $color1 0%, $color2 48%, $color3 52%, $color4 100%);
  background-image: -moz-linear-gradient(top, $color1 0%, $color2 48%, $color3 52%, $color4 100%);
  background-image: -ms-linear-gradient(top, $color1 0%, $color2 48%, $color3 52%, $color4 100%);
  background-image: -o-linear-gradient(top, $color1 0%, $color2 48%, $color3 52%, $color4 100%);
  background-image: linear-gradient(top, $color1 0%, $color2 48%, $color3 52%, $color4 100%);
}

div.kbtype-label {
    font-size: 150%;
}

.ktype_heading {
    font-size: 150%;
    padding: 0.3em;
}

.knbu-comment form p { margin: 0; padding: 0; }

.thread-title {
	margin: 30px 0 20px 0;
}

#grouping {
	color: #fff;
	font-size: 1.1em;
}

#grouping-select {
	padding: 8px;
	background-color: rgba(0,0,0,0.5);
	color: #fff;
	border: 1px solid #555;
	border-radius: 4px;
	font-size: 1.1em;
	font-family: inherit;
	
	option {
		background-color: rgba(0,0,0,0.9);
	}
}


#comment_sorter {
	margin-bottom: 10px;
	padding: 10px;
	
	ul {
	  margin-left: 0;
	  width: 100%;
	}
	
	 li { 
		position: relative;
		display: inline-block;
		margin: 0.1em;
		padding: 0.4em 0.6em;
		padding-right: 18px;
		color: black;
		background-color: #ccc;
		cursor: pointer;
		border-radius: 3px;
		border: 1px solid #aaa;
		@include gradient_stops(#eeeeee, #e0e0e0, #d4d3d3, #c2c2c2);
		&:hover { opacity: 0.8; }
		&:active { @include gradient_stops(#c2c2c2, #d4d3d3, #d4d3d3, #d4d3d3 ); }

		.sort-up, .sort-down { width: 8px; height: 5px; position: absolute; display: none; }
		
		.sort-up { top: 25%; right: 3px; }
		.sort-down { top: 55%; right: 3px; }
	}
	
	li.selected { font-weight: bold; img { display: inline-block; } }
	li:first-child img { display: none; } 
}

#map-frame {
	margin-top: 30px;
	img { height: 100%; display: inline-block; float: left; }
	span { line-height: 100px; float: left; }
	a {
		height:100px;
		background-position: center center;
		font-size: 2em;
		text-decoration: none;
		display: block;
	}
}

.comment {
	margin-top: 0.5em;
	list-style-type: none;
	
	.comment-body {
		padding: 5px;
		line-height: 1.3em;
		border-right: 1px solid rgba(0, 0, 0, 0.1);
		border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	}
}

.thread-sorted {
	$m: 40px;
	.depth-1 { margin-left: $m * 1; margin-top: 1.5em; }
	.depth-2 { margin-left: $m * 2; }
	.depth-3 { margin-left: $m * 3; }
	.depth-4 { margin-left: $m * 4; }
	.depth-5 { margin-left: $m * 5; }
}

.knbu-form {
	label {
		display: block;
	}
}

.knbu-form {
	select[name="knbu_type"] {
		border: 1px solid #ccc;
		border-radius: 3px;
		font-family: inherit;
		padding: 0.4rem;
	}
	#current_user_name, #current_user_email {
		width: 80% !important;
	}
	
	label { 
		padding-top: 12px;
	}
	
	.knbu-checklist {
		padding: 7px;
	}
	
	.knbu-user-fields > span {
		display: block;
		width: 50%;
		float: left;
	}
}

.knbu-form-link { 
	margin-top: 10px; 
	display: block; 
	float: left;
	cursor: pointer; 
	padding: 5px; 
	text-decoration: none;
	&:hover, &:active { text-decoration: underline; }
}

.knbu-map-view { 
	margin: 0; 
	padding: 0; 
	background-image: url(images/grid.png); 
	font-family: 'Junge'; 

	#navi-toggle-button {
		cursor: pointer;
		opacity: 0.7;
		&:hover, &:active { opacity: 1.0; }
	}
	
	#full-screen {
		position: absolute;
		bottom: 3px;
		right: 3px;
		width: 35px;
		opacity: 0.7;
		&:hover { opacity: 0.8; }
		&:active { opacity: 1; }
	}
	
	#fps { 
		position: absolute; 
		top: 10px; 
		left: 10px; 
		font-size: 1em; 
		color: white; 
	}

	#screen { 
		position: absolute; 
		top: 10px;
		right: 10px; 
		width: 400px; 
		background-color: rgba(230, 230, 230, 0); 
		min-height: 500px; 
		padding: 20px; 
	}

	
	
	#map { 
		position: fixed; 
		top: 0; 
		left: 0; 
		width: 100%;
		height: 100%;
	}

	#raven { 
		overflow: hidden; 
		position: absolute; 
		top: 0; 
		left: 0; 
		width: 100%;
		height: 100%;
	}

	circle { 
		cursor: pointer; 
	}

	#close { 
		float: right; 
		cursor: pointer; 
	}

	#reply { 
		clear:both; 
	}

	#reply-wrapper { 
		display: none; 
		clear: both;
		padding: 7px;
		background-color: rgba(255,255,255,1);
	}
	
	#grouping {
		position: absolute;
		right: 20px;
		top: 20px;
		
		a {
			display: block;
			padding: 7px;
			text-align: right;
			
			cursor: pointer;
		}
	}
	
	
	
	tspan:nth-child(1) {
		font-size: 1.5em;
	}

	#message .logged-in-as { 
		float: right; 
	}

	#message #commentform .comment-form-comment label { 
		clear: both; 
		display: block; 
		width: 100%;
	}
	
	#navi-toggle-container {
		text-align: center;
		font-weight: bolder;
		color: #fff;
	}
	
	#navigation { 
		position: absolute; 
		top: 10px; 
		left: 10px; 
		
		#arrow-left { position: absolute; left: -1px; top: 22px; }
		#arrow-up { position: absolute; left: 24px; top: -1px;  }
		#arrow-right { position: absolute; left: 55px; top: 24px; }
		#arrow-down { position: absolute;  left: 25px; bottom: 1px;  }
		#arrow-center { position: absolute;  left: 31px; bottom: 33px;  }
		.arrow { opacity: 0.8;  &:hover { opacity: 0.9; } &:active { opacity: 1.0 }}
		
		#zoom { 
			background-color: rgba(255, 255, 255, 0.3);
			box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.8);
			height: 100px;
			margin: auto;
			position: relative;
			width: 10px;
			padding: 10px 0;
			
			.ui-slider-handle {
				width: 100%;
				height: 10px;
				margin-bottom: -5px;
				background-color: rgb(220, 220, 220);
				display: block;
				position: absolute;
			}
		}

		#pan {
			position: relative;
			margin: 5px;
			
			div {
				$size: 20px;
				position: absolute;
				width: $size;
				height: $size;
				margin: -$size/2;
				background-size: 100% 100%;
				cursor: pointer;
				
				opacity: 0.7;
				&:hover { opacity: 0.9; }
				&:active { opacity: 1.0; }
			}
			.left { left: 0; top: 50%; background-image: url(images/left.png); }
			.right { right: 0; top: 50%; background-image: url(images/right.png); }
			.up { top: 0; left: 50%; background-image: url(images/up.png); }
			.down { bottom: 0; left: 50%; background-image: url(images/down.png); }
			.center { left: 50%; right: 50%; top: 50%; bottom: 50%; background-color: white; border-radius: 4px; }
		}
	}

	
	
	#legend {
		position: absolute;
		left: 15px;
		bottom: 15px;
		
		ul {
			margin: 0;
			padding: 0;
			list-style-type: none;
			li {
				color: white;
				line-height: 23px;
				.color {
					width: 20px; 
					height: 20px;
					margin-right: 10px;
					background-color: white;
					display: block;
					float: left;
					box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.6);
				}
			}
		}
	}
}
.knbu-comment, #message {
h3 {
		margin: 0; 
		padding: 0; 
		margin-bottom: 8px;
	}
	h4 {
		clear: none !important;
	}
	
	.message-header {
		line-height: 30px;
		padding: 0 10px;
		overflow: hidden;
		position: relative;
		h4 { 
			font-size: 1.1em;
			white-space: nowrap;
			display: inline;
		}
	}
	
	.user {
		float: right; 
		vertical-align: middle;
	}
	
	.message-content-wrapper {
		padding: 8px; 
	}
	
	.message-meta {
		float: left;
		margin: 0 5px 5px 0;
	}
	
	.message-avatar { 
		width: 25px;
		height: 25px;
		background-size: 100% 100%;
		display: inline-block;
		padding-top: 5px;
		float: right;
	}
	
	.message-username {
		float: right;
		vertical-align: middle;
		padding: 0 10px;
	}
	
	.message-date {
		float: right;
	}
	
	.message-content { 
		background-color: #f5f5f5;
		padding: 8px;
		white-space: pre-wrap;
		word-wrap: break-word;
		line-height: 1.4em;
		border: 0;
		
		img { max-width: 100%; }
	}

	.message-type { 
		margin: 0; 
	}
	
	p { margin: 10px; }
		
	textarea { 
		font-family: inherit; 
	}
}

.knbu-comment {
	box-shadow: 2px 2px 2px rgba(0,0,0,0.2); 
}

#message { 
	position: absolute;
	background-color: rgba(255, 255, 255, 0.93);
	width: 50%;
	min-width: 400px;
	max-width: 600px;
	border-radius: 2px;
	box-shadow: 8px 8px 2px rgba(0,0,0,0.3);
	display: none;
	margin: 10px;
	border: 1px solid #444;
}