/* Base */

html, body {
	margin: 0;
	padding: 0;
	height: 100%;

}

#page {
	position: relative; /* Set the position property so z-index will apply */
	z-index: 20; /* Make sure this is higher than #menu */
	top: 0;
	padding: 0px;
	height: 100%;
/*	padding:2.5em env(safe-area-inset-right) 2.5em env(safe-area-inset-left);
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); */
}

#toggle-menu {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 11;
	transition: all 0.6s ease-in-out; -moz-transition: all 0.6s ease-in-out; -webkit-transition: all 0.6s ease-in-out;
}

#menu {
	display: none;
	height: 100%;
	position: absolute;
	top: 0;
	right: -240px;
	width: 190px;
	padding: 15px 25px;
	background: #333;
	z-index: 11; /* Make sure the z-index is lower than the #page */
}
#menu ul {
	margin: 0;
	padding: 0 20px;
	list-style: none;
	/*
	padding-left: max(0px,env(safe-area-inset-left));
	padding-right: max(0px,env(safe-area-inset-right));
	*/
}
#menu a {
	display: block;
	color: #fff;
	padding: 15px 0;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.05 );
	transition: all 0.6s ease-in-out; -moz-transition: all 0.6s ease-in-out; -webkit-transition: all 0.6s ease-in-out;
}

#menu a:hover {
	border-bottom: 1px solid rgba( 255, 255, 255, 0.85 );
	transition: all 0.6s ease-in-out; -moz-transition: all 0.6s ease-in-out; -webkit-transition: all 0.6s ease-in-out;
	}

/* Animations */

#page, #menu {
	-webkit-backface-visibility: hidden;
	-webkit-perspective: 1000;
}

/* Hide the menu unless it's animating or visible */
.animating #menu, .menu-visible #menu {
	display: block;
	    height: 100vh;
}

/***
* If the animating class is present then apply
* the CSS transition to #page over 250ms.
*/
.animating #page {
	transition: transform .25s ease-in-out;
	-webkit-transition: -webkit-transform .25s ease-in-out;
}

/***
* If the left class is present then transform
* the #page element 240px to the left.
*/	
.animating.left #page {
	transform: translate3d( -240px, 0, 0 );
	-webkit-transform: translate3d( -240px, 0, 0 );
	transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; -webkit-transition: all 0.3s ease-in-out;
}

/***
* If the right class is present then transform
* the #page element 240px to the right.
*/
.animating.right #page {
	transform: translate3d( 240px, 0, 0 );
	-webkit-transform: translate3d( 240px, 0, 0 );
	transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; -webkit-transition: all 0.3s ease-in-out;
}

/***
* If the menu-visible class is present then
* shift the #page 240px from the right edge
* via position: absolute to keep it in the 
* open position. When .animating, .left and
* .right classes are not present the CSS
* transform does not apply to #page.
*/
.menu-visible #page {
	right: 240px;
}

/** CALENDAR **/
/* Base */

#toggle-cal {
	position: absolute;
	top: 29px;
	right: 80px;
	z-index: 11;
	border: 0;
    outline: 0;
    background: transparent;
    background-image: url(../img/calendar_dark.png);
    width: 20px;
    height: 17px;
    background-size: 40px;
    background-position-x: 100%;
    transition: all 0.6s ease-in-out; -moz-transition: all 0.6s ease-in-out; -webkit-transition: all 0.6s ease-in-out;
}
#toggle-cal:hover {
	background-position-x: 0;
	transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out;
}
.cal-icon { background-image: url('../img/calendar_dark.png') !important; }
#toggle-cal img { width: 23px; height: auto; }

#calendar {
	display: none;
	height: 100%;
	position: absolute;
	background: #E8E8E8;
	z-index: 10; /* Make sure the z-index is lower than the #page */
    right: 0;
    top: -110vh;
    width: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
    width: 100%;
}

/* Animations */

#page, #calendar {
	-webkit-backface-visibility: hidden;
	-webkit-perspective: 1000;
}

/* Hide the menu unless it's animating or visible */
.animating #calendar, .cal-visible #calendar {
	display: block;
	    height: 100vh;
}

/***
* If the animating class is present then apply
* the CSS transition to #page over 250ms.
*/
.animating #page {
	transition: transform .25s ease-in-out;
	-webkit-transition: -webkit-transform .25s ease-in-out;
}

/***
* If the left class is present then transform
* the #page element 240px to the left.
*/	
.animating.bottom #page {
	transform: translate3d( 0, 100vh, 0 );
	-webkit-transform: translate3d( 0, 100vh, 0 );
	transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; -webkit-transition: all 0.3s ease-in-out;
}

/***
* If the right class is present then transform
* the #page element 240px to the right.
*/
.animating.top #page {
	transform: translate3d( 0, 0, 0 );
	-webkit-transform: translate3d( 0, 0, 0 );
	transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; -webkit-transition: all 0.3s ease-in-out;
}

/***
* If the menu-visible class is present then
* shift the #page 240px from the right edge
* via position: absolute to keep it in the 
* open position. When .animating, .left and
* .right classes are not present the CSS
* transform does not apply to #page.
*/
.cal-visible-ohide {
	overflow: hidden;
}
.cal-visible #page {
	top: calc(100vh - 90px);
}
.cal-visible #holder {
	position: fixed;
}