/**
 * Licensed under the MIT License
 * Copyright (c) 2010-2013 WoodWing Software
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

/*
HTML produced by HitRenderer:

[for each hit]
div.elvisHitBox
	a href=...
		[for image/video/pdf]
		div.elvisThumbnailWrapper
			div.elvisThumbnailImage
				img

		[for icon]
		div.elvisThumbnailWrapper
			div.elvisThumbnailIcon
				img

		[for text]
		div.elvisThumbnailWrapper
			div.elvisThumbnailText
				span

		[for collection]
		div.elvisThumbnailWrapper
			div.elvisContainerBox
			  [4 x]
				div.elvisContainerThumb
					img
				[or]
				div.elvisContainerIcon
					img
				[or]
				div.elvisContainerEmpty

	div.elvisMetadata

		[for each metadataToDisplay]
		div title=...
			...value...
*/

.elvisHitBox {
	position: relative;
	display: block;
	margin: 0 -2px -2px 0; /* collapse selection borders */
	border: 2px solid transparent;
	padding: 8px;
	overflow: hidden;
	float: left;
	border-spacing: 0px 0px; /* fix to make thumbs work inside a table */
	-webkit-user-select: none;
	-moz-user-select: none;	
	user-select: none; 
}

.elvisHitBox a /*a:link, a:visited, a:hover, a:active*/
{
	text-decoration:none;
}

/*
 * Standard, small and large size css for hit thumbnails
 */

.elvisHitBox {
	width: 140px;
}
.elvisSmall .elvisHitBox {
	width: 70px;
}
.elvisLarge .elvisHitBox {
	width: 256px;
}

.elvisThumbnailWrapper,
.elvisThumbnailImage,
.elvisThumbnailIcon {
	width: 140px;
	height: 140px;
}
.elvisSmall .elvisThumbnailWrapper,
.elvisSmall .elvisThumbnailImage,
.elvisSmall .elvisThumbnailIcon {
	width: 70px;
	height: 70px;
}
.elvisLarge .elvisThumbnailWrapper,
.elvisLarge .elvisThumbnailImage,
.elvisLarge .elvisThumbnailIcon {
	width: 256px;
	height: 256px;
}

.elvisThumbnailWrapper.square,
.elvisThumbnailText {
	/* .elvisHitBox - (2 * 1px border) */
	width: 138px;
	height: 138px;
}
.elvisSmall .elvisThumbnailWrapper.square,
.elvisSmall .elvisThumbnailText {
	width: 68px;
	height: 68px;
}
.elvisLarge .elvisThumbnailWrapper.square,
.elvisLarge .elvisThumbnailText {
	width: 254px;
	height: 254px;
}

.elvisThumbnailImage img,
.elvisThumbnailIcon img {
	/* .elvisThumbnailWrapper - (2 * 1px border) */
	max-width: 138px;
	max-height: 138px;
}
.elvisSmall .elvisThumbnailImage img,
.elvisSmall .elvisThumbnailIcon img {
	max-width: 68px;
	max-height: 68px;
}
.elvisLarge .elvisThumbnailImage img,
.elvisLarge .elvisThumbnailIcon img {
	max-width: 254px;
	max-height: 254px;
}

.elvisThumbnailText span {
	width: 126px;
	height: 126px;
}
.elvisSmall .elvisThumbnailText span {
	width: 62px;
	height: 62px;
	margin: 3px;
	font-size: 8px;
}
.elvisLarge .elvisThumbnailText span {
	width: 230px;
	height: 230px;
	margin: 8px;
	font-size: 16px;
}

.elvisContainerBox {
	width: 138px;
	height: 138px;
}
.elvisSmall .elvisContainerBox {
	width: 68px;
	height: 68px;
}
.elvisLarge .elvisContainerBox {
	width: 254px;
	height: 254px;
}

.elvisContainerThumb,
.elvisContainerIcon,
.elvisContainerEmpty {
	width: 52px;
	height: 52px;
}
.elvisSmall .elvisContainerThumb,
.elvisSmall .elvisContainerIcon,
.elvisSmall .elvisContainerEmpty {
	width: 25px;
	height: 25px;
}
.elvisLarge .elvisContainerThumb,
.elvisLarge .elvisContainerIcon,
.elvisLarge .elvisContainerEmpty {
	width: 110px;
	height: 110px;
}

.elvisContainerIcon img {
	max-width: 52px;
	max-height: 52px;
}
.elvisSmall .elvisContainerIcon img {
	max-width: 25px;
	max-height: 25px;
}
.elvisLarge .elvisContainerIcon img {
	max-width: 110px;
	max-height: 110px;
}

/*
 * Non-size styling for hit thumbnails
 */

.elvisHitBox.selected /*, .elvisHitBox:hover*/ {
	border: 2px solid #b5d4e7;
	background-color: #e4f0f7;
}

.elvisThumbnailWrapper {
	position: relative;
}
.elvisThumbnailWrapper.square {
	border: 1px solid #666;
	display: block;
	overflow: hidden;
}
.elvisHitBox img.square {
	border: none;
	position: relative;
	max-width: none;
	max-height: none;
}

.elvisThumbnailImage {
	display: table-cell;
	text-align:center;
	vertical-align:middle;
}
.elvisThumbnailImage img {
	border: 1px solid #999;
}
.elvisThumbnailImageOverlay {
	position: absolute;
	left: 0px;
	z-index: 10;
	padding: 1px;
}
.square .elvisThumbnailImageOverlay {
	padding: 0px;
}
.elvisThumbnailVideoIndicator {
	background-image: url("../images/camera.png");
	background-repeat: no-repeat;
	background-position: center;
	background-color: rgba(0, 0, 0, 0.4);
	width: 22px;
	height: 15px;
	/* TODO also show duration:
	line-height: 15px;
	font-size: 9px;
	color: white;
	background-position: 2px 50%;
	padding: 0px 2px 0px 22px;
	no width!*/
}

.elvisThumbnailText
{
	border: 1px solid #999;
	background-color: #262626;
	cursor: default;
}
.elvisThumbnailText span
{
	display: block;
	margin: 6px;
	overflow: hidden;
	font-size: 11px;
	color: #ffffff;
	text-align:justify;
}
.elvisThumbnailIcon, .elvisContainerBox {
	display: table-cell;
	text-align:center;
	vertical-align:middle;
}
.elvisThumbnailIcon img {
	border: none;
}
.elvisContainerBox {
	border: 1px solid #424242;
	overflow: hidden;
	padding: 0px;
	box-shadow: 1px 1px 1px #000000;
	-moz-box-shadow: 1px 1px 1px #000000;
	border-radius: 8px;
	-moz-border-radius: 8px;
	background: #333333;
}
.elvisContainerBox img 
{
	margin: 19px;
	border: 0px solid #000000;
}
.elvisContainerThumbWrapper
{
	position: relative;
}
.elvisContainerThumb, .elvisContainerIcon, .elvisContainerEmpty {
	position: relative;
	display: inline-block;
	vertical-align: top; /* Hack to fix jumpy vertical align in webkit */
	overflow: hidden;
	margin: 1px 0px 0px 1px;
}
.elvisContainerThumb
{
	border: 1px solid #000000;
}
.elvisContainerIcon
{
	border: 1px solid transparent;
}
.elvisContainerEmpty {
	border: 1px dashed #333333;
	background-color: #5C5C5C;
}
.elvisContainerThumb img, .elvisContainerIcon img
{
	position: relative;
	margin: 0px;
	border: 0px;
}



.elvisMetadata {
	padding: 4px 0px 2px 0px;
}
.elvisSmall .elvisMetadata {
	font-size: 8px;
}
.elvisMetadata div {
	height: 1.3em;
	overflow: hidden;
	text-align: center;
}
.elvisMetadataValue {
}
.elvisMetadataRating {
	font-family: monospace;
}
.elvisMetadataRatingReject {
	color: #ff0000;
}



.elvisPager a, .elvisPageCurrent, .elvisPageDisabled {
	display: block;
	float: left;
	width: 28px;
	padding: 2px 0px;
	overflow: hidden;
	text-align: center;
	margin-left: 1px;
	text-decoration: none;
	color: #333366;
}
.elvisPager .elvisPagePrev, .elvisPager .elvisPageNext {
	width: auto;
	padding-left: 9px;
	padding-right: 9px;
	overflow: visible;
}
.elvisPager a:hover, .elvisPageCurrent {
	background-color: #BBBBBB;
}
.elvisPager a:active {
	background-color: #E9E9E9;
}
.elvisPageDisabled {
	color: #888888;
}



.elvisRenderSize a {
	display: block;
	float: left;
	padding: 10px;
	border-radius: 4px;
	-moz-border-radius: 4px;
	margin-left: 4px;
	background-repeat: no-repeat;
	background-position: center;
	border: 1px solid #999;
}
.elvisRenderSize a:hover, .elvisRenderSize a.selected {
	border: 1px solid #555;
}

.elvisRenderSize a.small {
	background-image: url("../images/thumb_size_small.png");
	margin-left: 0;
}
.elvisRenderSize a.medium {
	background-image: url("../images/thumb_size_medium.png");
}
.elvisRenderSize a.large {
	background-image: url("../images/thumb_size_large.png");
}



ul.elvisFacet {
	list-style: none;
	padding: 0;
	margin: 0;
	text-align: center;
}

.elvisFacet a 
{
	background-color: #FFFFFF;
	color: #424242;
	text-decoration: none;
	display: block;
	border-style: solid;
	padding: 3px;
	padding-left: 8px;
	margin-bottom: 4px;
	-moz-border-radius: 9px;
	border-radius: 9px;
	border: none;
	text-align: left;
	font-size: 12px;
}

.elvisFacet .count
{
	background-color: #97A8C7;
	color: #FFFFFF;
	position: relative;
	display: inline-block;
	height: 13px;
	width: 30px;
	float: right;
	top: -1px;
	-moz-border-radius: 9px;
	border-radius: 9px;
	border: none;
	padding:2px;
	font-size: 11px;
	text-align: center;
	margin-left: 6px;
	margin-right: -1px;
}

.elvisFacet a:hover,
.elvisFacet .selected a {
	background-color: #97A8C7;
	color: #FFFFFF;
}

.elvisFacet a:hover .count, .elvisFacet .selected .count {
	background-color: #FFFFFF;
	color: #97A8C7;
}



.elvisColumnTree {
	height: 115px;
	overflow-y: hidden;
	overflow-x: scroll;
	width: 100%;
	background: #fafafa;
	position: relative;
	border: thin solid #999;
	border-left: 0px;
	border-right: 0px;
	font-size: 11px;
	font-family: Arial;
}
div.elvisColumnTreeList {
	height: 100px;
	display: inline-block;
	position: relative;
	margin-right: -1px;
	width: 200px;
	border: thin solid #999;
	border-top: 0px;
	border-bottom: 0px;
	overflow-x: hidden;
	overflow-y: scroll;
}
.elvisColumnTreeList ul {
	margin: 0;
	padding: 0;
}
.elvisColumnTreeList li {
	background-image: url('../images/folder.png');
	background-position: 3px center;
	background-repeat: no-repeat;
	padding: 3px 3px 3px 22px;
	height: 1.3em;
	line-height: 1.4em;
	overflow-y: hidden;
	cursor: default;
}
.elvisColumnTreeList li.container {
	background: url('../images/box.png') left no-repeat;
}
.elvisColumnTreeList li.selected {
	background-color: #3875D7;
	color: #FFF;
}



#elvisPreviewOverlay
{
	position: fixed;
	top: 0px;
	left: 0px;
	margin: 0px;
	padding: 0px;
	width: 100%;
	height: 100%;
	background: #000000;
	background: rgba(0, 0, 0, 0.85);
	border: 0 none;
	z-index: 4999;
}
#elvisPreview
{
	position: fixed;
	top: 0px;
	left: 0px;
	margin: 0px;
	padding: 0px;
	width: 100%;
	height: 100%;
	z-index: 5000;
}
#elvisPreviewClose {
	overflow: hidden;
	background-image: url("../images/nav_close.png");
	background-repeat: no-repeat;
	background-position: center;
	height: 60px;
	width: 60px;
	position: fixed;
	top: 0px;
	right: 0px;
	z-index: 5020;
	text-decoration: none;
}
#elvisPreviewPrev, #elvisPreviewNext {
	background-repeat: no-repeat;
	background-position: center;
	position: fixed;
	width: 60px;
	top: 60px;
	bottom: 60px;
	overflow: hidden;
	z-index: 5018;
	text-decoration: none;
}
#elvisPreviewPrev {
	left: 0px;
	background-image: url("../images/nav_left.png");
	opacity: 0.2;
}
#elvisPreviewPrev:hover {
	opacity: 1;
}
#elvisPreviewNext {
	right: 0px;
	background-image: url("../images/nav_right.png");
	opacity: 0.2;
}
#elvisPreviewNext:hover {
	opacity: 1;
}
#elvisPreviewWrapper
{
	position: absolute;
	display: table;
	width: 100%;
	height: 100%;
	overflow: hidden; 
}
#elvisPreviewCell
{
	display: table-cell;
	width: 100%;
	height: 100%;
	vertical-align: middle;
}
#elvisPreviewBox 
{
	display: block;
	max-width: 100%;
	max-height: 100%;
	text-align: center;
}
#elvisPreviewObject
{
	display: inline-block;
	z-index: 5004;
	overflow-x: hidden;
	overflow-y: auto;
}
.elvisPreviewImage
{
}
.elvisPreviewVideo
{
}
.elvisPreviewText
{
	max-width: 810px;
	border: none;
	background: #FAFAFA;
	color: #000000;
	text-align: left;
	/*
	-moz-word-wrap: break-word;
	word-wrap: break-word;
	padding: 30px;
	*/
}
#elvisPreviewObject.elvisPreviewNotAvailable {
	display: table-cell;
	text-align: center;
	vertical-align: middle;
}
.elvisPreviewNotAvailable div
{
	background: url("../images/document_generic.png") no-repeat center top;
	padding-top: 140px;
	color: #EEEEEE;
}



.elvisThrobber
{
	background-image: url("../images/ajax-loader.gif");
	background-repeat: no-repeat;
	background-position: center;
}



.elvisCopyright {
	position: absolute;
	bottom: 2px;
	right: 2px;
	font-size: 10px;
}
.elvisCopyright a, .elvisCopyright a:visited, .elvisCopyright a:active {
	color: #3399CC;
	font-weight: bold;
	text-decoration:none;
}
.elvisCopyright a:hover {
	text-decoration:underline;
}