.lightbox { position: fixed; width: 100vw; height: 100vh; margin: 0; top: 0; left: 0; background-color: rgba(#000, 0.5); z-index: 10000; justify-content: center; align-items: center; display: flex; flex-direction: column; .lightbox-container { flex: 0 0 0; position: relative; padding: $gutter-width; margin: $gutter-width; background-color: $background-color; border-radius: $border-radius; .lightbox-header { flex: 0 0 0; display: flex; flex-direction: row; justify-content: space-between; h1 { flex: 1 0 0; font-size: 1.4rem; } } .lightbox-image { flex: 1 0 0; text-align: center; vertical-align: center; margin: 0; padding: 0; .image-container { position: relative; margin: 0; padding: 0; img { margin: 0; padding: 0; max-height: calc(90vh - calc(8 * #{$gutter-width})); max-width: calc(90vw - calc(4 * #{$gutter-width})); } } } .lightbox-footer { flex: 0 0 0; z-index: 100000; max-width: 500px; } .lightbox-controls { font-size: 1.6rem; } .lightbox-close { position: absolute; right: 0; top: 0; margin: $gutter-width; z-index: 100000; } .lightbox-nav-prev, .lightbox-nav-next { cursor: pointer; position: absolute; top: 0; width: 40%; height: 100%; margin: 0; display: flex; flex-direction: row; align-items: center; div { background-color: #fff; vertical-align: center; padding: $gutter-width; } } .lightbox-nav-prev { left: 0; div { border-radius: 0 $border-radius $border-radius 0; } } .lightbox-nav-next { right: 0; div { margin-left: auto; border-radius: $border-radius 0 0 $border-radius; } } .lightbox-prev { margin: auto; } .lightbox-next { margin: auto; } } }