html {
  box-sizing: border-box;
}

body.modal-open { /* stop body scroll -- class added to body via js */
 overflow: hidden;
 margin-right: 47px;
}

/* The Modal (background) */
.modal {
  display: none;
  cursor: pointer;
  position: fixed;
  padding-top: 120px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0,0,0,0.8);
  z-index: 100;
  -webkit-tap-highlight-color: transparent;
}

/* Modal Content */
.modal-content {
  position: relative;
  height: auto;
  padding: 0;
  width: 95%;
  margin:auto;
  max-width: 950px;
  text-align: center;
}

@media only screen and (min-device-width: 1200px){
.modal {
  padding-top: 20px;
}
.modal-content {
  width: 90%;
  height: auto;
  max-width: 1200px;
}}

/* The Close Button */
.close {
  color: #AFAFAF;
  cursor:pointer;
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 65px;
  font-weight: bold;
}

@media only screen and (min-device-width: 1200px){
.close {
  font-size: 35px;
}}

.close:hover,
.close:focus {
  color: #AFAFAF;
  text-decoration: none;
  cursor: pointer;
}

.slide-wrapper {
  position: relative;
  height: 1050px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; /* vertical center for images under 800px high -apply diplay:flex to parent div */
}
.mySlides {
  display: none;
}


img.slide {
  position: relative;
   border-radius: 5px;
  outline: 3px ridge #AFAFAF;
  max-height: 800px;  /* keep portraits same height as landscapes */
  max-width: 900px; 
  margin: auto; 
}

@media only screen and (min-device-width: 1200px){
img.slide {
  height: 800px;
  width: auto;
  max-width: 1200px;
}
.slide-wrapper {
  height: 870px;   /* keep the thumbs strip down with enough space for caption   */
}}

@media only screen and (min-device-width: 1400px){
img.slide{
  height:933px;
  max-height: 80vh;
  max-width: 1400px;
}}

.slidecaption {
  background-color: none;
  height: 150px;
  padding: 35px 0 15px 0;
  color: #AFAFAF;
  font-size: 2rem;
  z-index: 50;
}

@media only screen and (min-device-width: 1200px){
.slidecaption {
  height: 40px;
  padding: 10px 0;
  font-size: 1.1rem;
  }}


/* Next & previous area */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 0;
  bottom:0;
  width: 50%;
  user-select: none;
  -webkit-user-select: none;
  z-index: 10;
}
.prev{ /* Position the "prev area" to the left */
  left:0px;
}
.next { /* Position the "next area" to the right */
  right: 0;
}

/* Next & previous buttons */
.prev-button, .next-button {
  cursor: pointer;
  position: absolute;
  bottom: -400px;
  margin-top: -50px;
  width: 60px;
  height: 30px;
  padding: 19px;
  color: #AFAFAF;
  font-weight: bold;
  font-size: 45px;
  transition: 0.6s ease;
  border-radius: 0 6px 6px 0;
  user-select: none;
  -webkit-user-select: none;
	}

/* Position the "next button" to the right */
.next-button {
  right: 0;
  border-radius: 6px 0 0 6px;
}

@media only screen and (min-device-width: 1200px){
.prev-button, .next-button {
  top: 50%;
  font-size: 20px;
}
/* On hover, add a dark background */
.prev-button:hover,
.next-button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}}

.pause1, .play1 {
  cursor:pointer;
  position: absolute;
  width: 150px;
  height: 50px; 
  bottom: -400px;
  left: 48%;
  margin: -50px 0 0 -60px;
  border-radius: 10%;
  color: #AFAFAF;
  text-align:center;
  padding: 20px 0 0 0;
  z-index: 100;
  }
.pause1 {font-size: 1.8rem; } 
.play1 {font-size: 2.8rem; } 

.pause0, .play0 {
  display: none;
  }

@media only screen and (min-device-width: 1200px){
.pause1, .play1 {
  bottom: 65px;
  left: 48%; /* Can't center with 50%!! */
  margin: 0;
  } 
.pause1 {font-size:1.3rem; } 
.play1 {font-size:1.9rem; } 

.pause1:hover, .play1:hover {
  background-color: rgba(0, 0, 0, 0.6);
  box-shadow: 1px 1px 3px #999999;
  transition: 0.4s ease;
}}


.strip {
  display: flex;
  flex-wrap: nowrap; /* how to allow overflow y ??? */
  max-height: 200px;
  max-width: 900px; 
  border-radius: 5px;
  width: fit-content;  /* collapse width with only few thumbs */
  margin:auto;       /* center strip */
  border: 3px ridge #AFAFAF;
  overflow-x: auto;  /* allow scrolling */
  overflow-y: hidden;
  white-space: nowrap;
  text-align: center;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
	}
.strip::-webkit-scrollbar {
  display: none; /* Chrome */
}


.thumb {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 220px;
  max-width: 285px;
  max-height: 280px;
  border-radius: 5px;
  overflow: hidden;  /* allow thumbs round corners */
  margin-right: 20px;
}

@media only screen and (min-device-width: 1200px){
.strip {
  max-width: 1200px;
	max-height: 135px;
}
.thumb {
  display: flex;
  min-width: 120px;
  max-width: 135px;
  max-height: 101px;
  margin-right: 5px;
  opacity: 0.7;
}
.active,
.thumb:hover {
  opacity: 1;
  transition: 0.3s;
  outline: 0px ridge #AFAFAF;
}}


@media only screen and (max-device-width: 1200px) and (orientation: landscape){
.modal {
  height: 100vh;
  padding-top: 0px;
}
.strip {
  flex-wrap: wrap;
  position: absolute;
  top: 20px;
  left: 10px;
  max-height: 400px;
  max-width: 150px; 
  overflow-x: hidden; 
  overflow-y: auto;
  gap: 5px;
}

.close {
  position: absolute;
  bottom: 10px;
  left: 5px;
  font-size: 35px;
}
.slide-wrapper {
  height: 775px;
  width: 900px; 
  margin-left: 160px;
  overflow: hidden;
}
img.slide{
  height: 600px;
  width: auto;
  max-width: 1200px;
}
.thumb {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  max-height: 150px;

}}


.thumb img {
  object-fit: contain;
  height: 280px;
  max-width: 280px;
}

@media only screen and (min-device-width: 1200px){
thumb img {
  height: 100px;
  max-height:135px;  /* keep portraits same ht as landscapes */
  max-width: 180px;
}}



.fade {
	animation-name: fadeIn;
	animation-iteration-count: 1;
	animation-timing-function: ease-out;
	animation-duration: 0.2s;
}

@keyframes fadeIn {
	0% {opacity: 0.2;}
	100% {opacity: 1;}
}
