:root {
	--green: #48BB78;
	--light-green: rgba(72, 187, 120, 0.5);
	--black: #24292e;
	--light-yellow: #f6efa6;
	--red: #c0392b;
}

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: #24292e;
}

* {
	box-sizing: border-box;
}

a {
	color: #7848bb;
	font-weight: 600;
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}

mark {
	background-color: #f6efa6;
}

/* 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:#48BB78;
}

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%;
}

/* 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;
}

#login-cont input {
	margin: 7.5px auto;
}
/* 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 rgba(72, 187, 120, 0.5);
}
.folder-cont h3 {
	margin: 0;
	color: black;
}
.folder-cont ul {
	display: none;
	list-style-type: none;
	margin: 0px;
	padding: 0px;
}
.folder-cont svg {
	color: #48BB78;
}
.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 #48BB78;
}

.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"
}

/* 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: #48BB78;
	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 #48BB78 solid;
}

#files .file {
	border-left: 4px #7848bb solid;
}

#files form {
	margin: 0px;
	padding: 0;
}
/* dataobj styles */
.post-header {
	margin: 10px 0 5px 0;
	padding-bottom: 5px;
}

#post-btns {
	margin: 10px 0;
}

#post-btns form {
	margin: 0 10 0 0;
}

#post-btns .btn {
	height: 35px;
}

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

#post-btns button {
	margin: 0;
}

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

#post-title-form {
	margin-left: 0;
}

#post-title-form input {
	font-weight: bold;
	font-size: 1.2em;
	display: inline-block;
}

#post-title-form input#title {
	width: 90%;
}

.post-title-form-sucess {
	color: var(--green);
}

.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;
}


/*Partly inspired by Primer -> https://github.com/primer/css*/
.Header {
	display: flex;
	padding: 16px;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255,255,255,0.7);
	background-color: #7848bb !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: #24292e;
	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: #24292e;
	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: #7848bb;
	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";
}

#post-move-form {
	margin-left: 0em;
}

#post-move-form input[type="submit"] {
	margin: 0;
}

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