/* offside-js 1.3.1 22-05-2016
* Minimal JavaScript kit without library dependencies to push things off-canvas using just class manipulation
* https://github.com/toomuchdesign/offside.git
*
* by Andrea Carraro
* Available under the MIT license
*/

/* Off-canvas element CSS */
.offside {
    position: fixed; /* Does not play well with some old browsers (see: README) */
    width: 265px;
    height: 100%;
	height: 100vh;
    top: 0;
    z-index: 9999;
    overflow: auto;
    -webkit-overflow-scrolling: touch; /* enables momentum scrolling in iOS overflow elements */
}

/* Left off-canvas elements default status: out of the page */
.offside,
.offside--left {
    left: -265px;
}

/* Right off-canvas elements default status: out of the page */
.offside--right {
    left: auto;
    right: -265px;
}

/*
 * Left off-canvas element is open:
 * - off-canvas element slides in
 * - container elements slides out
 */
.offside--left.is-open,
.offside-js--is-left .offside-sliding-element {
    -webkit-transform: translate3d(265px, 0, 0);
    -moz-transform: translate3d(265px, 0, 0);
    -ms-transform: translate3d(265px, 0, 0);
    -o-transform: translate3d(265px, 0, 0);
    transform: translate3d(265px, 0, 0);
}

/*
 * Right off-canvas element is open:
 * - off-canvas element slides in
 * - container elements slides out
 */
.offside--right.is-open,
.offside-js--is-right .offside-sliding-element {
    -webkit-transform: translate3d(-265px, 0, 0);
    -moz-transform: translate3d(-265px, 0, 0);
    -ms-transform: translate3d(-265px, 0, 0);
    -o-transform: translate3d(-265px, 0, 0);
    transform: translate3d(-265px, 0, 0);
}

/* Elements Transitions */
.offside-js--interact .offside,
.offside-js--interact .offside-sliding-element {
    -webkit-transition: -webkit-transform .2s cubic-bezier(.16, .68, .43, .99);
    -moz-transition: -moz-transform .2s cubic-bezier(.16, .68, .43, .99);
    -o-transition: -o-transform .2s cubic-bezier(.16, .68, .43, .99);
    transition: transform .2s cubic-bezier(.16, .68, .43, .99);

    /* improves performance issues on mobile*/
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
}

/* Body overflow */
.offside-js--init {
    overflow-x: hidden;
}

/* Fallback movements for browser not supporting CSS 3d Transitions
----------------------------------------------- */

/* Modernizr false negative csstransforms3d fix, reset CSS 3d Transitions */
.no-csstransforms3d .offside {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.no-csstransforms3d .offside-sliding-element {
    overflow-x: hidden;
    position: relative;
}

/* Element is open: off-canvas element slides in */
.no-csstransforms3d .offside--left.is-open {
    left: 0;
}

.no-csstransforms3d .offside--right.is-open {
    right: 0;
}

/* Element is open: container elements slide out */
.no-csstransforms3d > .offside-js--is-left .offside-sliding-element {
    right: -265px;
}

.no-csstransforms3d > .offside-js--is-right .offside-sliding-element {
    left: -265px;
}

/* GP */
.slideout-overlay {
    z-index: 100000;
    position: fixed;
    width: 100%;
	height: 100%;
	height: 100vh;
	min-height: 100%; /* Safari */
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
    background-color: rgba(0,0,0,0.8);
    visibility: hidden;
    opacity: 0;
    cursor: pointer;

    -webkit-transition: visibility 0s ease, opacity .2s ease;
    -moz-transition: visibility 0s ease, opacity .2s ease;
    -o-transition: visibility 0s ease, opacity .2s ease;
    transition: visibility 0s ease, opacity .2s ease;
}

.offside-js--is-open .slideout-overlay {
    visibility: visible;
    opacity: 1;
    -webkit-transition-delay: delay 0s;
    -o-transition-delay: delay 0s;
    transition-delay: delay 0s;
}

button.slideout-exit {
	position: fixed;
	top: 0;
	background-color: transparent;
	color: #fff;
	font-size: 30px;
	border: 0;
}

.slide-opened nav.toggled .menu-toggle:before {
	content: "\f0c9";
}

.offside-js--is-left.slide-opened .slideout-overlay button.slideout-exit {
    left: 260px;
}

.offside-js--is-right.slide-opened .slideout-overlay button.slideout-exit {
    right: 260px;
}

.slideout-widget {
	margin: 20px;
}

.slideout-navigation .mega-menu > ul > li {
	display: block;
	width: 100% !important;
}

.slideout-navigation .slideout-menu {
	display: block;
}

#generate-slideout-menu {
	z-index: 100001;
}

#generate-slideout-menu .slideout-menu li {
	float: none;
	width: 100%;
	clear: both;
}

#generate-slideout-menu.main-navigation ul ul {
	display: none;
}

#generate-slideout-menu.main-navigation ul ul.toggled-on {
	display: block !important;
}

#generate-slideout-menu .slideout-menu li:hover > ul,
#generate-slideout-menu .slideout-menu li.sfHover > ul {
	display: none;
}

#generate-slideout-menu .slideout-menu .menu-item-has-children > a:first-child,
#generate-slideout-menu .slideout-menu .page_item_has_children > a:first-child {
	padding-right: 1em;
}

#generate-slideout-menu.main-navigation .main-nav ul ul {
	position: relative;
	top: 0;
	left: 0;
	width: 100%;
}

.slideout-toggle a:before {
	content: "\f0c9";
	font-family: FontAwesome;
	line-height: 1em;
	width: 1.28571429em;
	text-align: center;
	display: inline-block;
}

.slide-opened .slideout-exit:before {
	content: "\f00d";
	font-family: FontAwesome;
	line-height: 1em;
	width: 1.28571429em;
	text-align: center;
	display: inline-block;
}

#generate-slideout-menu li.menu-item-float-right {
	float: none !important;
	display: inline-block;
	width: auto;
}

body:not(.rtl) #generate-slideout-menu .slideout-menu .menu-item-has-children>a:first-child {
	padding-right: 0;
}

.rtl .slideout-navigation {
	position: fixed;
}

.slideout-navigation .menu-item-has-children .dropdown-menu-toggle {
    float: right;
}

.slideout-navigation .slideout-widget .menu li {
    float: none;
}

@media (min-width: 769px) {
	.sf-menu > li.slideout-toggle {
		float: right;
	}

	.gen-sidebar-nav .sf-menu > li.slideout-toggle {
		float: none;
	}
}

@media (max-width: 768px) {
	.slideout-mobile .main-navigation.toggled .main-nav > ul,
	.slideout-both .main-navigation.toggled .main-nav > ul,
	.slideout-desktop .main-navigation .main-nav li.slideout-toggle {
		display: none !important;
	}

	button.slideout-exit {
		font-size: 20px;
	}

	.offside-js--is-left.slide-opened .slideout-overlay button.slideout-exit {
	    left: 255px;
	}

	.offside-js--is-right.slide-opened .slideout-overlay button.slideout-exit {
	    right: 255px;
	}

	.slideout-overlay {
		top: -100px;
		height: calc(100% + 100px);
		height: calc(100vh + 100px);
		min-height: calc(100% + 100px); /* Safari */
	}
}
