/*****************************************************************************
 * Copyright (c) 2023 Echo Hollow. All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without 
 *  modification, are permitted provided that the following conditions are met:
 * 
 *     1. Redistributions of source code must retain the above copyright 
 *        notice, this list of conditions and the following disclaimer.
 *     2. Redistributions in binary form must reproduce the above copyright 
 *        notice, this list of conditions and the following disclaimer in the 
 *        documentation and/or other materials provided with the distribution.
 *     3. All advertising materials mentioning features or use of this software 
 *        must display the following acknowledgement:
 *          "This product includes software developed by Echo Hollow."
 *     4. Neither the name of the copyright holder nor the names of its 
 *        contributors may be used to endorse or promote products derived from 
 *        this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR 
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 
 * EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *****************************************************************************/

:root
{
	--SMUTBOOK_IUI_MAX_WIDTH: 750px;
	--SMUTBOOK_IUI_MAX_HEIGHT: 750px;
	
	--SMUTBOOK_IUI_BODY_FUDGE_HEIGHT: 4em;
	--SMUTBOOK_IUI_MESSAGES_HEIGHT: 4em;
	--SMUTBOOK_IUI_FOOTER_HEIGHT: 3em;
	
	--SMUTBOOK_IUI_TITLE_HEIGHT: 2em;
	--SMUTBOOK_IUI_TITLE_FUDGE_HEIGHT: 2.5em;
	
	--SMUTBOOK_IUI_LINK_WIDTH: 20%;
	--SMUTBOOK_IUI_THUMBNAIL_WIDTH: 20%;
	--SMUTBOOK_IUI_SPACING_WIDTH: 9em;
}

div.iuiContainer
{
	width: min(80vw,var(--SMUTBOOK_IUI_MAX_WIDTH));
	height: min(80vh,var(--SMUTBOOK_IUI_MAX_HEIGHT));
	max-width: min(80vw,var(--SMUTBOOK_IUI_MAX_WIDTH));
	max-height: min(80vh,var(--SMUTBOOK_IUI_MAX_HEIGHT));
	text-align: center;
}

div.iuiBody
{
	height: calc( 100% - var(--SMUTBOOK_IUI_BODY_FUDGE_HEIGHT) - var(--SMUTBOOK_IUI_MESSAGES_HEIGHT) - var(--SMUTBOOK_IUI_FOOTER_HEIGHT) );
}

.RTL
{
	direction: rtl; 
}

.LTR
{
	direction: ltr; 
}

div.iuiPane
{
	float: left;
	width: 48%;
	height: 100%;
}

div.iuiPaneSpacer
{
	float: left; 
	width: 4%; 
	height: 100%;
}

div.iuiTitle
{
	height: var(--SMUTBOOK_IUI_TITLE_HEIGHT);
	text-align: center;
}

select.iuiSelect
{
	width: 100%;
}

div.iuiScroll
{
	margin-top: .75em; 
	overflow-y: scroll; 
	height: calc( 100% - var(--SMUTBOOK_IUI_TITLE_HEIGHT) - var(--SMUTBOOK_IUI_TITLE_FUDGE_HEIGHT) );
}

table.iuiItemList
{
	border: 1px solid transparent;
	width: 100%;
}

div.iuiMessages
{
	height: var(--SMUTBOOK_IUI_MESSAGES_HEIGHT);
}

div.iuiFooter
{
	height: var(SMUTBOOK_IUI_FOOTER_HEIGHT);
}

tr.iuiItem
{
	padding: 5px;
	border-bottom: 1px dashed gray;
}
tr.iuiItem:first-child
{
  border-top: none;
}
tr.iuiItem:last-child
{
  border-bottom: none;
}

td.iuiItemSpacer
{
	width: 0.5em;
}

td.iuiItemTitle
{
	width: calc( 100% - var(--SMUTBOOK_IUI_LINK_WIDTH) - var(--SMUTBOOK_IUI_THUMBNAIL_WIDTH) - var(--SMUTBOOK_IUI_SPACING_WIDTH) - var(--SMUTBOOK_IUI_SPACING_WIDTH) );
}

td.iuiItemThumbnail
{
	width: var(--SMUTBOOK_IUI_THUMBNAIL_WIDTH);
	text-align: center;
	vertical-align: middle;
}

td.iuiItemActions
{
	text-align: center;
	vertical-align: middle;
	width: 20%;
}

div.iuiDetailsContainerOuter
{
	width: min(80vw,var(--SMUTBOOK_IUI_MAX_WIDTH));
	height: min(80vh,var(--SMUTBOOK_IUI_MAX_HEIGHT));
	max-width: min(80vw,var(--SMUTBOOK_IUI_MAX_WIDTH));
	max-height: min(80vh,var(--SMUTBOOK_IUI_MAX_HEIGHT));
	text-align: center;
}

div.iuiDetailsContainerMiddle
{
	display: flex;
	flex-direction: column;
	height: 100%
}

div.iuiDetailsContainerInner
{
	width: 100%;
	flex-grow: 1;
	overflow-y: auto;
}

div.iuiDetailsContent
{
	text-align: left; 
}







