mediabox {
    .box {
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        padding: 24px;
        z-index: 41;
        background-color: rgba(0, 0, 0, 0.75);

        // Transitions
        $mediabox-transition-duration: 0.1s;
        &.ng-enter {
            opacity: 0;
            transition: $mediabox-transition-duration linear opacity;
            img {
                transform: scale(0.95);
                transition: $mediabox-transition-duration linear transform;
            }
        }
        &.ng-enter-active {
            opacity: 1;
            img {
                transform: scale(1.0);
            }
        }
        &.ng-leave {
            opacity: 1;
            transition: $mediabox-transition-duration linear opacity;
            img {
                transform: scale(1.0);
                transition: $mediabox-transition-duration linear transform;
            }
        }
        &.ng-leave-active {
            opacity: 0;
            img {
                transform: scale(0.95);
            }
        }


        md-icon {
            display: block;
            box-sizing: border-box;
            position: absolute;
            height: 28px;
            width: 28px;
            top: 24px;
            color: rgba(255, 255, 255, 0.8);
            background-color: rgba(0, 0, 0, 0.7);
            border: 2px solid rgba(255, 255, 255, 0.8);
            border-radius: 50%;
            user-select: none;
            @include mouse-hand;

            &:focus {
                color: rgba(255, 255, 255, 1.0);
                border: 2px solid rgba(255, 255, 255, 1.0);
            }

            &.save {
                right: 60px;
                font-size: 20px;
                padding: 2px;
            }

            &.close {
                right: 24px;
            }
        }

        .inner {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;

            &:focus {
                outline: 0;
            }

            img {
                max-height: calc(100% - 28px - 28px);
                max-width: 100%;
                user-select: none;
                box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
            }

            .caption {
                margin: 4px 0 0;
                color: rgba(255, 255, 255, 0.8);
                font-size: 1.3em;
                display: block;
                max-width: 90%;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                line-height: 1.3em;
            }
        }
    }
}
