div.mask{
  display:none;
  position:fixed;
  top:0;
  bottom:0;
  left:0;
  right:0;
  background-color:rgb(20,20,20);
  background-color:rgba(0,0,0,.7);
  z-index:9999999999999998;
}

div#mask2{
	
	z-index:2000;
}

div#alert{
  display:none;
  position:fixed;
  top:10%;
  left:50%;
  width:400px;
  margin-left:-220px;
  z-index:9999999999999999;
  font-family:'Roboto',sans-serif;
  
  
   background-color:#fff;
  
  -moz-border-radius: 4px;
  -webkit-border-radius: 4px;
  -khtml-border-radius: 4px;
  border-radius: 4px;
  
  -webkit-box-shadow: 0px 0px 8px #aaa;
  -o-box-shadow: 0px 0px 8px #aaa;
  -moz-box-shadow: 0px 0px 8px #aaa;
  box-shadow: 0px 0px 8px #aaa;
  
  padding:20px;

}



div#alert .message {
	line-height:1.3em;
	font-weight:bold;
	padding-bottom:30px;
}

div#alert .buttonbar{
	
	text-align:right;
}

div#alert button{
	font-size:16px;
	font-family:'Roboto',sans-serif;
	color:#fff;
	font-weight:500;
	padding:5px 20px;
	border:none;
	border-radius:2px;
	
	transition: transform .5s;
	background-color:deepskyblue;
	/*border:solid 1px deepskyblue;*/
	cursor:pointer;
	margin-left:15px;
}

div#alert button.negative{
	
	background-color:#c00;
}


div#popup-iframe, div#popup-adv, div#popup-content{
  display:none;
  position:fixed;
  top:4%;
  bottom:4%;
  left:4%;
  right:4%;
  z-index:9999999999999999;
  
   background-color:#fff;
  
  -moz-border-radius: 4px;
  -webkit-border-radius: 4px;
  -khtml-border-radius: 4px;
  border-radius: 4px;
  
  -webkit-box-shadow: 0px 0px 8px #aaa;
  -o-box-shadow: 0px 0px 8px #aaa;
  -moz-box-shadow: 0px 0px 8px #aaa;
  box-shadow: 0px 0px 8px #aaa;
  
  padding:0px;

}

div#popup-content{
	
}

div#popup-content .popup-content{
	padding:2em;
	height:calc(100% - 4em);
	overflow-y:auto;
}

div#popup-iframe iframe{
  border:none;
  margin:1%;
  width:98%;
  height:98%;
  overflow-y:auto;
}

div#popup-adv iframe{
  border:none;
  margin:0;
  width:100%;
  height:calc(100% - 50px);
  overflow-y:auto;
}

div#popup-adv .popup-adv-toolbar{
	height:50px;
	position:relative;
}

div#popup-adv.square{
	
}

div.popup-adv-close{
	display:block;
	position:absolute;
	right:15px;
	top:6px;
}

div.popup-adv-close input,div.popup-adv-close span{
	display:inline-block;
	
	font-size:16px;
	vertical-align:middle;
}

div.popup-adv-close span{
	margin-right:20px;
}



button#adv-popup-close{
	
	
	font-size:16px;
	font-family:'Roboto',sans-serif;
	color:#fff;
	font-weight:500;
	padding:5px 20px;
	border:none;
	border-radius:2px;
	
	transition: transform .5s;
	background-color:deepskyblue;
	/*border:solid 1px deepskyblue;*/
	cursor:pointer;
}

div#hidden-iframe{
  display:none;
}

.close-dialog{
  position:absolute;
  right:-10px;
  top:-10px;
  width:24px;
  height:24px;
  background-color:#900;
  color:#fff;
  font-size:12px;
  line-height:24px;
  text-align:center;
  cursor:pointer;
  -webkit-border-radius:12px;
  -moz-border-radius:12px;
  -ms-border-radius:12px;
  border-radius:12px;
}

div#loading{
  display:none;
  position:fixed;
  z-index:1001;
  top:0;
  left:0;
  bottom:0;
  right:0;
  background:url(../images/loading.gif) center center no-repeat;
  
}


@media only screen and ( max-width: 1023px ){
	
	div#popup-iframe, div#popup-content{
		width:auto !important;
		margin-left:0 !important;
		left:4% !important;
		right:4% !important;
		
	}
	
	
}

@media only screen and ( max-height: 700px ){
	
	div#popup-adv.square{
		width:500px !important;
		height:555px !important;
		left:50% !important;
		top:50% !important;
		margin-left:-250px !important;
		margin-top:-275px !important;
	}
}

@media only screen and ( max-height: 560px ){
	
	div#popup-adv.square{
		width:400px !important;
		height:455px !important;
		left:50% !important;
		top:50% !important;
		margin-left:-200px !important;
		margin-top:-225px !important;
	}
}

@media only screen and ( max-height: 460px ){
	
	div#popup-adv.square{
		width:300px !important;
		height:355px !important;
		left:50% !important;
		top:50% !important;
		margin-left:-150px !important;
		margin-top:-175px !important;
	}
	
	div.popup-adv-close input,div.popup-adv-close span{
		font-size:14px;
	}

	div.popup-adv-close span{
		margin-right:15px;
	}
	
	button#adv-popup-close{
		font-size:14px;
		padding:5px 15px;
	
	}
}

@media only screen and ( max-height: 360px ){
	
	div#popup-adv.square{
		width:200px !important;
		height:255px !important;
		left:50% !important;
		top:50% !important;
		margin-left:-100px !important;
		margin-top:-125px !important;
	}
	
	div.popup-adv-close input,div.popup-adv-close span{
		font-size:12px;
	}

	div.popup-adv-close span{
		margin-right:5px;
	}
	
	button#adv-popup-close{
		font-size:12px;
		padding:5px 8px;
	
	}
}



@media only screen and ( max-width: 1023px ) and (orientation: portrait) {
	div#popup-adv.square{
		width:600px !important;
		height:655px !important;
		left:50% !important;
		top:50% !important;
		margin-left:-300px !important;
		margin-top:-325px !important;
	}
}


@media only screen and ( max-width: 767px ) and (orientation: portrait) {
	div#popup-adv.square{
		width:400px !important;
		height:455px !important;
		left:50% !important;
		top:50% !important;
		margin-left:-200px !important;
		margin-top:-225px !important;
	}
}

@media only screen and ( max-width: 479px ) and (orientation: portrait) {
	div#popup-adv.square{
		width:300px !important;
		height:355px !important;
		left:50% !important;
		top:50% !important;
		margin-left:-150px !important;
		margin-top:-175px !important;
	}
}