#legend {
	font-size: 13px;
	border: 0px solid #bbb;
	padding: 0;
	overflow-x: hidden;
	overflow-y: auto;
	max-height: 100%;
	/* position: absolute; */
	/* right: 10px; */
	top: 0px;
	width: 100%;
	-moz-border-radius: 3px;
	border-radius: 0 0 0 3px;
	background: #fdfdfd;
	box-sizing: border-box;
	opacity: 1;
	transition: opacity 0.3s ease-in-out, width 0.8s ease-in-out;
}

#legend_header {
	width: 350px;
	background: #999;
	padding-top: 20px;
	transition: width 0.2s ease-in-out;
}

#legend_header .legend_title {
	margin-left: 10px;

	color: #eee;
	font-size: 1.3em;
	font-weight: bold;
}

#legend_header.hidden_legend_header {
	width: 0;
}


#legend h3 {
	margin-left: 10px;
	height: 30px;
	margin-top: 5px;
	color: #555;
	font-size: 1.5em;
}

#legend span.close_legend_btn {
	     display: inline-block;
	    float: right;
	    border: 1px solid #bbb;
	    height: 20px;
	    width: 20px;
	    text-align: center;
	    font-size: 1.3em;
	    font-family: monospace;
	    border-radius: 0 3px 0 3px;
	    color: #bbb;
	    z-index: 20;
	    cursor: pointer;
	    background: #f3f3f3;
	    margin-top: -11px;
	    margin-right: -11px;
}

#legend li {
  display: block;
  padding: 0;
  margin: 0;
	cursor: pointer;
}

#legend li.legend_layer.selected {
	background: #f3f3f3;
	margin-left: 0;
  padding-left: 0;
}

#legend li.legend_layer {
    background: #fdfdfd;

		transition: all 0.2s ease;
		-webkit-transition: all 0.2s ease;
		border-bottom: 2px solid #e9e9e9;
}

#legend li.legend_layer:hover {
  background: #eee;
}

#legend div.label_wrap {
  margin: 0;
  padding: 0;
  height: 40px;
	display: flex;
	overflow: hidden;
	word-break: break-all;
}

#legend div.label_wrap>span.legendLabel {
	flex-grow: 1;
}


#legend span.group_toggle_btn._grp_off i.material-icons::after {
	content: 'check_box_outline_blank'
}

#legend span.group_toggle_btn._grp_on i.material-icons::after {
	content: 'check_box'
}

#legend span.group_toggle_btn._grp_indeterminate i.material-icons::after {
	content: 'indeterminate_check_box'
}

#legend span.group_toggle_btn i.material-icons {
	cursor: pointer;
	padding: 7px 2px;
}

#legend span.metadata_button i.material-icons {
	cursor: pointer;
	padding: 7px 2px;
}

#legend span.metadata_button i.material-icons::after {
	content: 'description'
}


#legend li.legend_group>div.label_wrap {
  background: #e6e6e6;
  color: #333;
  font-size: 15px;
	line-height: 38px;
	border-bottom: 2px solid #f3f3f3;
}





#legend li.legend_layer>div.label_wrap {
  color: #333;
  font-size: 13px;
  line-height: 38px;

	-moz-transition: all 0.5s ease;
	-o-transition: all 0.5s ease;
	-ms-transition: all 0.5s ease;
	transition: all 0.5s ease;
	-webkit-transition: all 0.5s ease;
}

#legend li.legend_layer.selected>div.label_wrap {
  font-weight: bold;

}

#legend li.legend_layer, #legend li.legend_group {

}

#legend li span {
  margin: 0;
  padding: 0;
  display: block;
  vertical-align: middle;
}

#legend li span.layer_icon {
	width: 20px;
	padding-left: 4px;
	line-height: 36px;
}


#legend li span.expand_button {
  cursor: pointer;
	line-height: 12px;
	padding-top: 6px;
}

#legend ul {
  margin: 0;
  padding: 0;
  padding-left: 0;
}

#legend > ul {
  padding-left: 0px;
	overflow: hidden;
}

#legend ul.expanded {
  max-height: 8500px;
  -moz-transition: max-height 0.5s ease-in-out;
  -o-transition: max-height 0.5s ease-in-out;
  -ms-transition: max-height 0.5s ease-in-out;
  transition: max-height 0.5s ease-in-out;
  -webkit-transition: max-height 0.5s ease-in-out;
}

#legend ul.collapsed {
  max-height: 0;
  overflow: hidden;
  -moz-transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);;
  -o-transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);;
  -ms-transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);;
  transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);;
  -webkit-transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);;
}

#legend li.legend_group span.expand_button.collapsed i.material-icons::after {
  content: "expand_more"
}
#legend li.legend_group span.expand_button.expanded i.material-icons::after {
  content: "expand_less"
}

#legend div.themeContainer {
	padding-left: 5px;

}

#legend li.legend_group div.themeContainer>div.label_wrap {

	line-height: 38px;

}

#legend div.themeContainer.expanded {
	max-height: 500px;
  -moz-transition: max-height 0.5s cubic-bezier(0.1, 0.89, 1, 1);
  -o-transition: max-height 0.5s cubic-bezier(0.1, 0.89, 1, 1);
  -ms-transition: max-height 0.5s cubic-bezier(0.1, 0.89, 1, 1);
  transition: max-height 0.5s cubic-bezier(0.1, 0.89, 1, 1);
  -webkit-transition: max-height 0.5s cubic-bezier(0.1, 0.89, 1, 1);
}

#legend div.themeContainer.collapsed {
	max-height: 0;
  overflow: hidden;
  -moz-transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
  -o-transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
  -ms-transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
  transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
  -webkit-transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}

#legend li.legend_layer span.theme_exp_button {
		cursor: pointer;
		line-height: 11px;
		color: #777;
		padding-top: 7px;
}

#legend li.legend_layer span.theme_exp_button.collapsed i.material-icons::after {
	content: "add"
}


#legend li.legend_layer span.theme_exp_button.expanded i.material-icons::after {
	content: "remove"
}

#legend ul ul li.legend_group {

}

#legend li.legend_group .lyr_btn_color {
  width:20px;
}

#legend li.legend_group li.legend_group .lyr_btn_color {
  width:27px;
}

#legend li.legend_group li.legend_group li.legend_group .lyr_btn_color {
  width:34px;
}

#legend li.legend_group li.legend_group li.legend_group li.legend_group .lyr_btn_color {
  width:41px;
}

#legend li.legend_group li.legend_group li.legend_group li.legend_group li.legend_group .lyr_btn_color {
  width:48px;
}

#legend li.legend_group li.legend_group li.legend_group li.legend_group li.legend_group li.legend_group .lyr_btn_color {
  width:55px;
}

#legend li.legend_group li.legend_group li.legend_group li.legend_group li.legend_group li.legend_group li.legend_group .lyr_btn_color {
  width:62px;
}


#lyr_info_popup {
	position: fixed;
	right: 200px;
	top: 400px;
	width: 300px;
	font-size: 0.8em;
	line-height: 1.4em !important;
	background-color: #eee;
	padding: 8px;
	-moz-border-radius: 3px;
	border-radius: 3px;
	border: 1px solid #ddd;
	font-style: normal !important;
	font-weight: normal !important;
	box-shadow: 0px 0px 2px 0px #666;
}

#legend.hidden_legend {
	opacity: 0 !important;
  pointer-events: none !important;
}

#legend.hidden_legend * {
  pointer-events: none !important;
	opacity: 0;
}

#middle_wrap #btn_legend {
	width: 100%;
	cursor: pointer;
	width: 40px;
	height: 40px;
	display: inline-block;
	color: #555;
	position: absolute;
	top: 10px;
	/* width: 40px; */
	padding: 0;
	margin: 0;
	right: 13px;
	border-radius: 3px;
	/*box-shadow: 0px 0px 13px 0px rgba(153,153,153,0.65);*/
	background: #fdfdfd;
	/* float: right; */
	margin-left: 31px;
	margin-top: -62px;
}


#btn_legend .material-icons {
	padding: 8px 12px 12px 8px;
	font-size: 36px;
	line-height: 0.7em;
}

#legend_header .close_legend {
	display: inline-block;
	position: fixed;
	/* float: right; */
	right: 10px;
	top: 10px;
	/* border: 1px solid #ddd; */
	/* border-right: none; */
	height: 40px;
	width: 40px;
	text-align: center;
	font-size: 2.4em;
	font-family: 'Open Sans', sans-serif;
	border-radius: 3px;
	color: #555;
	z-index: 65;
	cursor: pointer;
	background: #eee;
	line-height: 1.3em;
	transition: right 0.2s ease-in-out;
	/* margin-right: 10px; */
}

#header .close_legend .material-icons {
    font-size: 36px;
		line-height: 1.2em
}
#header .close_legend .material-icons:before {
    content: "chevron_right";
}


#header .close_legend.hidden {
	display: none;
}

@media (max-width: 768px) {
    #legend {
			position: fixed;
			right: 10px;
			top: 10px;
			width: 300px;
			z-index: 200;
    }

		#btn_legend {
				display: inline-block;
		}
}
