/**
 * Colorbox Core Style:
 * The following CSS is consistent between example themes and should not be altered.
 */
#colorbox, #cboxOverlay, #cboxWrapper {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  overflow: hidden;
}
#cboxOverlay {
  position: fixed;
  width: 100%;
  height: 100%;
}
#cboxMiddleLeft, #cboxBottomLeft {
  clear: left;
}
#cboxContent {
  position: relative;
}
#cboxLoadedContent {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#cboxTitle {
  margin: 0;
}
#cboxLoadingOverlay, #cboxLoadingGraphic {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
/**
 * These elements are buttons, and may need to have additional
 * styles reset to avoid unwanted base styles.
 */
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow {
  border: 0;
  padding: 0;
  margin: 0;
  overflow: visible;
  width: auto;
  background: none;
  cursor: pointer;
}
/**
 * Avoid outlines on :active (mouseclick),
 * but preserve outlines on :focus (tabbed navigating)
 */
#cboxPrevious:active, #cboxNext:active, #cboxClose:active, #cboxSlideshow:active {
  outline: 0;
}
.cboxPhoto {
  float: left;
  margin: auto;
  border: 0;
  display: block;
  max-width: none;
}
.cboxIframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}
/* Reset box sizing to content-box if theme is using border-box. */
#colorbox, #cboxContent, #cboxLoadedContent {
  -moz-box-sizing: content-box;
  -webkit-box-sizing: content-box;
  box-sizing: content-box;
}

/**
 * Colorbox module plain style:
 * The styles are ordered & tabbed in a way that represents
 * the nesting of the generated HTML.
 */
#cboxOverlay {
  background: #000;
}
#colorbox {
  outline: 0;
  width: 900px;
  height: 600px;
}
  #cboxWrapper, #cboxLoadedContent {
    width: 900px;
    height: 600px;
  }
  #cboxContent {
    overflow: hidden;
  }
  #cboxContent, .cboxPhoto {
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    width: 900px;
    height: 600px;
  }
  #cboxError {
    padding: 50px;
    border: 1px solid #ccc;
  }
  #cboxTitle {
    position: absolute;
    background: rgba(255, 255, 255, 0.7);
    bottom: 0;
    left: 0;
    color: #535353;
    width: 100%;
    padding: 4px 6px;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-border-bottom-right-radius: 5px;
    -webkit-border-bottom-left-radius: 5px;
    -moz-border-radius-bottomright: 5px;
    -moz-border-radius-bottomleft: 5px;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
  }

  #cboxLoadingOverlay {
    background: #fff;
  }
  #cboxLoadingGraphic {
    background: url(images/loading_animation.gif) no-repeat center center;
  }
  #cboxClose.cbox-close-plain {
    position: absolute;
    font-size: 20px;
    line-height: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.5);
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
  }
  .cbox-close-plain:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.8);
  }

#cboxLoadedContent .videoGallery {
    transform: translate(-50%,-50%);
    -moz-transform: translate(-50%,-50%);
    -webkit-transform: translate(-50%,-50%);
    top: 50%;
    left: 50%;
}

/* Media query for mobile colorbox */
@media (max-width: 48em) {

  #cboxLoadedContent .videoGallery,
  .rsDefault, .rsDefault .rsOverflow,
  .rsDefault .rsSlide,
  .rsDefault .rsVideoFrameHolder,
  .rsDefault .rsThumbs,
  .rsContainer {
    max-width: 100%;
  }

  .rsContainer {
    -webkit-transform: none !important;
       -moz-transform: none !important;
        -ms-transform: none !important;
         -o-transform: none !important;
            transform: none !important
  }

  .videoGallery .rsThumbs {
    height: auto;
    width: 100%;
  }
  #cboxWrapper, #cboxLoadedContent {
    width: auto !important;
    height: auto !important;
  }
  .rsDefault.rsWithThumbsVer .rsThumbsArrowLeft {
    display: none;
  }
  .rsDefault.rsWithThumbsVer .rsThumbsContainer {
    height: auto !important;
    -webkit-transform: none !important;
       -moz-transform: none !important;
        -ms-transform: none !important;
         -o-transform: none !important;
            transform: none !important;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-flow: row wrap;
        -ms-flex-flow: row wrap;
            flex-flow: row wrap;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
       -moz-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
  }

  .videoGallery .rsThumbs .rsThumb {
    width: 50%;
    height: auto;
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 50%;
       -moz-box-flex: 0;
        -ms-flex: 0 0 50%;
            flex: 0 0 50%;
  }

}