

/* set menu position; change here to set to relative or float, etc. */
.cbp-tm-menu {
	float: right;
	font-size: 14px !important;
	z-index: 1000;
	text-align: right;
	margin: 0;
	text-transform: capitalize;
}

/* first level menu items */
.cbp-tm-menu > li {
	display: inline-block;
	margin: 0 10px;
	position: relative;
}

.cbp-tm-menu > li > a {
	position: relative;
	z-index: 9999;
	width: 93px;
	text-align: center;
	position: relative;
	line-height: 4em;
	padding: 0 10px;
	display: block;
	color: #fff;
}
	.cbp-tm-menu > li:last-child > a { width: auto;}

.no-touch .cbp-tm-menu > li > a:hover,
.no-touch .cbp-tm-menu > li > a:active {
	opacity: 0.8;
}

/* sumbenu with transitions */
.sub-menu {
	position: absolute;
	display: block;
	visibility: hidden;
	opacity: 0;
	padding: 0;
	text-align: left;
	pointer-events: none;
	-webkit-transition: visibility 0s, opacity 0s;
	-moz-transition: visibility 0s, opacity 0s;
	transition: visibility 0s, opacity 0s;
}

.cbp-tm-show .sub-menu {
	width: 16em;
	left: 0;
	margin: 0;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	-webkit-transition: visibility 0s, opacity 0.3s;
	-moz-transition: visibility 0s, opacity 0.3s;
	transition: visibility 0s, opacity 0.3s;
}

.cbp-tm-show-above .sub-menu {
	bottom: 100%;
	padding-bottom: 10px;
}

.cbp-tm-show-below .sub-menu {
	top: 100%;
	padding-top: 10px;
}

/* extreme cases: not enough space on the sides */
.cbp-tm-nospace-right .sub-menu {
	right: 0;
	left: auto;
}

.cbp-tm-nospace-left .sub-menu {
	left: 0;
}

/* last menu item has to fit on the screen */
.cbp-tm-menu > li:last-child .sub-menu {
	right: 0;
}

/* 	
arrow: depending on where the menu will be shown, we set 
the right position for the arrow
*/

.sub-menu:after {
	border: solid transparent;
	content: " ";
	height: 0;
	width: 0;
	position: absolute;
	pointer-events: none;
}

.cbp-tm-show-above .sub-menu:after {
	top: 100%;
	margin-top: -10px;
}

.cbp-tm-show-below .sub-menu:after {
	bottom: 100%;
	margin-bottom: -10px;
}

.sub-menu:after {
	border-color: transparent;
	border-width: 16px;
	margin-left: -16px;
	left: 20%;
}

.cbp-tm-show-above .sub-menu:after {
	border-top-color: #000;
}

.cbp-tm-show-below .sub-menu:after {
	border-bottom-color: #000;
}

.sub-menu > li {
	display: block;
	background: #000;
}

.sub-menu > li > a {
	padding: 10px 15px; /* top/bottom paddings in 'em' cause a tiny "jump" in Chrome on Win */
	display: block;
	position: relative;
	color: #fff;
	border: 4px solid #000;
	border-bottom: 1px solid #303030;
	-webkit-transition: all 0.2s;
	-moz-transition: all 0.2s;
	transition: all 0.2s;
}
	.sub-menu > li:last-child > a { border-bottom: 3px solid #000;}

.no-touch .sub-menu > li > a:hover,
.no-touch .sub-menu > li > a:active {
	color: #fff;
	background: #bf5e45;
}

/* Media Queries */
@media screen and (max-width: 55.6875em) {
	.cbp-tm-menu {
		font-size: 80%;
	}
}

@media screen and (max-height: 25.25em), screen and (max-width: 44.3125em) {

	.cbp-tm-menu {
		font-size: 100%;
		position: relative;
		text-align: center;
		padding: 0;
		top: auto;
	}

	.cbp-tm-menu > li {
		display: block;
		margin: 0;
		border-bottom: 4px solid #3793ca;
	}

	.cbp-tm-menu > li:first-child {
		border-top: 4px solid #3793ca;
	}

	li.cbp-tm-show > a,
	.no-touch .cbp-tm-menu > li > a:hover,
	.no-touch .cbp-tm-menu > li > a:active {
		color: #fff;
		background: #02639d;
	}

	.sub-menu {
		position: relative;
		display: none;
		width: 100%;
	}

	.sub-menu > li {
		padding: 0;
	}

	.sub-menu > li > a {
		padding: 0.6em 2.3em 0.6em 0.6em;
		border: none;
		border-bottom: 2px solid #6fbbe9;
	}

	.sub-menu:after {
		display: none;
	}

	.cbp-tm-menu .cbp-tm-show .sub-menu {
		display: block;
		width: 100%;
		left: 0;
		margin: 0;
		padding: 0;
		bottom: auto;
		top: auto;
	}
	
}
