/*!
 * Bootstrap Modal
 *
 * Copyright Jordan Schroter
 * Licensed under the Apache License v2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 */
 
 /*
  JDP: version (changes)
  
  ---
  Changed background mask to black (as in Bootstrap default)
    line 142:
	.modal-backdrop, 
	.modal-backdrop.fade.in,
	.modal-backdrop.slide.in{
		opacity: 0.7;
		filter: alpha(opacity=70);
		background: #000;
	}
    
  ---
  have changed original .fade class
  > removed slide transition from top.
  Now .fade provides a fade only effect
  > old version retained as a new .slide class.
  Implement as: <div id="mySimpleModal" class="modal hide fade slide" tabindex="-1">...
  
  ---
  
  Changed line 207: responsive layout offset 
	  @media (min-width: 1200px) {
		.modal.container {
			width: 1170px;
			margin-left: -453px;
		}
	}

   --- 
  POSSIBLY change line 117 to:
  .modal-body {	
	overflow: auto;
	}
	? makes scroll overflow work on browsers (although still not on phones)

  ---

*/
.modal-open.has-modal-container {
	position: relative; /* safari */
	overflow: hidden;
}


/* add a scroll bar to stop page from jerking around */
.modal-open.page-overflow .page-container,
.modal-open.page-overflow .page-container .navbar-fixed-top,
.modal-open.page-overflow .page-container .navbar-fixed-bottom,
.modal-open.page-overflow .modal-container  {
	overflow-y: scroll;
}

@media (max-width: 979px) {
	.modal-open.page-overflow .page-container .navbar-fixed-top,
	.modal-open.page-overflow .page-container .navbar-fixed-bottom  {
		overflow-y: visible;
	}
}

.modal-container {
	display: none;
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	overflow: auto;
	z-index: 9999;
}

.modal-open > .modal-container {
	display: block;
}
.modal-scrollable {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	overflow: auto;
}
.modal {
	outline: none;
	position: absolute;
	margin-top: 0;
	top: 50%;
	overflow: visible; /* allow content to popup out (i.e tooltips) */
}

.modal.fade {
	-webkit-transition: opacity 0.3s linear;	
	   -moz-transition: opacity 0.3s linear;
	     -o-transition: opacity 0.3s linear;
	        transition: opacity 0.3s linear;
}
.modal.fade, .modal.fade.in {
	top: 50%;
}

.modal.slide {
	top: -100%;
	-webkit-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;	
	   -moz-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
	     -o-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
	        transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
}

.modal.slide.in {
	top: 50%;
}

.modal-body {
	
	max-height: none;
	overflow: visible;
	/* Fix
	overflow: auto;*/
}

.modal.modal-absolute {
	position: absolute;
	z-index: 950;
}

.modal .loading-mask {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background: #fff;
	border-radius: 6px;
}

.modal-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
}

.modal-backdrop.modal-absolute{
	position: absolute;
	z-index: 940;
}

.modal-backdrop, 
.modal-backdrop.fade.in,
.modal-backdrop.slide.in{
	opacity: 0.7;
	filter: alpha(opacity=70);
	background: #000;
}

.modal.container {
  width: 940px;
  margin-left: -470px;
}

/* Modal Overflow */

.modal-overflow.modal {
	top: 1%;
	/*bottom: 1%;*/
}

.modal-overflow.modal.slide {
	top: -100%;
}

.modal-overflow.modal.slide.in {
	top: 1%;
	/*bottom: 1%;*/
}

.modal-overflow .modal-body {
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

/*.modal-overflow .modal-body {
	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
	left: 0;
	margin-top: 48px; // header height
	margin-bottom: 60px; // footer height
	overflow: auto;
}


.modal-overflow .modal-footer {
	position: absolute;
	bottom: 0;
	right: 0;
	left: 0;
}*/

/* Responsive */

@media (min-width: 1200px) {
	.modal.container {
		width: 1170px;
		/* Original
		margin-left: -585px;*/
		margin-left: -453px;
	}
}

@media (max-width: 979px) {
	.modal, 
	.modal.container,
	.modal.modal-overflow 	{
		top: 1%;
		right: 1%;
		left: 1%;
		bottom: auto;
		width: auto !important;
		height: auto !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	
	.modal.slide.in, 
	.modal.container.slide.in,
	.modal.modal-overflow.slide.in {
		top: 1%;
		bottom: auto;
	}
	
	.modal-body,
	.modal-overflow .modal-body {
		position: static;
		margin: 0;
		height: auto !important;
		max-height: none !important;
		overflow: visible !important;
	}
	
	.modal-footer,
	.modal-overflow .modal-footer {
		position: static;
	}
}

.loading-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -12px 0 0 -12px;
}
