:root {
	--green: #48BB78;
	--light-green: rgba(72, 187, 120, 0.5);
	--black: #24292e;
	--main-accent: blue;
	--light-yellow: #f6efa6;
	--red: #c0392b;
	--gray-background: rgba(27,31,35,0.07);
}


body {
	font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
	font-size: 14px;
	margin: 0;
	line-height: 1.5;
	color: var(--black);
}

* {
	box-sizing: border-box;
}

a {
	color: var(--red);
	font-weight: 600;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

mark {
	background-color: var(--light-yellow);
}

/* default form stylings */
input, select {
	font-size: 17px;
	transition: border-color 2s;
	border: none;
	border-bottom: 3px #f5f4f4 solid;
	padding: 5px;
	margin: 8px 0px;
	background-color: white;
}
label {
	font-size: 17px;
	font-weight: bold;
	padding: 0px 5px;
	margin: 8px 0px;
}
select {
	margin: 3px 0px;
	padding: 1px 5px;
}
input:not([type="checkbox"]):not([type="submit"]) {
	display: block;
}

input:focus:not([type="submit"]), input:hover:not([type="submit"]), select:focus, select:hover {
	border-color: var(--green);
}

form {
	margin: 10px;
	box-shadow: none;
}


.hidden, .hidden * {
	display: none !important;
}

.fadein {
	transition: opacity 1s;
	opacity: 1;
	display: flex !important;
}

#page {
 display: flex;
}

.content {
	width: 60%;
	max-width: 1200px;
}

/* user login / edit forms */
#login-cont {
	position: absolute;
	left: 0;
	right: 0;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

#login-cont, #user-cont {
	width: 300px;
}

/* sidebar styles */
.expand-btn {
	background: none;
	padding: 0;
	border: none;
	font-weight: bold;
}

.folder-cont {
	padding: 0px 10px;
	margin: 0px 5px;
	border-left: 2px solid var(--light-green);
}
.folder-cont h3 {
	margin: 0;
	color: black;
}
.folder-cont ul {
	display: none;
	list-style-type: none;
	margin: 0px;
	padding: 0px;
}
.folder-cont svg {
	color:  var(--green);
}
.folder-cont .folder-title {
	align-items: center; 
}
.sidebar li svg {
	min-width: 16px;
}
.sidebar {
	margin: 0;
	margin-right: 40px;
	padding: 0;
	padding-top: 30px;
	width: 22%;
	overflow: visible;
	border-right: 5px solid  var(--green);
}

.sidebar li {
	margin: 5px 0px 0px 15px;
	align-items: center;
	flex-wrap: nowrap;
}

.sidebar input[type="text"] {
	width: 40%;
	margin: 10px 0px;
}

/* Active/current link */
.sidebar a.active {
	background-color: #4caf50;
	color: white;
}

.script-output {
	border: 3px;
	border-style: dashed;
	display: block;
	width: fit-content;
	min-width: 95%;
	unicode-bidi: embed;
	font-family: monospace;
	white-space: pre;
	margin-bottom: 1em;
	padding: 7px;
}

.LaTeX {
	width: 50px !important;
}
.LaTeX:before {
	content: "LaTeX"
}

#searchBar {
	border: 1px solid #dfe1e5; border-radius: 5px
}

/* homepage styles */
#main-links {
	margin-bottom: 15px;
	align-items: center;
}

#main-links .btn {
	margin: 3px;
}

#current-path {
	flex: auto;
	margin-right: 10px;
	font-size: 16px;
}

#current-path a {
	color: #0366d6;
}

#current-path span {
	color:  var(--green);
	text-decoration: none;
}

#dir-info {
	align-items: center;
}

#dir-info > * {
	padding: 18px 5px;
}

#files ul {
	padding: 0px;
}

#files ul li {
	width: 100%;
	padding: 16px;
	margin-top: -1px;
	list-style-type: none;
	border-top: 1px #e1e4e8 solid;
}

#files ul .octicon {
	margin: 0px 10px;
}

#files ul a {
	color: black;
}

#files .dir {
	border-left: 4px  var(--green) solid;
}

#files .file {
	border-left: 4px var(--red) solid;
}

/* dataobj styles */
#post-btns {
	margin: 10px 0;
}

#post-btns form {
	margin: 0;
}

#post-btns button {
	margin: 0;
}

#post-btns .btn-delete {
	margin-left: 5px;
	width: 100%;
	height: 100%;
}


/*Partly inspired by Primer -> https://github.com/primer/css*/
.Header {
	display: flex;
	padding: 5px 16px;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255,255,255,0.7);
	background-color: var(--green) !important;
	align-items: center;
	flex-wrap: nowrap;
}

.Header-item {
	display: flex;
	margin-right: 10px;
	align-self: stretch;
	align-items: center;
	flex-wrap: nowrap;
}

.Header-link {
	color: white;
	display: flex;
	align-items: center;
}

.full {
	flex: auto;
}

.flash {
	position: relative;
	padding: 20px 16px;
	color: var(--black);
	border-style: solid;
	border-width: 1px;
	border-radius: 6px;
	margin: 10px 0px;
}

.flash-error {
	background-color: #ffe3e6;
	border-color: rgba(158,28,35,0.2);
}
.flash-success {
	background-color: #dcffe4;
	border-color: rgba(23,111,44,0.2);
}

.d-flex {
	display: flex;
	flex-wrap: wrap;
}

.btn {
	color: var(--black);
	font-weight: normal;
	background-color: #fafbfc;
	box-shadow: 0 1px 0 rgba(27,31,35,0.04),inset 0 1px 0 rgba(255,255,255,0.25);
	transition: background-color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
	position: relative;
	display: inline-block;
	padding: 5px 16px;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	white-space: nowrap;
	vertical-align: middle;
	cursor: pointer;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	border: 1px solid;
	border-radius: 6px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	border-color: rgba(27,31,35,0.15);
}
.btn-primary {
	background-color: var(--main-accent);
	color: white;
}


.btn:hover, .btn.hover, [open] > .btn {
	background-color: #f3f4f6;
	transition-duration: 0.1s;
}


.btn-primary:hover, .btn-primary.hover, [open] > .btn-primary {
	background-color: #2c974b;
}

.btn a:hover {
	text-decoration: none;
}

.octicon {
	display: inline-block;
	vertical-align: text-top;
	fill: currentColor;
}


.error-wrapper {
	margin-bottom: 65px;
}
.note-error::after, .note-error::before {
	position: absolute;
	left: 10px;
	z-index: 15;
	width: 0;
	height: 0;
	pointer-events: none;
	content: " ";
	border: solid transparent;
}

.note-error::before {
	margin-left: -1px;
	border-width: 6px;
	border-bottom-color: #f97583;
	bottom: 100%;
}
.note-error::after
{
	border-width: 5px;
}
.note-error {
	position: absolute;
	z-index: 10;
	display: block;
	max-width: 450px;
	padding: 4px 8px;
	margin: 8px 0 0;
	font-size: 12px;
	font-weight: 400;
	border-style: solid;
	border-width: 1px;
	border-radius: 6px;
	background-color: #ffeef0;
	border-color: #f97583;
	min-height: 17px;
	margin: 4px 0 2px;
	font-size: 12px;
	color: #586069;
}

#link-form {
	position: absolute;
	margin-left: auto;
	margin-right: auto;
	left: 0;
	right: 0;
	z-index: 1000;
	width: 300px;
	border: 1px #e1e4e8 solid;
	background-color: #f3f4f6;
    overflow-y:scroll;
	overflow-x:hidden;
	max-height: 300px;
	top: 300px;
}
#link-form div {
	margin: 20px auto;
	width: 90%;
}
#link-form ul button {
	width: 100%;
	padding: 16px;
	border: none;
	border-top: 1px #e1e4e8 solid;
}
#link-form ul {
	width: 100%;
	margin: 0px;
	padding: 0px;
}
.bidirBtn {
	width: 100px !important;
}
.bidirBtn::before {
	content: "Link to a note";
}

/* Content adaptions */
.post-header {
	margin: 10px 0 5px 0;
	padding-bottom: 5px;
	border-bottom: 1px solid var(--black);
}

.post-header h2 {
	margin-top: 0;
	display: inline-block;
	margin-right: 1em;
}

#post-title {
	margin: 0 1em 0 0;
}

.post-date {
	background: var(--gray-background);
	padding: 4px 7px;
	margin-right: 6px;
	display: inline-block;
}

.post-tags {
	display: inline-block;
}

.post-tags span {
	background: var(--light-yellow);
	padding: 4px 7px;
	margin-right: 6px;
	display: inline-block;
}

.table-of-contents {
	position: relative;
	color: var(--black);
	margin: 10px 0px;
}


/* Editor */
/* One of these: CodeMirror cm-s-easymde CodeMirror-wrap */
.CodeMirror {
	font-family: monospace !important;
}

/* mobile adjustements */
@media only screen and (max-width: 500px) {
	.content {
		width: 90%;
		margin: auto;
	}
	.sidebar {
		display: none;
	}
	input:not([type="submit"]), select {
	width: 100%;
	}
}


/* Custom elements */
note {
  background: rgba(252, 220, 40, 0.4);
  padding: 1em;
}

.note {
    background: rgba(252, 220, 40, 0.4);
    padding: 1em;
}

.search-results {
	list-style-type: none;
	padding-left: 0;
}

.search-results .search-result {
	padding:  1em;
	margin-bottom: 1em;
	/*border: 1px solid gray;*/
	box-shadow: 0	0	10px #dde;
}

.search-results .post-tags {
	margin-top: 0.5em;
	display: block;
}

.search-results .search-result-path {
	font-weight: bold;
}