
main {
	
	font-size: 13px;
	
	position: fixed;
	top: 0;
	left: 200px;
	right: 0;
	bottom: 36px;
	z-index: 1;
	
	background: var(--main);
				
	h1 {
		
		text-align: center;
		font-size: 13px;
		font-weight: normal;
		line-height: 24px;
	}
	
	#loader {
		
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1;	
		background: var(--loader) no-repeat center center;
	}
}

aside {
	
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 200px;
	
	color: var(--side-text);
	border-right: 1px solid var(--dividers);
	
	#sidebar { display: none; }
	
	#sidebar-all {
		
		position: absolute;
		top: 28px;
		left: 0;
		right: 0;
	}
	
	.sidebar-filters {
		
		position: absolute;
		top: 60px;
		left: 0;
		right: 0;
		bottom: 190px;
		
		display: flex;
		flex-direction: column;
	}
	
	.sidebar-scroll {
		
		overflow-y: scroll;
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
	}
	
	#sidebar-folders,
	#sidebar-tags {
		
		height: 50%;
		position: relative;
	}
	
	#sidebar-folders {
		
		margin-bottom: 10px;
		
		.sidebar-scroll { top: 66px; }
	}
	
	#sidebar-tags {
		
		.sidebar-scroll { top: 44px; }
	}
	
	.list-title {
		
		display: block;
		padding: 0 20px 0 15px;
		font-size: 12px;
		line-height: 22px;
		font-weight: 500;
		color: var(--text-light);
	}
	
	dl {
		
		font-size: 12px;
		line-height: 22px;
		padding: 0 10px;
		
		dt {
			
			padding: 0 20px 5px 5px;
			font-size: 12px;
			font-weight: 500;
			color: var(--text-light);
		}
		
		dd {
			
			font-weight: 400;
			padding: 0;
			
			a {
				
				display: flex;
				align-items: center;
				padding: 0 10px;
				
				color: var(--side-text);
				text-decoration: none;
				border-radius: 6px;
				
				transition: all .15s ease-in-out;
				
				-webkit-user-drag: none;
				cursor: default;
				
				&:hover {
					
					background: var(--side-hover);
				}
				
				&.folder {
					
					padding-left: 30px;
					background-image: var(--icon-folder);
					background-position: left 8px top 5px;
					background-repeat: no-repeat;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
					display: block;
					
					&.folder-home {
						
						display: flex;
						background-image: none;
						padding-left: 0;
					}
				}
				
				.filter-icon {
					
					width: 25px;
					height: 22px;
					margin-right: 5px;
					
					background-color: var(--side-icon);
					
					&.icon-bookmarks {
						
						width: 22px;
						margin-right: 8px;
						mask: var(--icon-bookmark) no-repeat center right;
					}
					
					&.icon-new-folder {
						
						width: 23px;
						margin-right: 7px;
						mask: var(--icon-new-folder) no-repeat center right;
					}
					
					&.icon-home {
						
						width: 23px;
						margin-right: 7px;
						mask: var(--icon-home) no-repeat center right;
					}
					
					&.icon-untagged { mask: var(--icon-untagged) no-repeat center right 5px; }
				}
				
				.filter-name {
					
					flex-grow: 2;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
					padding-right: 5px;
				}
				
				&.selected {
					
					background: var(--accent-light);
					color: #fff;
					
					.filter-icon { background-color: #fff; }
					
					&.folder {
						
						background-image: var(--icon-folder-selected);
						background-position: left 8px top 5px;
						background-repeat: no-repeat;
						
						&.folder-home { background-image: none; }
					}
				}
			}
			
			input[type='checkbox'] {
				
				margin: 0 9px 0 10px;
    			width: 8px;
				height: 10px;
			}
		}
		
		&#filter-all,
		&#new-folder,
		&#taglist-extras {
			
			dd {
				
				a {
					
					padding-left: 0;
				}
			}
		}
	}
	
	#column-list {
		
		width: 200px;
		position: absolute;
		bottom: 50px;
		left: 0;
		right: 0;
		line-height: 16px;
		
		label { font-size: 10px; }
	}
}

aside {
	
	.search-field {
		
		height: 40px;
		padding: 8px 10px;
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		
		#search {
			
			color: var(--text-color);
			width: 100%;
			height: 22px;
			font-size: 13px;
			padding: 0 24px;
			background: #ffffff var(--icon-search) no-repeat left 5px center;
			border: 1px solid #b9b9b9;
			border-radius: 3px;
			box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
		}
		
		#clear {
			
			display: none;
			width: 20px;
			height: 20px;
			background: var(--icon-clear) no-repeat center;
			border: none;
			outline: none;
			position: absolute;
			top: 9px;
			right: 11px;
		}
	}
}

footer {
	
	background: var(--footer);
	position: absolute;
	left: 200px;
	right: 0;
	bottom: 0;
	height: 35px;
	z-index: 0;
	
	padding: 0 20px;
	
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-start;
	align-items: center;
	
	#add-bookmark {
		
		height: 23px;
		
		svg {
			
			polygon { fill: var(--button-color); }
		}
		
		&:focus,
		&:active {
			
			svg {
				
				polygon { fill: #fff; }
			}
		}
	}
	
	#update,
	#dev {
		
		white-space: nowrap;
		height: 15px;
		font-size: 11px;
		font-weight: 500;
		color: #fff;
		border: 0;
		border-radius: 3px;
		margin-right: 10px;
	}
	
	#update {
		
		
		background-color: #6236FF;
		
		&:active { background-color: #9164FF; }
		&:focus { outline: none; }
	}
	
	#dev {
		
		padding: 1px 6px;
		margin-top: 1px;
		background-color: #18bf64;
		
		&.α { background-color: #fb434a; }
		&.β { background-color: #007cff; }
	}
	
	.fadein { display: none; }
}

.blurred {
	
	footer { background: none; }
}

.tag {
	
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 1px solid transparent;
	border-radius: 50%;
	overflow: hidden;
	text-indent: -1000px;
	margin: 0 4px 0 0;
}

.tagname {
	
	font-size: 11px;
	display: inline-block;
	margin-right: 10px;
}

aside {
	
	.tag {
		
		min-width: 10px;
		min-height: 10px;
		max-width: 10px;
		max-height: 10px;
		margin-right: 10px;
	 }
}

.selected {
	
	.tag {
		
		border-color: #fff;
		
		&.untagged {
			
			border: 0;
			border-radius: 0;
			background-color: #fff;
			mask: var(--icon-untagged) no-repeat center center;
		}
	}
}

#bookmarks {
	
	tbody {
		
		tr {
			
			td {
				
				cursor: default;
				
				&.details-control {
					
					background: var(--disclosure-closed) no-repeat center;
				}
			}
			
			&.shown {
				
				td.details-control {
					
					background-image: var(--disclosure-opened);
				}
			}
			
			&.selected {
				
				td.details-control {
					
					background-image: var(--disclosure-closed-focus);
				}
				
				&.shown {
					
					td.details-control {
						
						background-image: var(--disclosure-opened-focus);
					}
				}
			}
		}
	}
	
	.folders-column {
		
		.folder {
			
			display: inline-block;
			
			&+.folder {
				
				&::before {
					
					content: ',';
					display: inline-block;
					padding-right: 10px;
				}
			}
		}
	}
	
	.tag { text-indent: 1000px; }
	
	.tags-column {
		
		.tag { margin-bottom: 1px; }
		.tagname { display: none; }
	}
}

.padded-left { padding-left: 20px !important; }

.padded-right {
	
	padding-right: 20px !important;
	padding-left: 20px !important;
}

td.padded-right {
	
	display: flex;
	justify-content: flex-end;
}

#toggle-info-panel {
	
	appearance: none;
	border: 0;
	width: 15px;
	height: 12px;
	background-color: #868686;
	mask: var(--icon-details) no-repeat center center;
	
	&.opened { background-color: var(--text); }
}

.details-panel {
	
	margin: -4px -10px;
	padding: 15px 20px;
	line-height: 1.4;
	border-top: 1px solid var(--table-border);
	
	.inner {
		
		padding: 10px 15px 15px;
		background-color: var(--details-table);
		box-shadow: 0 3px 8px rgba(0,0,0,.2);
	}
	
	.row {
		
		padding: 5px 0;
		min-height: 28px;
		position: relative;
		border-bottom: 1px solid var(--details-divider);
		
		.label {
			
			float: left;
			width: 100px;
			padding-left: 10px;
		}
		
		.value {
			
			margin-left: 100px;
			padding-right: 10px;
		}
		
		.nowrap {
			
			position: absolute;
			left: 0;
			right: 0;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}
		
		.wrap {
			
			white-space: normal;
		}
		
		.tag {
			
			vertical-align: -2px;
			
			&.untagged {
				
				background-color: var(--side-text);
				mask: var(--icon-untagged) no-repeat center center;
			}
		}
		
		.favicon {
			
			vertical-align: text-bottom;
			margin-right: 5px;
		}
		
		[id^=url_] {
			
			color: var(--text);
			text-decoration: none;
			transition: color .4s;
			
			cursor: default;
			
			&:hover {
				
				color: royalblue;
			}
		}
		
		.folder {
			
			display: inline-block;
			padding-left: 20px;
			background: var(--icon-folder) no-repeat left center;
			
			&+.folder { margin-left: 10px; }
		}
	}
	
	.buttons {
		
		padding-top: 15px;
		
		button { margin-right: 5px; }
	}
}

[data-theme="dark"] {
	
	aside {
		
		.search-field {
			
			#search {
				
				background-color: rgba(255,255,255,.1);
				border-color: rgba(255,255,255,.1);
				box-shadow: inset 0 2px 2px rgba(0,0,0,0.1);
			}
		}
	}
	
	.tag {
		
		filter:	invert(100%);
	}
	
	.selected {
		
		.tag {
			
			border-color: #000;
			
			&.untagged {
				
				border: 0;
				border-radius: 0;
				background-color: #000;
				mask: var(--icon-untagged) no-repeat center center;
			}
		}
	}
	
	.details-panel {
		
		.row {
			
			.tag {
				
				&.untagged {
					
					background-color: #000;
				}
			}
			
			[id^=url_] {
				
				&:hover {
					
					color: dodgerblue;
				}
			}
		}
	}
}
