
/*---------------------------------------------------------------------------*/

:root
{
	--nav_background: rgb(120,120,120);
	--nav_color: white;
	--article_background: white;
	--article_color: black;
	--footer_background: white;
	--footer_color: black;
	--submenu_background: rgb(240,240,240);
	--submenu_color: black;
	--table_line: rgb(210,210,210);
	--transition: 500ms;
}

/*---------------------------------------------------------------------------*/
/* main window layout */

#Main
{
	display: flex;
	flex-direction: column;
	margin: 0px; /* keep! margin skrews up 100%-sizing for children */
	height: 100%;
	/* min-width: 60em; */
	/* min-height: 30em; */
}

#Main>article /* variable height main element */
{
	--separator: 5px;
	
	/* flex: 1 1 auto; */
	flex-grow: 1;
	flex-shrink: 1;
	flex-basis: auto;
	
	overflow: hidden;
	
	display: flex;
	flex-direction: row;
	justify-content: center;
	column-gap: var(--separator);

	background-color: var(--article_background);
	color: var(--article_color);
	
	position: relative;
}

#Main>footer /* status line on bottom */
{
	flex: 0 0 auto;
	
	border-top: solid 1px var(--nav_background);
	background-color: var(--footer_background);
	color: var(--footer_color);
}

/*---------------------------------------------------------------------------*/
/* different views of data belonging to one application (table, calendar, map, ...) */

#Main>article>section /* default */
{
	flex-basis: auto; /* initial size defined by element's width (e.g. the table with all enabled columns) */
	flex-grow: 0; /* does not grow if additional space available (makes small tables centered) */
	flex-shrink: 1; /* remove size, if container is smaller (makes scroll bar appear) */
	overflow: hidden; /* otherwise the section article wouldn't generate scrollbars */
	
	display: flex; /* this is also a flex container (e.g. for menu and table) */
	flex-direction: column;
}

/*---------------------------------------------------------------------------*/

#Main>article>div.ToggleButton
{
	position: absolute;
	top: 50%;
	right: 0;
	line-height: 0; /* to make the button's height same like image it contains */
	padding: 15px 2px;
	border: solid 1px var(--nav_background);
	border-right: none;
	--radius: 5px;
	border-top-left-radius: var(--radius);
	border-bottom-left-radius: var(--radius);
	background-color: var(--submenu_background);
	cursor: pointer;
	z-index: 1; /* to be on top */
}

#Main>article nav
{
	position: relative;
}

#Main>article div.Button.Toggle
{
	position: absolute;
	top: 0; right: 0;
	width: max-content;
}

#Main>article div.Button.Toggle>img.Symbol
{
	filter: saturate(0);
}

/*---------------------------------------------------------------------------*/

#Main>article>section>article  /* the actual view window with scrollbar per need */
{
	flex: 1 1 auto;
	overflow-x: auto;
	overflow-y: hidden; /* vertical scrollbars shall be asigned to table bodys */
}

/*---------------------------------------------------------------------------*/

#DialogEdit>form
{
	width: 16em;
}

#DialogEdit>form>article select,
#DialogEdit>form>article input[type=text],
#DialogEdit>form>article input[type=number],
#DialogEdit>form>article input[type=date]
{
	width: 100%;
}

/*---------------------------------------------------------------------------*/
