#app-navigation {
	transform: translateX(0) !important;
	display: block;
	overflow-x: hidden;
}

#app-navigation > ul {
	height: auto;
	overflow: initial; /* in order to display popupmenus correctly*/
}

.navigation a > span {
	display: inline-block;
	vertical-align: text-bottom;
	margin-right: 12px;
}

#app-navigation h3 {
	padding-top: 28px;
	padding-left: 12px;
	border-top: 1px solid #ededed;
}
#app-navigation h3 [class^='icon-'] {
	display: inline-block;
	vertical-align: sub;
}

#app-navigation ul > li > ul > li > ul {
	flex: 0 1 auto;
	position: relative;
	width: 100%;
}
#app-navigation ul > li > ul > li > ul > li {
	display: inline-flex;
	flex-wrap: wrap;
	padding: 0;
	margin-left: 30px;
}

#app-navigation
	ul
	> li
	> ul
	> li
	> ul
	> li.editing
	> .app-navigation-entry-edit {
	opacity: 1;
	z-index: 250;
	margin-left: 4px;
	padding-left: 10px !important;
	width: 170px;
}

#app-navigation ul > li > ul > li > ul > li > a {
	background-size: 16px 16px;
	background-position: 14px center;
	background-repeat: no-repeat;
	display: block;
	justify-content: space-between;
	line-height: 44px;
	min-height: 44px;
	padding: 0 12px 0 44px;
	overflow: hidden;
	box-sizing: border-box;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--color-main-text);
	opacity: 0.57;
	flex: 1 1 0px;
	z-index: 100;
}

#app-navigation ul > li > ul > li > ul > li.active > a,
#app-navigation ul > li > ul > li > ul > li > a:hover,
#app-navigation ul > li > ul > li > ul > li > a:focus,
#app-navigation ul > li > ul > li > ul > li > a:active {
	opacity: 1;
}

#app-navigation ul li.collapsible > ul {
	transition: max-height 2000ms ease-in-out, opacity 250ms ease-in-out;
	opacity: 0;
	max-height: 0px;
}

#app-navigation ul li.collapsible.open > ul {
	opacity: 1;
	max-height: 9999px;
}

#app-navigation .app-navigation-entry-menu {
	top: 40px;
}

#app-content {
	transition: transform 0.5s ease;
	transform: none;
}

.mobile-nav {
	padding: 12px;
	display: none;
}

.mobile-nav .toggle-menu {
	display: inline-block;
}

@media only screen and (max-width: 768px) {
	.mobile-nav-open #app-content {
		transform: translate(250px, 0);
	}

	.mobile-nav {
		display: block;
	}
}

.add-bookmark input {
	width: 100%;
	margin: 0;
	margin-bottom: 4px;
	padding: 12px 40px 12px 12px;
	box-sizing: border-box;
	background-color: transparent;
	border: none;
	border-bottom: 1px solid #eee;
	border-radius: 0;
}

.add-bookmark button {
	position: absolute;
	right: 0;
	top: 0;
	min-height: 34px;
	padding: 10px 20px;
	background-color: transparent;
	border: none;
	opacity: 0.5;
	font-weight: bold;
}

.bulk-actions {
	display: none;
	position: fixed;
	top: 45px;
	left: 300px;
	right: 0;
	box-shadow: 2px 1px 4px 0px #666;
	padding: 12px 20px;
	background: white;
	z-index: 3;
}

.bulk-actions + * {
	transition: margin-top 0.5s ease;
}

.bulk-actions.active {
	display: block;
}

.bulk-actions.active + * {
	margin-top: 100px;
}

@media only screen and (max-width: 768px) {
	.bulk-actions {
		position: relative;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
	}

	.bulk-actions.active + * {
		margin-top: 0 !important;
	}
}

.bulk-actions > button {
	vertical-align: top;
}

.bulk-actions .tags {
	display: inline-block;
	width: 60%;
	margin: 3px 3px 3px 0;
	position: relative;
}

.bulk-actions .tags-selection {
	display: block;
	width: 100%;
}

.bulk-actions .selection-tools {
	float: right;
}

.bulk-actions .selection-tools .close {
	display: inline-block;
	cursor: pointer;
	margin: 3px 3px 3px 0;
	padding: 6px 12px;
	width: auto;
	min-height: 34px;
	cursor: pointer;
	box-sizing: border-box;
}

.bulk-actions .selection-tools .close span {
	display: inline-block;
	vertical-align: text-top;
}

button span,
.bulk-actions .selection-tools .close span {
	cursor: pointer;
}

@media only screen and (max-width: 925px) {
	.bulk-actions .tags {
		width: 80%;
	}
	.bulk-actions .selection-tools {
		float: none;
		text-align: right;
		margin-bottom: 20px;
	}
	.bulk-actions.active + * {
		margin-top: 100px;
	}
}

.bookmarks-empty {
	width: 200px;
	margin: 200px auto;
}

.bookmarks {
	display: flex;
	flex-wrap: wrap;
	padding: 20px 20px 20px 0;
}

.bookmarks-display {
	position: absolute;
	top: 5px;
	right: 5px;
}

.bookmarks-display button {
	padding: 12px;
}

.bookmarks.list-view {
	flex-direction: column;
	padding: 40px 0;
}

.bookmarks .empty-space {
	flex-grow: 1;
	width: 225px;
	height: 1px;
	margin: 20px 0 0 20px;
}

.bookmark-card {
	position: relative;
	box-sizing: border-box; /*necessary for hover effect goodness to work*/
	flex-grow: 1;
	width: 225px;
	height: 225px;
	margin: 10px 0 0 10px;
	padding: 15px;
	background-color: rgb(210, 210, 210);
	background-size: cover;
	background-position: center top;
	box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.65);
	opacity: 0.93;
	border: 2px solid white;
	-moz-user-select: none;
	-khtml-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.list-view .bookmark-card {
	width: 100%;
	height: auto;
	margin: 0;
	background-image: none !important;
	padding: 0;
	border-width: 1px;
}

.bookmark-card:hover,
.bookmark-card:focus {
	opacity: 1;
	cursor: pointer;
}

.selection-active .bookmark-card {
	opacity: 0.45;
}
.selection-active .bookmark-card:hover,
.selection-active .bookmark-card:focus {
	opacity: 0.6;
	cursor: pointer;
}

.bookmark-card.dragging {
	position: relative;
	box-shadow: #adadad 5px 5px 15px;
	opacity: 0.5;
	z-index: 100;
}

.selection-active .bookmark-card.dragging:not(.active) {
	position: relative;
	top: 0 !important;
	left: 0 !important;
	cursor: no-drop;
	box-shadow: none;
}

.bookmark-card .select-mode-checkbox + label {
	display: none;
	transform: scale(2);
	position: absolute;
	top: 40%;
	left: 45%;
	box-shadow: 0 0 10px white;
	background: white;
	border-radius: 3px;
}
.selection-active .bookmark-card .select-mode-checkbox + label {
	display: block;
}

.list-view .bookmark-card .select-mode-checkbox + label {
	top: 17px;
	left: 18px;
	z-index: 10;
}

.bookmark-card.active,
.bookmark-card.active:hover {
	border-color: #0082c9;
	opacity: 1;
}

.bookmark-card .panel {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 10px 7px 7px;
	background: rgba(255, 255, 255, 0.9);
	/*
	background: -moz-linear-gradient(
		top,
		rgba(0, 0, 0, 0) 0%,
		rgba(0, 0, 0, 0.4) 37%,
		rgba(0, 0, 0, 0.65) 100%
	);
	background: -webkit-linear-gradient(
		top,
		rgba(0, 0, 0, 0) 0%,
		rgba(0, 0, 0, 0.4) 37%,
		rgba(0, 0, 0, 0.65) 100%
	);
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0) 0%,
		rgba(0, 0, 0, 0.4) 37%,
		rgba(0, 0, 0, 0.65) 100%
	);*/
}

.bookmark-card .panel:hover {
	background: rgba(255, 255, 255, 0.95);
	text-decoration: underline;
}

.list-view .bookmark-card .panel {
	padding: 7px 5px 5px;
	position: static;
	margin: 0;
}

.bookmark-card .popovermenu {
	position: absolute;
	top: 36px;
	right: 7px;
	margin-right: -4px;
	z-index: 100;
}

.bookmark-card .toggle-actions {
	background-color: transparent;
	border: none;
	position: absolute;
	top: 7px;
	right: 5px;
}

.list-view .bookmark-card .toggle-actions {
	top: 5px;
}

.bookmark-card .popovermenu .menu-filter-remove {
	display: none;
}
.bookmark-card .popovermenu .menu-filter-add,
.bookmark-card.active .popovermenu .menu-filter-remove {
	display: block;
}
.bookmark-card.active .popovermenu .menu-filter-add {
	display: none;
}

.bookmark-card h2 {
	font-weight: normal;
	font-size: 16px;
	line-height: 1.2;
	text-shadow: 0 0 4px rgba(255, 255, 255, 0.9);
	margin: 0;
	margin-right: 25px;
	height: 40px; /* max two lines */
	box-sizing: border-box;
	overflow: hidden;
	cursor: pointer;
	background-image: var(--icon-link-000);
}

.bookmark-card h2:hover {
	text-shadow: 0 0 10px white;
}

.bookmark-card h2.with-favicon {
	/*background-image: bookmark/{id}/favicon*/
	background-position: 0px 0px;
	background-size: 24px 24px;
	background-repeat: no-repeat;
	padding-left: 42px;
}

.bookmark-card h2 a {
	font-weight: normal;
	font-size: 16px;
	color: black;
	cursor: pointer;
	/* extend link 42px to the left without moving text:
		 (for the favicon)
	*/
	padding-left: 42px;
	margin-left: -42px;
}

.list-view .bookmark-card h2 {
	width: 70%;
	height: auto;
	min-height: 25px;
}

.bookmark-card .tags {
	max-height: 100px;
	overflow: hidden;
}

.list-view .bookmark-card .tags {
	position: absolute;
	z-index: 10;
	top: 3px;
	left: 71%;
	right: 25px;
	height: 30px;
}

.bookmark-card .tag-nav-item {
	border-radius: 8px;
	background: #ebebeb;
	display: inline-block;
	padding: 0 8px;
	margin: 4px;
	box-shadow: 0px 0px 2px #0006;
}

.bookmark-card .tag-nav-item:hover {
	background: #e0e0e0;
}

.list-view .bookmark-card .tag-nav-item {
	background: #8282826e;
	box-shadow: inset 0px 0px 4px #0006 !important;
}
.list-view .bookmark-card .tag-nav-item:hover {
	background: #828282ef;
}

@media (max-width: 600px) {
	.bookmark-card {
		width: 150px;
		height: 150px;
		margin: 5px 0 0 5px;
	}
	.bookmark-card h2.with-favicon {
		/*background-image: bookmark/{id}/favicon*/
		background-position: 0px 3px;
		background-size: 16px 16px;
		background-repeat: no-repeat;
		padding-left: 20px;
	}
}
.bookmark-detail {
	position: fixed;
	top: 45px;
	right: 0;
	z-index: 2;
	width: 450px;
	height: 100%;
	box-sizing: border-box;
	padding: 20px;
	background: white;
	color: #333;
	overflow-y: auto;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.bookmark-detail.slide-in {
	animation: slide-in 0.2s both 1;
}

.bookmark-detail.slide-out {
	animation: slide-out 0.2s both 1;
}

@keyframes slide-in {
	0% {
		right: -450px;
	}
	100% {
		right: 0;
	}
}

@keyframes slide-out {
	0% {
		right: 0;
	}
	100% {
		right: -450px;
	}
}

@media only screen and (max-width: 768px) {
	.bookmark-detail {
		width: auto;
		left: 0;
	}
}

.bookmark-detail .preview {
	height: 240px;
	background-size: cover;
	background-position: center 0;
	box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.65);
	margin: -20px;
	margin-bottom: 20px;
}

.bookmark-detail h1 {
	min-height: 25px;
	font-size: 23px;
	line-height: 1.2;
	cursor: text;
	background-position: 0px 0px;
	background-size: 24px 24px;
	background-repeat: no-repeat;
	padding-left: 42px;
}

.bookmark-detail h1.empty {
	opacity: 0.4;
}

.bookmark-detail h2 {
	margin-top: 12px;
	opacity: 0.4;
}
.bookmark-detail h2 .edit {
	float: right;
}
.bookmark-detail h3 {
	margin-top: 20px;
	margin-bottom: 12px;
	border-bottom: 1px solid #ebebeb;
}

.bookmark-detail h2 :link:hover {
	text-decoration: underline;
}

.bookmark-detail h2 :link span {
	display: inline-block;
	vertical-align: middle;
	margin-right: 3px;
}

.bookmark-detail > .close {
	position: absolute;
	top: 0;
	right: 0;
	width: 40px;
	height: 40px;
	cursor: pointer;
	background-color: rgba(255, 255, 255, 0.3);
}

.bookmark-detail .status {
	position: absolute;
	top: 16px;
	left: 40px;
	font-size: 16px;
	opacity: 0.6;
}
.bookmark-detail .status [class^='icon-'] {
	display: inline-block;
}
.bookmark-detail .status .message {
	display: none;
	background-color: rgba(255, 255, 255, 0.7);
	padding: 4px;
}
.bookmark-detail .status.saving .message.message-saving {
	display: inline;
	position: relative;
	left: 8px;
}
.bookmark-detail .status.saved .message.message-saved {
	display: inline;
	animation: fadeout ease 5s both 1;
}
@keyframes fadeout {
	0% {
		opacity: 1;
		display: inline;
	}
	99% {
		opacity: 0;
		display: inline;
	}
	100% {
		opacity: 0;
		display: none;
	}
}

.bookmark-detail .actions {
	position: absolute;
	right: 40px;
}

.bookmark-detail .actions button {
	height: 40px;
	width: 40px;
}

.bookmark-detail
	.select2-container--default
	.select2-selection--multiple
	.select2-selection__choice,
.bulk-actions
	.select2-container--default
	.select2-selection--multiple
	.select2-selection__choice,
.bookmark-detail .tag-nav-item {
	border-radius: 8px;
	border: none;
	background: #ebebeb;
	display: inline-block;
	padding: 2px 8px;
}

.bookmark-detail
	.select2-container--default
	.select2-selection--multiple
	.select2-selection__choice:hover,
.bulk-actions
	.select2-container--default
	.select2-selection--multiple
	.select2-selection__choice:hover,
.bookmark-detail .tag-nav-item:hover {
	background: #e0e0e0;
}

.bookmark-detail .description {
	margin-top: 20px;
	font-size: 16px;
	/*for editing*/
	width: auto;
	min-height: 300px;
	cursor: text;
	white-space: pre-wrap;
}

.bookmark-detail .description.empty {
	opacity: 0.4;
}

.folders {
	flex-shrink: 0;
}

.folders-item {
	-moz-user-select: none;
	-khtml-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.folders-item .folders-item.add-folder {
	display: none !important;
}

.folders-item.add-folder.droptarget-folder,
.folders-item.add-folder.editing {
	display: inline-flex !important;
}

.folders-item.dragging {
	position: relative;
	box-shadow: #adadad 5px 5px 15px;
	opacity: 0.5;
	z-index: 100;
}

.folders-item.droptarget-folder > a,
.folders-item.droptarget-bookmark > a {
	background-color: #f3f3f3;
	cursor: copy;
	border: 1px #ababab dashed;
}

.tags-management {
	overflow-y: auto !important;
}

.tags-management .tag-man-item:last-child {
	margin-bottom: 50px; /* in order to not have it hidden behind settings */
}

.tags-management .tag-man-item {
	cursor: pointer;
}

.tags-management .tag-man-item.active {
	background: #f3f3f3;
}

.tags-management .tag-man-item .actions {
	float: right;
}

.tags-management .tag-man-item .actions ul {
	display: block !important;
}

.tags-management .tag-man-item .actions .action {
	display: inline-block;
	width: auto !important;
}

.tags-management .tag-man-item .action button {
	border: none;
	background-color: transparent;
	opacity: 0.45;
	padding: 3px 12px;
}

.tags-management .tag-man-item .action button:hover {
	opacity: 1;
}

.tags-management .tag-man-item input[type='text'] {
	min-height: 28px;
	padding: 0 4px;
	margin: 0;
	width: 70%;
}

/* make checkbox look like an icon */
.menu-item span {
	margin: 0;
}

.menu-item-checkbox span:first-child {
	margin: 0 !important;
	width: 38px;
}

/* display 'remove from filter' when selected, and 'add to ...' when unselected*/

.tags-management .tag-man-item.active .menu-filter-add {
	display: none;
}

.tags-management .tag-man-item .menu-filter-remove {
	display: none;
}

.tags-management .tag-man-item.active .menu-filter-remove {
	display: block;
}

.settings {
	position: sticky;
	bottom: 0;
	z-index: 100;
	width: 100%;
}

#app-navigation .settings h3 {
	padding-top: 0;
	padding-left: 0;
	border-top: none;
}

.settings .button {
	display: inline-block;
}

.settings .import-form {
	display: inline-block;
}

.settings .import {
	display: none;
}

.settings .upload {
	display: none;
}

.quiver-vertically {
	position: relative;
	animation-name: quiver-vertically;
	animation-duration: 500ms;
	animation-iteration-count: 1;
}

@keyframes quiver-vertically {
	0% {
		top: 0;
	}
	16% {
		top: 5px;
	}
	33% {
		top: -5px;
	}
	49% {
		top: 5px;
	}
	66% {
		top: -5px;
	}
	83% {
		top: 5px;
	}
	100% {
		top: 0;
	}
}
