#photoCanvasWrapper {
  -webkit-flex: 1;
  flex: 1;
  clear: both;
  width: 100%;    
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* landscape */

@media screen and (orientation: landscape) {

/* photoFilm (landscape) */

.clsFilmOnLeft {
  /*float: left;*/
  clear: left;
}

.clsFilmOnRight {
  float: right;
  clear: right;
  border-left: 2px solid rgba(0,0,0,0); /* #000; background of scroll area*/ 
}

#filmWrapper {
  flex: 1;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 240px; /*same as photoWrapper width*/
  /*height: 100%;*/
  margin: 0;
  padding: 0;
}

#filmStrip {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  /*border: 16px solid rgba(192,192,192,0.8);*/
  background-color: #CCC;
  overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.clsFilmImg {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background-color: #888;
  clear: none;
  width: 100%;
  height: auto;
  float: left;
  padding: 4px;
  margin: 0 auto -4px auto; /*minus top border*/
  border-top: 4px solid #CCC;
  border-left: 4px solid #CCC;
  border-bottom: 4px solid #CCC;
  border-right: 4px solid #CCC;
  border-radius: 8px;
}

/* photoFrame (landscape) */

.clsPhotoWrapperOnRight
{
  float: right;
  clear: right;
}

.clsPhotoWrapperOnLeft
{
  /*float: left;*/
  clear: left;
}

#photoWrapper 
{
  /*flex: 1;*/
  width: auto;
  /*height: 100%;*/
  min-height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  right: 240px; /*same as filmWrapper width*/
  bottom: 0;
  overflow: hidden;
}

#photoFrame {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 1.9em; /*allow for tet footer*/
  /*background-color: #00F;*/
  overflow: visible; /*show shadows*/
  padding: 0 8px 8px 8px; /*allow img shadow*/
}

} /* end landscape */


@media screen and (max-width: 640px) and (orientation: landscape) {
  #filmWrapper { width: 170px; }
  #photoWrapper { right: 170px; }
}

/* portrait */

@media screen and (orientation: portrait) {

/* photoFilm (portrait) */

.clsFilmOnLeft, .clsFilmOnRight {
  clear: both;
  border-top: 2px solid rgba(0,0,0,0); /* #EEE;  background of horizonla scroll area*/
}

/* photoFrame (portrait) */

.clsPhotoWrapperOnRight, .clsPhotoWrapperOnLeft {
  clear: both;
}

#photoWrapper {
  position: absolute;
  top: 0; left: 0; right: 0;
  bottom: 200px; /*same as filmWrapper height*/
  overflow: hidden;
}

#photoFrame {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 1.9em; /*allow for the footer*/
  /*background-color: #00F;*/
  overflow: visible; /*show shadows*/
  padding: 0 8px 8px 8px; /*allow img shadow*/
}

#photoImg {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
   /*background-color: #FF0;*/
  border: 4px solid rgba(230,230,230,0.8);
  border-radius: 4px;
  -webkit-transition: opacity 1s ease-in-out;
  transition: opacity 1s ease-in-out;
  /*center vertically*/
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  margin: auto;
  /**/
  box-shadow: 4px 4px 4px rgba(62,64,64,0.7); 
  overflow: hidden;
}

#filmWrapper {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 200px; /*same as photoWrapper height*/
  margin: 0;
  padding: 0;
}

#filmStrip {
  display: -webkit-flex;
  display: flex;
  -webkit-flexflex-wrap: nowrap;
  flex-wrap: nowrap;
  display: inline-block;
  white-space: nowrap;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  /*border: 16px solid rgba(192,192,192,0.8);*/
  background-color: #CCC;
  overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.clsFilmImg {
  clear: none;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background-color: #888;
  width: auto;
  height: 100%;
  padding: 4px;
  margin: 0 auto -4px auto; /*minus top border*/
  border-top: 4px solid #CCC;
  border-left: 4px solid #CCC;
  border-bottom: 4px solid #CCC;
  border-right: 4px solid #CCC;
  border-radius: 8px;
}

} /* end portrait */

@media screen and (max-width: 540px) and (orientation: portrait) {
  #filmWrapper { height: 140px; }
  #photoWrapper { bottom: 140px; }
}


/* common for landscape/portrait */

.clsFilmImg:hover {
  background-color: #EEE;
  cursor: pointer;
}

.clsFilmImg.IsSelected {
  background-color: #E55;
}

#photoImg {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
   /*background-color: #FF0;*/
  border: 4px solid rgba(230,230,230,0.8);
  border-radius: 4px;
  -webkit-transition: opacity 1s ease-in-out;
  transition: opacity 1s ease-in-out;
  /*center vertically*/
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  margin: auto;
  /**/
  box-shadow: 4px 4px 4px rgba(62,64,64,0.7); 
  overflow: hidden;
}

#photoImg:hover {
}

/* tools */

@keyframes overlayFadeOut { 0% { opacity: 1; } 100% { opacity: 0; } }
@-webkit-keyframes overlayFadeOut { 0% { opacity: 1; } 100% { opacity: 0; } }

.clsToolOverlay {
  opacity: 1;
  -webkit-animation: overlayFadeOut;
  -webkit-animation-timing-function: ease-in-out;
  -webkit-animation-fill-mode: forwards;
  -webkit-animation-duration: 0.7s;
  -webkit-animation-delay: 3s;
  animation: overlayFadeOut;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
  animation-duration: 0.7s;
  animation-delay: 2.5s;
  /*-webkit-transition: opacity 0.7s ease-in-out;*/
  /*transition: opacity 0.7s ease-in-out;*/
}

.clsToolOverlay.Short {
  animation-duration: 0.5s;  
  animation-delay: 1s;
}

.clsImgTool {
  position: absolute;
  opacity: 1;
  background-color: rgba(230,230,230,0.4);
}

.clsImgTool.Left {
  left: 0; top: 0; bottom: 0;
  width: 60px;
  height: 120px;
  margin: auto 0;
  border-radius: 0 10px 10px 0;
}

.clsImgTool.Right {
  right: 0; top: 0; bottom: 0;
  width: 60px;
  height: 120px;
  margin: auto 0;
  border-radius: 10px 0 0 10px;
}

.clsImgTool.Top {
  left: 0; right: 0; top: 0; 
  width: 200px;
  height: 70px;
  margin: 0 auto;
  border-radius: 0 0 10px 10px;
}

.clsImgTool.Bottom {
  left: 0; right: 0; bottom: 0; 
  width: 200px;
  height: 70px;
  margin: 0 auto;
  border-radius: 10px 10px 0 0;
}

.clsImgTool.Center {
  left: 0; top: 0; right: 0; bottom: 0; 
  width: 32px;
  margin: auto;
}

.clsSpinner {
  width: auto;
  height: auto;
  position: absolute;
  /*background-color: #000;*/
  /*width: 32px;*/
  left: 0; top: 0; right: 0; bottom: 0;
  margin: auto;
}

.clsToolImg {
  position: absolute;
  width: 48px;
  left: 0; right: 0; top: 0; bottom: 0;
  margin: auto;
  opacity: 0.5;
}

@media print { 
  .clsSpinner { display: none; }
  .clsToolImg { display: none; }
  .clsImgTool { display: none; }
  .clsToolOverlay { display: none; }
  #filmStrip { display: none; }
}

/* zoom */

#zoomWrapper {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: auto;
  background-color: #000;
  z-index: 5000;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
}

#zoomImgFrame {
  /*position: absolute;*/
  /*left: 0; top: 0; right: 0; bottom: 0;*/
  width: 100%;
  height: 100%;  
  margin: auto;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background-color: #000;
  overflow: auto;
}

#zoomImg {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  margin: auto;
  -webkit-transition: opacity 500ms ease-in-out;
  transition: opacity 500ms ease-in-out;
  overflow: auto;
}

#zoomExit { /*permanent exit overlay; place under picture*/
  position: absolute;
  opacity: 0.1;
  background-color: #EEE;
}

/* footer */

#photoFooter {
  /*height: auto;*/
  padding: 0;
  /*background-color: #0F0;*/
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 4px ;
  margin: 0 auto;
  text-align: center;
}

#photoText {
  color: #000;
  text-align: center;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 10px 0 10px;
  /*display: inline-block;*/
  background-color: rgba(230,230,230,0.7);
  background: -webkit-linear-gradient(left, rgba(230,230,230,0.0), rgba(230,230,230,0.7), rgba(230,230,230,0.7),  rgba(230,230,230,0.0));
  background: linear-gradient(to right, rgba(230,230,230,0.0), rgba(230,230,230,0.7), rgba(230,230,230,0.7),  rgba(230,230,230,0.0));
  /*border-radius: 2px;*/
}

/* album */ 

#albumWrapper {
  /*background-color: #00A;*/
  text-align: center;
  margin: 5% 8%;
}

#albumImgFrame {
  float: left;
  text-align: center;
  /*height: 250px;*/
  width: auto;
  height: auto;
  margin: 5px 2% 10px;
  padding: 0;
  
  background-color: rgba(240,240,240,0.7);
  border: 8px solid rgba(240,240,240,0); /*keep transparent*/
  border-radius: 4px;
  box-shadow: 4px 4px 4px rgba(62,64,64,0.5);
}

#albumImgFrame:hover {
  background-color: rgba(255,255,255,0.85);
  /*border: 8px solid #FFF;*/
  cursor: pointer;
  text-decoration: none;
  color: #009;
}

#albumImgFrame a:active { color: #009; text-decoration: none; }
#albumImgFrame a:hover { color: #009; text-decoration: none; }
#albumImgFrame:hover > #albumText { color: #009; } 

#albumImg {
  height: 150px;
  width: auto;
  vertical-align: text-bottom;
  vertical-align: bottom;
  text-align: center;
  margin: 0;
}

#albumText {
  display: block;  
  width: 100%;
  height: 1.5em;
  line-height: 1.5em;
  padding: 0;
  color: #003;
}

/* other */

@keyframes blurAndFade { 0% { filter:blur(0); opacity: 1; } 100% { filter:blur(2.5px); opacity: 0.7; } }
@-webkit-keyframes -webkit-blurAndFade { 0% { -webkit-filter:blur(0); opacity: 1; } 100% { -webkit-filter:blur(2.5px); opacity: 0.7; } }

.clsPhotoBg {
  -webkit-animation: -webkit-blurAndFade;
  -webkit-animation-timing-function: ease-in;
  -webkit-animation-fill-mode: forwards;
  -webkit-animation-duration: 0.5s;
  -webkit-animation-delay: 1s;
  animation: blurAndFade;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
  animation-duration: 0.5s;
  animation-delay: 1s;
}
  
