$lazy-transition: .3s !default;
$lazy-z-index:    1000 !default;
$lazy-overlay:    rgba(black, .7) !default;
$lazy-bg:         white !default;
$lazy-border:     1px solid #ccc !default;
$lazy-shadow:     0 1px 5px #333 !default;
$lazy-padding:    20px !default;
$lazy-start:      scale(.7) !default;
$lazy-end:        scale(1) !default;
$lazy-close:      '×' !default;

#lazy_overlay {
  visibility: hidden;
  text-align: center;
  z-index: $lazy-z-index;
  background: $lazy-overlay;
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  opacity: 0;
  transition: opacity $lazy-transition, visibility $lazy-transition;
  &:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
  }
  &.active {
    visibility: visible;
    opacity: 1;
    #lazybox { transform: $lazy-end; }
  }
  * {
    visibility: inherit;
  }
}

#lazybox {
  text-align: left;
  display: inline-block;
  vertical-align: middle;
  transform: $lazy-start;
  background-color: $lazy-bg;
  border: $lazy-border;
  box-shadow: $lazy-shadow;
  padding: $lazy-padding;
  box-sizing: border-box;
  overflow: auto;
  max-height: 100vh;
  max-width: 100vw;
  transition: opacity $lazy-transition ease-in-out, transform $lazy-transition ease-in-out, visibility $lazy-transition;
  &.confirm { max-width: 300px; }
  .lazy_buttons { margin-top: 15px; text-align: right; }
  .lazy-img { display: block; }
  #lazy_body { position: relative; }
}

#lazy_close {
  border: none;
  background: transparent;
  color: gray;
  cursor: pointer;
  display: none;
  font: bold 26px/100% Arial, Helvetica, sans-serif;
  position: absolute;
  right: 5px;
  text-align: center;
  top: 0;
  padding: 0;
  margin: 0;
  transition: color .3s;
  &:after { content: $lazy-close; }
  &:hover { color: black; }
  &.visible { display: block; }
  &:focus { outline: none; }
}
