/************************************
 * COMMON
************************************/

:root {
    --menu-scaler: 1.0;
}

/*@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
    :root {
        --menu-scaler: 0.8;
    }
}*/


@media (min-aspect-ratio : 65/100) and (orientation : portrait) {
    :root {
        --menu-scaler: 0.8;
    }
}



html, body {
	-webkit-tap-highlight-color: rgba(0,0,0,0);
	overflow: hidden !important;
	width: 100vw;
	height: 100%;
	max-height: 100vh;
	margin: 0;
	padding: 0;
    background-color: #edd7c3;
    /*background-color: green;*/
	background-size: 100% 100%;
}


body > img {
	opacity: 0;
	width: 1px;
	height: 2px;
}


html.error, 
html.error body {
	overflow: visible !important;
	width: 100%;
	height: auto;
	min-height: 100%;
	max-height: none;
}


button {
	background: transparent;
	border: 0;
	outline: transparent;
	padding: 0;
}


.absolute {
	display: block;
	position: absolute;
}


.icon,
.paddedHeight {
	display: block;
	height: auto;
}


.icon::after,
.paddedHeight::after {
	display: block;
	content: "";
}


.button {
	cursor: pointer;
	z-index: 100;
}


.noEvents {
	pointer-events: none;
}


.absolute-fill {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	min-height: 100%;
}


.hidden {
	display: none !important;
}


* {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;

    touch-action: none;
}


/***************************************
 * UI
***************************************/

#uiContainer, #introBackground, #introImage, #baileysLogo, #baileysLogoDesktop, #stepImage, #eighthWallLogo, #goOnLogo, #drinkAwareLogo, #centerButton,
#menuContainer, #menuItemTitle, #menuItemImage, #menuLeftArrowButton, #menuRightArrowButton, #menuSelectButton,
#finishedButton, #addMoreButton, #reloadButton, #shareTwitterButton, #shareFacebookButton
{
    z-index: 5;
    position: absolute;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    pointer-events: none;
    transition: background-image 0.3s ease-in-out;
}


#uiContainer {
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
}


#introBackground {
    width: 100%;
    height: 100%;
    background-image: url('../images/background2.jpg');
    background-size: cover;
}


@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
    #introBackground {
        width: 100%;
        height: 100%;
        background-image: url('../images/background_ipad.jpg');
        background-size: cover;
    }
}


#introImage
{
    width: 55vw;
    height: 38vh;
    bottom: 19vh;
    left: 50%;
    object-fit: contain;
    transform: translateX(-50%);
}








#baileysLogo {
    z-index: 15;
    top: 2vw;
    width: 50vw;
    height: calc( 50vw * 0.44 );
    left: 50%;
    transform: translateX(-50%);
    background-image: url('../images/baileys_logo.png');
    pointer-events: auto;
}

#baileysLogoDesktop {
    z-index: 15;
    top: 2vw;
    width: 25vw;
    height: calc( 25vw * 0.44 );
    left: 50%;
    transform: translateX(-50%);
    background-image: url('../images/baileys_logo.png');
    pointer-events: auto;
}

#stepImage {
    top: 28vw;
    width: 79vw;
    height: calc( 79vw * 0.256 );
    left: 50%;
    transform: translateX(-50%);
	background-image: url('../images/step1.png');
}

#eighthWallLogo {
    z-index: 15;
    bottom: 5vw;
    width: 40vw;
    height: calc( 40vw * 0.244 );
    left: 50%;
    transform: translateX(-50%);
	background-image: url('../images/powered_8th_wall.png');
}

#goOnLogo {
    z-index: 15;
    bottom: 6vw;
    width: 64vw;
    height: calc( 64vw * 0.244 );
    left: 50%;
    transform: translateX(-50%);
	background-image: url('../images/go_on.png');
}

#drinkAwareLogo {
    z-index: 15;
    bottom: 1vw;
    width: 45vw;
    height: calc( 45vw * 0.054 );
    left: 50%;
    transform: translateX(-50%);
	background-image: url('../images/drink_aware.png');
}

#centerButton {
    bottom: 5vw;
    width: 40vw;
    height: calc( 40vw * 0.29 );
    left: 50%;
    transform: translateX(-50%);
    background-image: url('../images/pour_drink.png');
    pointer-events: auto;
}




#menuContainer {
    z-index: 6;
    width: calc( 95vw * var(--menu-scaler) );
    height: calc( 95vw * 0.82 * var(--menu-scaler) );
    top: 54%;
	left: 50%;
	transform: translate(-50%, -50%);
    background-image: url('../images/menu_background.jpg');
    transition: opacity 0.3s ease-in-out, visibility 0.9s linear;
}

@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
    #menuContainer {
        top: 66%;
    }
}




#menuItemTitle {
    z-index: 6;
    width: calc( 95vw * 0.7 * var(--menu-scaler) );
    height: calc( (95vw * 0.7) * 0.064 * var(--menu-scaler) );
    top: 4%;
    left: 50%;
    transform: translateX(-50%);
}




#menuItemImage {
    z-index: 6;
    width: calc( 95vw * 0.55 * var(--menu-scaler) );
    height: calc( 95vw * 0.45 * var(--menu-scaler) );
    top: 18%;
    left: 50%;
    object-fit: contain;
    transform: translateX(-50%);
}




#menuLeftArrowButton, #menuRightArrowButton
{
    z-index: 6;
    width: calc( 95vw * 0.08 * var(--menu-scaler) );
    height: calc( (95vw * 0.08) * 1.087 * var(--menu-scaler) );
    top: 45%;
    transform: translateX(-50%);
    background-image: url('../images/left_arrow.png');
    pointer-events: auto;
}

#menuLeftArrowButton
{
    left: 13%;
}

#menuRightArrowButton {
    right: 5.5%;
    background-image: url('../images/right_arrow.png');
}

#menuSelectButton {
    z-index: 6;
    width: calc( 95vw * 0.44 * var(--menu-scaler) );
    height: calc( (95vw * 0.44) * 0.289 * var(--menu-scaler) );
    top: 76%;
    left: 50%;
    transform: translateX(-50%);
    background-image: url('../images/menu_select.png');
    pointer-events: auto;
}



#finishedButton {
    bottom: 5vw;
    width: 40vw;
    height: calc( 40vw * 0.29 );
    left: 27%;
    transform: translateX(-50%);
    background-image: url('../images/finished.png');
    pointer-events: auto;
}

#addMoreButton {
    bottom: 5vw;
    width: 40vw;
    height: calc( 40vw * 0.29 );
    left: 73%;
    transform: translateX(-50%);
    background-image: url('../images/add_more.png');
    pointer-events: auto;
}






#takePhotoButton, .photoCloseButton {
	position: fixed;
    width: 20vw;
    height: 20vw;
    bottom: 5vw;
    left: 50%;
    transform: translateX(-50%);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    pointer-events: auto;
    background-image: url('../images/take_photo.png');
}


#instructionsButton {
  position: absolute;
  width: 72vmin;
  height: 24.63vmin;
  bottom: 3vmax;
  left: 50%;
  transform: translateX(-50%);
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: center center;
  pointer-events: auto;
  background-image: url('../images/ins0.png');
}


#reloadButton {
	position: absolute;
    width: 9vw;
    height: 11vw;
    top: 6vw;
    left: 4vw;
    transform: translateX(50%);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    pointer-events: auto;
	background-image: url('../images/reload_button2.png');
}


#shareTwitterButton
{
	position: absolute;
    width: 16vw;
    height: calc( 16vw * 0.336 );
    top: 5vmin;
    right: 13vmin;
    transform: translateX(50%);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    pointer-events: auto;
	background-image: url('../images/share_twitter.png');
}


#shareFacebookButton
{
	position: absolute;
    width: 16vw;
    height: calc( 16vw * 0.336 );
    top: 12vmin;
    right: 13vmin;
    transform: translateX(50%);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    pointer-events: auto;
	background-image: url('../images/share_facebook.png');
}


/***************************************
 * Photo
***************************************/


#photoContainer {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	right: 0;
	z-index: 10;
	pointer-events: none;
}


#flash {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	right: 0;
	background-color: white;
	z-index: 10;
	opacity: 0;
	transition: 0.5s;
}


.flash #flash {
	opacity: 1;
	transition: 0s;
	pointer-events: auto;
}


#photoImage {
	position: absolute;
	max-width: 65%;
	max-height: 65%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -60%);
	box-shadow: 0px 0px 0px 5px #fff9de;
	border-radius: 2vmax;
	opacity: 0;
	transition: 0.5s;
}


.photo #photoImage {
	opacity: 1;
	transition: 0s;
	pointer-events: auto;
}


.photoCloseButton {
	left: 50%; /*61%*/
	background-image: url('../images/close_button.png');
	display: none;
}












#deviceOrientation {
	background-color: #521c12;
	z-index: 1000 !important;
    display: none;
    background-image: url('../images/background_landscape.jpg');
    background-size: cover;
}

#desktopError {
    background-color: #521c12;
	z-index: 5000 !important;
    display: none;
    background-image: url('../images/background_landscape.jpg');
    background-size: cover;
}


@media ( min-width: 1030px ) { /* desktop */
	#deviceOrientation {
		display: none !important;
    }

    #desktopError {
        display: block;
    }  
}


@media (orientation: landscape ) and ( max-width: 1024px ) { /* ipad max is 1024 */
	#deviceOrientation {
		display: block;
    }
}


/*#loadTitleLandscape {
	z-index: 11;
    position: absolute;
    top: 0;
    width: 100vw;
    height: 21.3vw;
	background: url('../images/landscape_title.png') center center no-repeat;
	background-size: contain;
}*/

#promptRotateDevice {
	z-index: 11;
    position: absolute;
    top: 23vw;
    width: 75vw;
    height: 42vh;
    transform: translate(15%);
	background: url('../images/prompt_turn_device.png') center center no-repeat;
	background-size: contain;
}


.fadeOut { animation: fadeOut 0.3s linear forwards; }
@keyframes fadeOut {
  0% {opacity: 1;}
  100% {opacity: 0;}
}


.fadeIn { animation: fadeIn 0.3s linear forwards; }
@keyframes fadeIn {
  0% {opacity: 0;}
  100% {opacity: 1;}
}