/*
 * Alex Nosurov
 * styles for table_tree
 */
/* COLMAXSIZE DEF need a way to restrict col widths; this is the most simple; for fh table is enough to restrict only col width */
.tt_thumbs_form td{
	max-width: 250px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* LBSP */
.lbsp_fullsearch_cont td{
	max-width: 1000px!important;
}
.lbsp_fullsearch_cont table{
	width: 100%;
}
.lbsp_input{ color: black; }

tr.selected, tr.selected *{
	color: white;
	/*background-color: mediumblue!important;*/
	background-color: #5c82d4!important;
}
.overlay{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background-color: rgba(88,88,88,0.8); /*dim the background*/
}
.img-overlay{
	position: fixed;
	top: 50%;
	left: 50%;
	margin-top: -64px;
	margin-left: -64px;	
}
.tree-elem{
	cursor: pointer;
}

.tree-item{
	width: 100%;
}

.ttc_ii{ /* item image */
	margin-left: 5px;
	margin-right: 5px;
	width: 16;
	height: 16;
}

.thumb{
	padding: 5;
}
.thumb.selected{
	background-color: CornflowerBlue;
}
/* HIS */
.his_panel_parent{
	position: relative; /* to make 'absolute' work */
}
.his_panel{
	position: absolute;
	left: 0px;
	top: 0px;
	width: 100%;
	z-index: 5;
}
.his_hider{
	background-color: Gainsboro;
	height: 20px;
}
.his_hided{
	/*padding: 20px;  TODO: necessary? */
}
.his_imgup,.his_imgdown{
	width: 16px;
	height: 16px;
}
.his_content{
	position: absolute;
}
/* to make content not to overlap with hider need use one either .his_content_offset or .his_first_content_item (put to first inner div of content); the second is used when content's style may cause some problems - eg content has height=100% which makes it stand out down to 20px;*/
.his_content_offset{ /* added to .his_content */ 
	top: 20px;
}
.his_first_content_item{ /* added to first inner elem of .his_content */
	margin-top: 20px;
}


.center {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* radio buttons, thos use with search button */
label.btn {
	background-color: #BDCFDC; /* inactive button */
	font-weight: bold;
}
label.btn.active {
	background-color: #337ab7;
	color: white;
	font-weight: bold;
}

/* PUMA */
.ttc_popup_div{
	border: 1px solid grey;
	background-color: GhostWhite;
	box-shadow: 4px 4px 2px grey;
}
.ttc_popup_div div{
	padding: 5;
	color: #334E67;
}


/* standard page layout: vertical flex container with head body foot; grow = 0 1 0; */
.mc_page_cont{
	display: flex;
	flex-direction: column;
	align-content: stretch;
}
.mc_page_cont_hor{
	display: flex;
	flex-direction: row;
	align-content: stretch;
}
.mc_page_head{
	flex: 0 1 auto;
}
.mc_page_body{
	flex: 1 1 auto;
}
.mc_page_cont > .mc_page_body{
	overflow-y: scroll /* auto probably used scroll because otherwise problems with width adjustment - app doesn't react when scroller width added to form width */;
}
.mc_page_foot{
	flex: 0 1 auto;
}

.mc_tt_cont{
	display: flex;
	flex-direction: row;
	align-items: stretch;
	overflow: auto; /* OVERFLOW_MIX or else this stucks out of screen */
}
/* all immed childs of mc_tt_cont except search panel (fixed) */
.mc_tt_section{
	/* DEF OVERFLOW_MIX several flex elems (in horiz cont) with different height (overflowing); need a separate div for each elem with overflow=auto to have individual scrollbar for each */
	/* disactivated in LB, while it causes unnecessary horizontal scrollbox */
	/* overflow: auto;   */
	resize: horizontal; /* TODO: normal resize */
}

/* empty.png (no attach) has height=32*/
.fh-body img{
	max-height: 16px;
}

/* 3 columns of tt form*/
/* 1 EXPLORER  */
.tt_explore_form{
	width: 300px;
	min-width: 200px;
}

/* 2 DETAIL initiall was used to show thumbs; in MS version is used to show records (table) instead */
.tt_thumbs_form{
	min-width: 250px!important; /* if tree hidden - need see thumbs */
}
/* add this class to .tt_thumbs_form if DETAIL is used to show thumbs */
.tt_thumbs_form{
	display:flex;
	/*flex-wrap: wrap;  14.07.22 this ruins all in hires*/
	align-items: stretch; /* flex-start; modif 24.06.22 */
	/*align-content: flex-start; commented while not allows to stretch tt_thumbs_section (to which added mc_page_body to stretch at full width when preview hidden) to full width */
}
	
.mc_section_header > div{ /* if apply it to fh - it stucks out */
	margin-right: 10px;
	margin-left: 10px;
}

.mc_section_header > i{ /* if apply it to fh - it stucks out */
	margin-right: 10px;
	margin-left: 10px;
}

/* 3 PREVIEW */
.tt_preview_form{
	flex: 0 1 auto;
	max-width: 40%; /* TODO TEMP fix, table too wide*/
	width: 500px;
}

	/* main section headers */

/* all cols of table_tree (EXPLORE/DETAIL/PREVIEW) have same styled (also same height) header (buttons, row captions, buttons) */
.mc_section_header{
	height: 40px ! important;
	/* background-color: #2c5f90 ! important; moved to  .mc_bg_second in main */
	color: white;
	padding: 10px;
	/*font-size: medium; */
}
.ttc_pager{ 
	/*font-size: medium; */
	/*color: white; */
	align-self: center; /* quickfix*/
}

.mc_section_header .fas{
	font-size: 20px;
}
/* EXPLORE header */
.tt_exp_btn_div{
	/*display: flex; justify-content: flex-start;  comm while need '>' on the right, so use LR instead */
	padding-left: 15px;
}
.tt_exp_btn_div > *{
	float: left; /* LR */
}
.tt_exp_btn_div > .mc_togsect{
	float: right;
}

/* PREVIEW header */
.tt_preview_btn_div{
	display: flex;
}
.tt_preview_btn_div .mc_togsect{
	margin-right: 2em;
}

.mc_user::after{
	content: "\f007";
	font-family: 'Font Awesome 5 Free';
	font-weight: 900;
	font-size: 20px;
	padding-left: 1em;
}
.simplemenu{
	color: white; 
	font-size: 20px;
	padding: 5px;
}

.mc_field_capt{ cursor:  context-menu; }

/* FIORD_ARROW */
/* [data-order='asc'] .fa-long-arrow-alt-down{ color: gray; } [data-order='desc'] .fa-long-arrow-alt-up{ color: gray; } TODO: not works */
.fa-long-arrow-alt-down, .fa-long-arrow-alt-up { color: gray; }
.mc_desc  .fa-long-arrow-alt-down{ color: #303030; }
.mc_asc .fa-long-arrow-alt-up  { color: #303030; }
.fa-long-arrow-alt-up { margin-left: 5px;} /* space cap - arrow */

.tt_thumbs_form td{
	/* font-size: 14px; instead use main font of main.css*/
}

/* hiding sections DEF TOGSCT; only one section is visible in mobile mode DEF MOMO */
@media only screen and (max-width: 800px) {
	.mc_tt_section{
		display: none;
	}
	.mc_tt_active_section{
		display: flex; /* TODO: use var? */
		flex-direction: column; /* or else - is reset to def = row */
		width: 100% ! important;
	}

	.tt_thumbs_form{
		align-items: stretch;
	}
	/* block table view BLOCKTAB in MOMO ... that's strange, flex must be in row.. */
	.tt_thumbs_form .fh-header th{
		display: flex; justify-content: space-between;
		/*display: block;*/
		width: 80%; /* unless - in my crom th are short TODO: using 80% is a quickfix, unless - th stuck out of table */
		padding-left: 20px;
	}
	.tt_thumbs_form .fh-body td{
		display: block;
		max-width: 800px; /* to cancel max-w 250 */
		padding-left: 20px;
	}
	.tt_thumbs_form td{
		white-space: normal ! important;
		border: none; /* to cancel bootstrap's of '1px...'*/
	}
	.tt_thumbs_form tr{
		border-bottom: 1px solid gray;
	}
	.tt_thumbs_form .td-tt_detail-date_mod{
		text-align: right;
	}
	.tt_thumbs_form .td-tt_detail-correspondent{
		font-weight: bold;
	}
	/* .tt_thumbs_form .fh-header{ display: none; table header (disp=block) shown only on request in MOMO	}  commented, instead use  tt_demo_hidden DEF DEHO*/
	.tt_demo_hidden{ display: none ! important; } /* kind of 'hidden' class which acts only in desktop mode ; while css can't add class (hidden) - use toggling this class  ; DEHO */
	#cssmenu {display: none ! important;} /* cssmenu not works in momo DEF CM800 ; NOTE: need disable stuff with max w 800 in cssmenu css file also to avoid some probs; but seems it's not designed to work under 800px*/

	/* #th-tt_detail-RES_checked{ display: none ! important; } CB_SEL_REC not show header of checkbox*/

	.mc_search_panel{ width: 100%; } 

	.tt_thumbs_form .fh-header{
		/*margin-left: 15px;*/
		/*margin-right: 10px;*/
	}
	.mc_tt_section > *{
		/*margin-left: 15px;*/
	}
}

/* ORD_LEFT */
/*.fh_header{display: flex; justify-content: space-between;}  can't use this - display=table*/
@media only screen and (min-width: 801px) {
	.mc_field_capt{ float: left; }
	/*.mc_row_order{ float: right;}*/
	.mc_togsect{ display: none;}
	.tt_detail_btn_div{ display: none;}
	.simplemenu {display: none ! important;} /* CM800 */
	/*.tt_thumbs_form .mc_section_header {color: black; background-color: var(--bgcol);}*/
}
.mc_row_order{ margin-right: 10px;}

iframe{ border: none ! important; }


/* DEF BROKENCAP if capt is too short (or value) - capt is broken into two lines (arrows on second line) TODO: not works, instead makes flex in row 
.fh-header th{
	display: flex;
	justify-content: space-between;
}*/

.ttc_thumb_add_info{
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    /*height: 15px;  commented 25.09.20; added dl count, shown below */
}
/* CB_SEL_REC */
.thumb .RES_checked{
    position: absolute;
    top: 0;
    left: 0;
    padding: 0px 5px;
    font-size: 25px;
    text-align: center;
    background-color: #aaaaaa;
    border-radius: 5px;
	opacity: 0.7;
}
.thumb .RES_checked::after{
	content: "\f0c8"; /* square not checked */
	font-weight: 900; /* NOTE: makes solid*/
	font-family: 'Font Awesome 5 Free';
	color: #aaaaaa;
	opacity: 0; /* not selected - not wisible, need it just for size */
}
.thumb.selected .RES_checked::after{
	/*content: "\f14a" ! important;  check-square */
	content: "\f00c" ! important; /* check-square */
	font-weight: 900; /* NOTE: makes solid*/
	/*color: #555555;*/
	color: #000000;
	opacity: 1;
}
tr td.RES_checked::after{
	content: "\f0c8"; /* square not checked */
	font-family: 'Font Awesome 5 Free';
}
tr.selected td.RES_checked::after{
	content: "\f14a" ! important; /* check-square */
	font-weight: 900; /* NOTE: makes solid*/
}
/* SELALL */
th.RES_checked::after{
	content: "\f0c8"; /* square not checked */
	font-family: 'Font Awesome 5 Free';
	font-weight: 100; /* TODO: added it, otherwise ws black; */
}
th.RES_checked.selected::after{
	content: "\f14a"; /* square not checked */
	font-family: 'Font Awesome 5 Free';
}

.tt_preview_form{ position: relative; } /* to show close btn wit abs pos*/
/* TODO: copied from RES_checked, join*/
.tt_preview_close{
    position: absolute;
	right: 10px;
	top: 50px;  /* TODO encaps header height of 40px */
    padding: 0px 10px;
    font-size: 25px;
    text-align: center;
    background-color: #aaaaaa;
    border-radius: 5px;
	opacity: 0.7;
}
.tt_preview_close::after{
	content: "\f00d";
	font-weight: 900;
	font-family: 'Font Awesome 5 Free';
	color: black;
}
.tt_image_div{ width: 100%;}
.mc_preview_img{ 
	/*max-width: 100%; causes small img width 166 px*/
	width: 100%; /* to avoid scroll bars */
}




#th-tt_detail-attach_exist{ display: flex; justify-content: space-between; } /* TODO: quickfix if do it for all fh - makes instead whole row flex ..*/
	
	

/* select folder */
.tt_select_folder_root_item *{
	text-align: left; /* TODO: need this quickfix or else li has style: Inherited from 'div#md_ss_div.center-screen-flex' andt that contains text-align 'center' */
}
.tt_select_folder_root_item .tree-cont{
	padding-left: 15px;  /*LG12  commented, causes gap in area sect header*/
}

.tt_select_folder_root_item .tree-elem{
	display: none;
}

.active.thumb{
	border-color: #2c5f90;
}

/* ONLINE_STAT */
.mc_offline{
	background-image: url('forbidden_128.png');
}
.mc_offline img{
	opacity: 0.5;
}
