@import 'lightbox/lightbox';

@mixin lightbox-icon($icon) {
	background: none;
	font-size: 2em;
	@extend .fa;
	@extend .#{$fa-css-prefix}-#{$icon};
}

.lightboxOverlay {
	bottom: 0;
	right: 0;
	outline: none;
}

.lightbox {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	
	&.vertical {
		flex-direction: column;
		
		.lb-dataContainer {
			width: 100%;
			height: 30px;
			
			.lb-data {
				.lb-details {
					display: inline;
					
					.lb-caption-line {
						padding-right: 1em;
					}
				}
			
				.lb-closeContainer {
					display: inline;
					
					.lb-close {
						text-align: right;
					}
				}
			}
		}
	}
	&.horizontal {
		flex-direction: row;
		
		.lb-dataContainer {
			width: 200px;
			height: 100%;
			
			.lb-data {
				.lb-caption-line {
					display: block;
					margin-top: 1em;
				}

				.lb-closeContainer .lb-close {
					margin-top: 1em;
					float: none;
				}
			}
		}
	}
	
	.lb-outerContainer {
		margin: 0;
		border-radius:0;
		background-color: rgba(255, 255, 255, 0.5);
		
		.lb-container {
			overflow: hidden;
		
			.lb-image {
				image-orientation: from-image;
				border-radius: 0;
				border: none;
				--translate-x: 0;
				--translate-y: 0;
				--scale: 1;
				
				transform:
					translateX(var(--translate-x, 0))
					translateY(var(--translate-y, 0))
					scale(var(--scale, 1));
			}
		
			.lb-video {
				box-sizing: content-box;
			}
			&.lb-video-nav .lb-nav {
				top: 45px;
				height: calc(100% - 90px);
			}
			
			.lb-nav {
				a.lb-prev, a.lb-next {
					color: white;
					text-decoration: none;
					
					&:before {
						position: absolute;
						top: calc(50% - 1em);
					}
				}
			
				a.lb-prev {
					@include lightbox-icon(prev);
					&:before {
						left: 2em;
					}
				}
			
				a.lb-next {
					@include lightbox-icon(next);
					&:before {
						right: 2em;
					}
				}
			}
		}
	}
	
	.lb-dataContainer {
		margin: 0;
		padding: 0;
		flex: 0 0 auto;
		overflow: hidden;
		
		.lb-data {
			text-align: left;
			padding: 0.5em;
			
			.lb-details {
				float: none;
				
				.lb-caption-line {
					cursor: default;
				}
			
				.lb-caption-line:first-child {
					margin-top: 0;
				}
				
				.lb-number {
					display: none !important;
				}
			}
			.lb-closeContainer {
				color: white;
				font-size: 13px;
				line-height: 1em;
				
				.lb-close {
					@include lightbox-icon(close);
					@extend .fa-lg;
					width: 1.25em;
					height: auto;
					font-size: 1.3333333333em;
					text-align: center;
				}
			}
		}
	}

	.lb-cancel {
		@include lightbox-icon(cancel);
		@extend .flicker;
		color: #CCC;
	}
}