/* Vertical centering trick http://css-tricks.com/centering-in-the-unknown/ 
https://codepen.io/dsheiko/pen/jCcld
*/
.emo-modal::before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
  margin: 0;
}

.emo-target {
  display: block;
  left: 0;
  position: fixed;
  top: 0;
  width: 0;
  height: 0;
  visibility: hidden;
  pointer-events: none;
 }

.emo-modal {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 10000;
  text-align: center;
  display: none;
  /* Fallback for legacy browsers */
  background-color: rgba(0,0,0,0.0);
}
.emo-modal > .content {
   text-align: left;
   display: inline-block;
   background-color: #1d1f20;
   box-sizing: border-box;
   color: white;
   /*position: relative;*/
   /*width: 500px;*/
   padding: 0px;
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    margin: auto;
 }
 @media (orientation: portrait) {
 	   .emo-modal > .content { 
 	   		max-height: 900px;
    		max-width: 600px;
 	   }
 }
 @media (orientation: landscape) {
 	   .emo-modal > .content { 
 	   		max-width: 1000px;
    		max-height: 650px;
 	   }
 }
 .emo-modal .content .close-btn,  .emo-modal .content .help-btn, #emo-backbtn .emo-backbtn{
    position: absolute;
    top: -10px;
    right: -10px;
    width: 46px;
    height: 46px;
    color: white;
    font-size: 36px;
    text-decoration: none;
    background: #da1515 URL('https://api.emotionum.com/_data/assets/x.svg') center no-repeat;
    background-size: cover;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    box-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    border: 2px solid white;
 }
#emo-backbtn {
	position: relative;
	display: block;
} 
 #emo-backbtn .emo-backbtn {
    background: #6ba410 URL('https://api.emotionum.com/_data/assets/back.svg') center no-repeat;
    background-size: cover;
    content:"";
}

 .emo-modal .content .help-btn {
    left: -10px;
    background: #6ba410 URL('https://api.emotionum.com/_data/assets/help.svg') center no-repeat;
    background-size: 30%;
  }

 /* Behaviour on legacy browsers */
.emo-target:target + .emo-modal {
    display: block;
}

/* Fallback for IE8 */
.emo-modal.is-expanded {
   display: block;
}
.emo-modal.is-expanded > .content {
  top: 50%;
  margin-top: -45px;
}

/* Making main page blurred when modal window open */
:root .emo-target:target ~ .page-container,
:root .emo-target.active ~ .page-container {
   filter: blur(5px);
  -webkit-filter: blur(5px);
  filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' ><filter id='blur5'><feGaussianBlur in='SourceGraphic' stdDeviation='5' /></filter></svg>#blur5"); // for Firefox
  filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='5');
  overflow: hidden;
}
:root span[id="start"]:target ~ .page-container {
 filter: none;
 -webkit-filter: none;
}

/* Behavior on modern browsers */
:root .emo-modal {
  display: block;
  /*background-color: transparent;*/
  transition: transform 0.3s cubic-bezier(0.5, -0.5, 0.5, 1.1);
  transform-origin: center center;
  transform: scale(0, 0);
}
:root .emo-modal > .content {
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}
:root .emo-target:target + .emo-modal,
:root .emo-target.active + .emo-modal,
#emo-modal.activevote,
#emo-modal.active {
  transform: scale(1, 1) !important;
  display:block !important;
}

#emo-modal.activevote > .content {
	height: 90vh;
	width: 70vh;
	max-width: 90%;
}
#emo-modal.activevote > .content::before {
    content: "";
    display: block;
    padding-bottom: calc(100% / 0.833);
    position: absolute;
}
.emo-modal.activevote .content .close-btn, .emo-modal.activevote .content .help-btn, .activevote #emo-backbtn .emo-backbtn {
	top: -28px;
}

/** some layout stuff **/
/* Extra Small Devices, Phones */
#emo-content td, #emo-content td img {border: 0; vertical-align: middle;}

@media only screen and (max-width : 480px){
	.hidden-xs {display: none;}
}
td .emo-team-logo {width: 20px;}
td[align*=left]{text-align: left;}
td[align*=right]{text-align: right;}
td[align*=center]{text-align: center;}