#facebox {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  text-align: left;
}

#facebox,
#facebox .content,
#facebox .body {
  overflow: visible !important;
}

#facebox .popup{
  position:relative;
  border:1px solid #ccc;
  -webkit-border-radius:2px;
  -moz-border-radius:2px;
  border-radius:3px;
  -webkit-box-shadow:0 0 10px rgba(0,0,0,0.2);
  -moz-box-shadow:0 0 10px rgba(0,0,0,0.2);
  box-shadow:0 0 10px rgba(0,0,0,0.2);
}

#facebox .content {
  display:table;
  width: 350px;
  padding: 0px;
  background: #fff;
  -webkit-border-radius:2px;
  -moz-border-radius:2px;
  border-radius:3px;
  cursor: auto;
  
    max-height: calc(100vh - 100px); /* or adjust to your design */
  overflow-y: auto;
  overflow-x: hidden;
}

#facebox .content > p:first-child{
  margin-top:0;
}
#facebox .content > p:last-child{
  margin-bottom:0;
}

#facebox .close{
  position:absolute;
  top:5px;
  right:5px;
  padding:3px;
  background:transparent;
}

#facebox .close img{
  /* opacity:0.5; */
}
#facebox .close:hover img{
  opacity:1.0;
}

#facebox .loading {
  text-align: center;
}

#facebox .image {
  text-align: center;
}

#facebox img {
  border: 0;
  margin: 0;
}

#facebox_overlay {
  position: fixed;
  top: 0px;
  left: 0px;
  height:100%;
  width:100%;
}

.facebox_hide {
  z-index:-100;
}

.facebox_overlayBG {
  background-color: #000;
  z-index: 99;
}


#facebox_iframe_P {
	position: relative;
	border: none;
	display: block;
	min-width: 850px;
	min-height: 700px;
	margin-top: -15px;
	margin-bottom: -15px;
	background-image: url('/SYSTEM/JS_FILES/facebox/loading.gif');
	background-position: center center;
	background-repeat: no-repeat;	
}


#facebox_iframe_L {
	position: relative;
	border: none;
	display: block;
	min-width: 1024px;
	min-height: 720px;
	margin-top: -15px;
	margin-bottom: -15px;
	background-image: url('/SYSTEM/JS_FILES/facebox/loading.gif');
	background-position: center center;
	background-repeat: no-repeat;	
}
