
/********************************************************** Widget ***/
.browse-widget {
	display: inline-block;
	min-width: 300px;
	width: initial;
	padding: 5px;
	font-family: sans-serif;

	background: gray;
	/*color: rgba(255,255,255,0.8);*/
	color: white;
}
/*
.browse-widget:not(:focus) {
	opacity: 0.8;
}
*/
.browse-widget .v-block {
	width: 100%;
	height: auto;

	box-sizing: border-box;
}
.browse-widget .v-block:not(:first-of-type) {
	border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.browse-widget .v-block:empty {
	display: none;
}



/************************************************************ Path ***/

.browse-widget .path {
	padding: 5px;
	padding-left: 10px;
	padding-right: 10px;
	white-space: nowrap;
	padding-right: 30px;


	/* XXX need a way to make this automatic and depend on .browser 
		setup to avoid multiple scrollbars and the need to manually
	 	dive into the configuration to change the container size 
		limits
	*/
	max-width: 80vh;
	overflow: auto;
}
/* XXX not sure about this... */
.browse-widget .path::-webkit-scrollbar {
	width: 5px;
	height: 5px;
}
.browse-widget .path:hover {
	opacity: 1;
}
.browse-widget .path:empty {
	display: block;
}
.browse-widget:not(.flat) .path:not([contenteditable]):before {
	content: attr(prefix);
}
.browse-widget .path .dir {
	display: inline-block;
	cursor: pointer;

	opacity: 0.8;
}
.browse-widget .path .dir:after {
	content: "/";
}
.browse-widget .path .dir:hover ~ .dir {
	opacity: 0.2;
}
.browse-widget .path .dir.cur {
	opacity: 0.5;
	cursor: text;
}
.browse-widget .path .dir.cur:after {
	content: "";
}
.browse-widget .path .dir.cur:hover {
	opacity: 1;
}
.browse-widget .path .dir.cur[contenteditable] {
	opacity: 1;
}
.browse-widget .path .dir.cur:empty:not([contenteditable]) {
	position: relative;
	width: 50px;
	height: 12px;
	background: transparent;
	opacity: 0;
}
.browse-widget .path .dir.cur:empty:hover:not([contenteditable]) {
	opacity: 0.6;
}
.browse-widget .path .dir.cur:empty:hover:not([contenteditable]):after {
	content: "______";
	border: dashed white 1px;
	cursor: text;
}



/************************************************************ List ***/

/* XXX need to make this resizable up but only to a certain size (~80vh) */
.browse-widget .list {
	/* XXX need a way to make this automatic and depend on .browser 
		setup to avoid multiple scrollbars and the need to manually
	 	dive into the configuration to change the container size 
		limits
	*/
	max-height: 80vh;

	overflow-y: auto;
	overflow-x: hidden;
}
/*
.browse-widget .list:before {
	content: "";
	position: absolute;
	display: inline-block;
	width: 100%;
	height: 40px;
	top: 1px;
	left: 0px;
	background: linear-gradient(to top, rgba(128, 128, 128, 0), rgba(128, 128, 128, 1));
}
.browse-widget .list:after {
	content: "";
	position: absolute;
	display: inline-block;
	width: 100%;
	height: 40px;
	bottom: 0px;
	left: 0px;
	background: linear-gradient(to bottom, rgba(128, 128, 128, 0), rgba(128, 128, 128, 1));
}
*/
/*
.browse-widget .list:empty {
	display: block;
}
*/
/* XXX this is not used because it will mess up numbering and some actions...
 * 	...need a more thorough avoidance of non-visible elements...
.browse-widget.disabled-hidden:not(.flat) .list div.disabled,
.browse-widget.not-traversable-hidden:not(.flat) .list div.not-traversable {
	display: none;
}
*/
.browse-widget .list .text {
	display: inline-block;
	float:left;
}
.browse-widget .list .button {
	display: inline-block;
	float:right;
	opacity: 0.5;
	padding-left: 10px;
	padding-right: 10px;
	box-sizing: border-box;
}
.browse-widget .list .button:hover {
	opacity: 0.9;
	background-color: rgba(0, 0, 0, 0.2);
}
.browse-widget .list>div {
	padding: 5px;
	padding-left: 15px;
	padding-right: 15px;
	cursor: pointer;

	/* XXX need a way to make this automatic and depend on .browser 
		setup to avoid multiple scrollbars and the need to manually
	 	dive into the configuration to change the container size 
		limits
	*/
	max-width: 80vh;

	opacity: 0.7;

	/*white-space: nowrap;*/
	overflow: hidden;
}
.browse-widget .list>div[count]:after {
	display: inline-block;

	content: "(" attr(count) ")";

	float: right;
	margin-right: 10px;

	opacity: 0.4;
}
/* highlight seach... */
.browse-widget .list>div .text b {
	background-color: rgba(0, 0, 255, 0.5);
}
.browse-widget .list>div.strike-out .text {
	text-decoration: line-through;
	opacity: 0.3;
}
.browse-widget .list>div.highlighted {
	font-style: italic;
	font-weight: bold;
}
.browse-widget .list>div.highlighted .text:after {
	content: ' *';
}
.browse-widget:not(.flat) .list div:not(.not-traversable) .text:after {
	content: "/";
}

.browse-widget:focus .list>div.selected,
.browse-widget .path>.dir:hover,
.browse-widget .list>div:hover {
	background: rgba(0, 0, 0, 0.05);

	opacity: 0.9;
}
.browse-widget .list>div.selected {
	background: rgba(0, 0, 0, 0.08);
}
.browse-widget:focus .list>div.selected {
	background: rgba(0, 0, 0, 0.08);
	box-shadow: rgba(0, 0, 0, 0.2) 0.1em 0.1em 0.2em; 

	opacity: 1;
}

/* XXX need to make the next two different...  */
.browse-widget .list>div.filtered-out {
	opacity: 0.5;
}
.browse-widget:not(.show-filtered-out) .list>div.filtered-out {
	display: none;	
}
.browse-widget .list>div.disabled {
	opacity: 0.3;
}

/* numbers... */
/* XXX need to show this only on devices with keyboards... */
.browse-widget .list .text:before {
	opacity: 0.3;
	float: left;
	font-size: small;
}
.browse-widget.filtering .list>div .text:before {
	display: none;
}

.browse-widget .list>div .text:before {
	width: 12px;
	margin-left: -15px;
}

.browse-widget .list>div:nth-of-type(1) .text:before {
	content: "1";
}
.browse-widget .list>div:nth-of-type(2) .text:before {
	content: "2";
}
.browse-widget .list>div:nth-of-type(3) .text:before {
	content: "3";
}
.browse-widget .list>div:nth-of-type(4) .text:before {
	content: "4";
}
.browse-widget .list>div:nth-of-type(5) .text:before {
	content: "5";
}
.browse-widget .list>div:nth-of-type(6) .text:before {
	content: "6";
}
.browse-widget .list>div:nth-of-type(7) .text:before {
	content: "7";
}
.browse-widget .list>div:nth-of-type(8) .text:before {
	content: "8";
}
.browse-widget .list>div:nth-of-type(9) .text:before {
	content: "9";
}



/******************************************************** Theaming ***/

/* Light */
.light .browse-widget {
	background: white;
	color: rgba(0, 0, 0, 0.8);
}
.light .browse-widget .v-block:not(:first-of-type) {
	border-top: 1px solid rgba(0, 0, 0, 0.2);
}



/* Dark */
.dark .browse-widget {
	background: #0a0a0a;
	color: rgba(255, 255, 255, 0.8);
}
/* XXX can we make this simpler??? */
.dark .browse-widget:focus .list div.selected,
.dark .browse-widget .path .dir:hover,
.dark .browse-widget .list div:hover {
	background: rgba(255, 255, 255, 0.08);
}
.dark .browse-widget .list div.selected {
	background: rgba(255, 255, 255, 0.1);
}
.dark .browse-widget:focus .list div.selected {
	background: rgba(255, 255, 255, 0.1);
}



/*********************************************************************/
