/* ==== popup ==== */

.body_lock {
  overflow: hidden;
}

#modal_window{
	position: fixed;
	top:0;
	left:0;
	margin:0;
	padding: 0;
	width: 100%;
	height: 100%;
	max-width:100%;
	max-height:100%;
	overflow-x: hidden;
	overflow-y: auto;
	z-index:998;
}
#modal_title {
  position:relative;
  margin: 0;
	padding: 7px 4px;
	width: calc(100% - 8px);
	height: calc(40px - 14px);
	text-align: center;
	font-size: 22px;
	color:#fff;
	background-color:#aaa;
}
#modal_content {
  position:relative;
  margin: 0;
  padding: 0;
	width: 100%;
	font-size: 13px;
	text-align: center;
	background-color: #eee;
}

/* desktop overrides */
@media only screen and (min-width:700px){
	#modal_window{
	  top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    -o-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width:auto;
		height:auto;
		max-width:90%;
		max-height:90%;
    margin: auto;
    /* shadow */
		-moz-box-shadow: 0 4px 8px rgba(0,0,0,.32),0 8px 40px rgba(0,0,0,.4);
    -webkit-box-shadow: 0 4px 8px rgba(0,0,0,.32), 0 8px 40px rgba(0,0,0,.4);
    box-shadow: 0 4px 8px rgba(0,0,0,.32), 0 8px 40px rgba(0,0,0,.4);
	}
	#modal_title {
		padding: 6px 4px;
		width: calc(550px - 8px);
		height: calc(40px - 12px);
		font-size: 20px;
		color: #333;
		font-weight:bold;
	  /* cursor shows dragging availability */
	  cursor:move;
		cursor: grab;
    cursor: -moz-grab;
    cursor: -webkit-grab;
	}
	#modal_title:active {
	  cursor: grabbing;
    cursor: -moz-grabbing;
    cursor: -webkit-grabbing;
	}
	#modal_content {
		width: auto;
		height: auto;
	}
}

/* close btn mobile */
@media only screen and (max-width:699px){
	#modal_closebtn {
		position: absolute;
		top: 0px;
		right: 0px;
		margin:0;
		padding: 8px;
		width:calc(40px - 16px);
		height:calc(40px - 16px);
		cursor: pointer;
		background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAAABGdBTUEAAK/INwWK6QAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfhChcHMyhSI85PAAABV0lEQVRYw+3Zu0rEQBSA4X8mK4iNvoG9Cr6BiJ34BIq+m7ooaK9vYWVp5a0WwW7j/hargqsbNzgTRWYCSRHIxzlzYSYn0Ko5ekQEzoAtIDAECO0+1Y4VMRqs7KvatzIYR2+6YI/V2lo9tjIYssEf2CN1oK/3IysxT6YnsG/0iXNZ6AZWn9UnV8XYNfvouhgT9/EU7IZYJR5cU7K9xNOpsIUtbGELW9g/zc5I2quJHY5HmxqezD64lmFTA0AwIpFDdqjpfeiDwDUXzFPnOCQEA5E+22Ns9tYjsD+RdXQqytGC52zyTNVltACpN+EtIo4csPsbqf7FwTVkD7+cTldcssAgy5m7cbm8cSnDYewdblq77lzJt2Q2R52J5hu6HqfTp7vQhS50oQtd6P9Gp/6JOhV963KmDdK39L2L3dMD9dRZO65K5C6GfKK7K/98on9Y8GqZoHQlvheEhOiN9RuBcwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0xMC0yM1QwNzo1MTo0MC0wNDowMLmkxWgAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMTAtMjNUMDc6NTE6NDAtMDQ6MDDI+X3UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5ErkJggg==');
		background-repeat: no-repeat;
		background-size: 24px 24px;
		background-position: center; 
		z-index:999;
		/* rotate the arrow 180 deg */
		-webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    transform: rotate(180deg);
	}
}

/* close btn desktop */
@media only screen and (min-width:700px){
	#modal_closebtn {
		position: absolute;
		top: 11px;
		right: 13px;
		margin:0;
		padding: 2px;
		padding-left: 3px;
		width: calc(16px - 5px);
		height: calc(16px - 4px);
		background-color: #fff;
		font-size: 12px;
		color: #333;
		text-align: center;
		cursor: pointer;
		z-index:999;
	}
	#modal_closebtn:after {
		content:"X";
	}
}

/* mobile hide scrolling */
@media only screen and (max-width:699px){
  #modal_content {
    height: calc(100% - 40px);
  }
	#modal_window::-webkit-scrollbar { 
    display: none; 
	}
	#modal_content::-webkit-scrollbar { 
    display: none; 
	}
}

/* shadow overlay */
#modal_shadow {
  position:fixed;
  top:0;
  left:0;
	width:100%;
	height:100%;
	overflow:hidden;
	z-index:997;
	background: #000;
	opacity: 0.4;
	-moz-opacity: 0.4;
}

/* intent overrides */
#modal_window.pop_intent , #modal_window.pop_confirm {
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  width:auto;
	height:auto;max-width:90%;
	max-height:90%;
	text-align:center;
  margin: auto;
  /* shadow */
	-moz-box-shadow: 0 4px 8px rgba(0,0,0,.32),0 8px 40px rgba(0,0,0,.4);
  -webkit-box-shadow: 0 4px 8px rgba(0,0,0,.32), 0 8px 40px rgba(0,0,0,.4);
  box-shadow: 0 4px 8px rgba(0,0,0,.32), 0 8px 40px rgba(0,0,0,.4);
}
#modal_window.pop_intent #modal_title {
	display:none;
}
#modal_window.pop_intent #modal_closebtn , #modal_window.pop_confirm #modal_closebtn {
	display:none;
}
#modal_window.pop_intent #modal_content , #modal_window.pop_confirm #modal_content {
	width: 320px;
	height: 340px;
	max-width:100%;
	max-height:100%;
}

/* confirm overrides */
#modal_window.pop_confirm {
  height:220px;
}
#modal_window.pop_confirm #modal_content {
  height:calc(220px - 40px);
}
@media only screen and (min-width:700px){
  #modal_window.pop_confirm {
    height:210px;
  }
  #modal_window.pop_confirm #modal_content {
    height:calc(210px - 40px);
  }
}
