.modal {
  max-width: 90vw;
  max-height: 100vh;
  background-color: fff;
  margin: 0 auto;
  position: absolute;
  left: 12%;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 10;
/*  box-shadow: 0 .25em .5em rgba(0, 0, 0, .25);*/
  transition: opacity .4s ease-out, visibility 0s ease-out .3s, transform .4s ease-out .4s;
  backface-visibility: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(.8) translate3d(0,0,0);
  pointer-events: none;
}

/* Mobile */
@media (max-width: 800px) {
	.modal {
	 max-width: 100vw;
  left: 0%;
	}
}

.modal[aria-hidden="false"] {
  position: fixed;
  transition: opacity .4s ease-out, visibility 0s ease-out 0s, transform .4s ease-out 0s;
  opacity: 1;
  visibility: visible;
  transform: scale(1) translate3d(0,0,0);
  pointer-events: auto;
}


/* Class added to body tag and id="content" tag when modal is open */

.-modal-open {
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}


/* Light box properties */

.lightbox {
  text-indent: -200em;
  background-color: rgba(151,162,176, 0.8);
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  /* places the modal overlay between the main page (0) and the modal dialog (10) */
  z-index: 5;
  cursor: pointer;
  transition: opacity .4s ease-out, visibility 0s ease-out .4s;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lightbox-on {
  transition: opacity .4s ease-out, visibility 0s ease-out 0s;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.lightbox-on:hover {
  /* Stolen from trickle.js. Under consideration. SVGs will not work here */
  cursor: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAANpJREFUOBGNkz0KAjEQhYPYWXgCKws7LcXWyt7WG4i9jegBvIJ4AvEyXsRCsBDiN0sGkiE/O/A2O9n3viS7rPPeb9ETrVzPwrtHDzR1XF5I6oPWLQaeq5hDXQRw0I6xCuF5HH7Tz7oFuTkhrSyEhza8THaLoQhphpWUg/QOFyA/AFpy5nTbGrIjxvg4AiiGBzYc+rGZH9KPzFy+ZbX4bX9l+VDZr5NQMMbhbtvMxccpQ3JhpTchtXATQviItIpvW0CY7HHm8c9UDRd2chbABt3RQk2tEe8O3dDkD4JQ4iOR7BMpAAAAAElFTkSuQmCC"), pointer;
}


/* Modal title and description */

.modal_title,
.modal_desc {
	display: none;	
/*
  position: absolute;
  top: 5px;
  left: -200em;
  background-color: red;
  color: #000;
  text-shadow: 0 0 0 #fff;
  font-size: 20px;
  padding: 0.125em .25em;
  margin: 0;
*/
}

.modal_title:focus,
.modal_desc:focus {
  left: 5px;
}

[aria-hidden="false"] .modal_title {
  transition: opacity .5s ease-out 3s;
  opacity: 0;
}

.modal_title,
.modal_title:focus {
  opacity: 1;
  transition: opacity .5s ease-out;
}


/* The iframe */

.modal_iframe {
  transition: opacity .4s ease-out, visibility 0s ease-out 1s;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal_iframe-on {
  transition: opacity 600ms ease-out, visibility 0s ease-out 0s;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}


/* The modal pop-ups close button, appears last in the modal but is moved visually to the top right of the pop-up */

.modal_lnk-close {
  cursor: pointer;
  position: absolute;
  top: 80px;
  right: 60px;
  border: 0 solid;
  border-radius: 450%;
  width: 30px;
  height: 30px;
  background-color: #005890;
  overflow: hidden;
/*  transition: background-color .3s ease-out;*/
	background-image: url("../icons/icon-x-white-s.svg");
		background-size: contain;
}

.modal_lnk-close:hover,
.modal_lnk-close:active{
/*  background-color: #97A2B0;*/
  outline: 0 solid;
/*	background-image: url("../icons/icon-x-s.svg");*/
	background-color:#000000;
  box-shadow: 0 .25em .5em rgba(0, 0, 0, .25);

}

.modal_lnk-close:focus {
	  outline: 20px solid rgba(0, 88, 144, .3);
}

.modal_lnk-close span {
  position: absolute;
  top: 0;
  left: -200em;
  display: block;
}

.svg-close {
  pointer-events: none;
  width: 40px;
  height: 40px;
  stroke: #fff;
  stroke-width: 2;
}


/* Modal opening link */

.lnk_modal-open {
  display: inline-block;
  text-decoration: none;
  border: 0 solid;
  margin: 0 auto;
  transition: box-shadow .3s ease-out, filter .3s ease-out;
}

.lnk_modal-open:hover {
  -webkit-filter: contrast(120%);
  filter: contrast(120%);
}

.lnk_modal-open:hover,
.lnk_modal-open:focus {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .6);
}

.lnk_modal-open:focus {
  outline: none;
}

.lnk_modal-open:active {
  -webkit-filter: brightness(85%);
  filter: brightness(85%);
}

[role="dialog"][aria-hidden="true"] .modal_iframe {
  display: none;
}

[role="dialog"][aria-hidden="false"] .modal_iframe {
  display: block;
}

.img_modal-open {
	/*The image within "thumbnail", previously named "teaser"*/
	width: 100%;
	height:100%;
/*	max-width: 800px;*/
/*	max-height: 600px;*/
	opacity: 1;
	vertical-align: middle;
	-o-object-fit:cover;
	   object-fit:cover;
	-webkit-transform:scale(.50) .4s ease-in-out,transform .4s ease-in-out;
	    -ms-transform:scale(.50) .4s ease-in-out,transform .4s ease-in-out;
	        transform:scale(.50) .4s ease-in-out,transform .4s ease-in-out;
	-webkit-transition:all 300ms ease-in-out,-webkit-transform 300ms ease-in-out;
	-o-transition:all 300ms ease-in-out,transform 300ms ease-in-out;
	transition:all 300ms ease-in-out,transform 300ms ease-in-out;
}
.img_modal-open:hover {
	opacity: .4;
	-webkit-transform: scale(1.07);
	    -ms-transform: scale(1.07);
	        transform: scale(1.07);
}
.img_modal-open:focus {
	border: 3px #005890 solid;

}

/* Modal SVG (Tesco) loading animation version 2 (overlaid on itself and out of phase) */

[class*="svg-loading"] {
  position: absolute;
  width: 80px;
  height: 80px;
  top: calc(50% - 40px);
  left: calc(50% - 40px);
  z-index: -1;
  transition: opacity .3s ease-out;
  backface-visibility: hidden;
}

.svg-loading {
  fill: red;
  -webkit-animation: rotate 4s linear 0s infinite;
  animation: rotate 4s linear 0s infinite;
}

.svg-loading2 {
  /* Match to .modal background color for full effect */
  fill: blue;
  -webkit-animation: rotate 5s linear 1s infinite;
  animation: rotate 5s linear 1s infinite;
}

.svg-loading.OFF {
  opacity: 0;
}

@-webkit-keyframes rotate {
  to {
    -webkit-transform: rotate(360deg) translate3d(0,0,0);
    transform: rotate(360deg) translate3d(0,0,0);
  }
}

@keyframes rotate {
  to {
    -webkit-transform: rotate(360deg) translate3d(0,0,0);
    transform: rotate(360deg) translate3d(0,0,0);
  }
}

xa {
  background-color: #515D6B;
  box-shadow: 0 0 0 2px #515D6B;
}