:root {
	--main-highlight-color: #EF940B;
	--main-bg-color: white; 
	--main-text-color: black;
	--main-link-color: #106BF4;
	--shadow-color: #888;
	--gray-light: #cacaca;
	--gray-medium: #e0e0e0;
	--gray-dark: #4c4c4c;
	--red: red;
	--green: green;
		
	--default-margin-tiny: 0.5em;
	--default-margin-small: 0.75em;
	--default-margin: 1em;
	--default-margin-tiny: 0.15em;
	--border-radius-small: 0.35em;
	--border-radius-medium: 0.5em;

	--thin-border-width: 1px;
	--medium-border-width: 2px;
}

body {
	color: var(--main-text-color);
	background-color: var(--main-bg-color);
}

a {
	color: var(--main-link-color);
}

.themelist, 
.centertitle,
.horizontal-list {
	text-align: center;
}

.themelist > ul {
	background: var(--gray-light);
	border-radius: var(--border-radius-medium);
	padding: var(--default-margin) calc(var(--default-margin) * 1.5);
	list-style: none;
	display: inline-block;
}

.themelist li {
	background-color: var(--main-bg-color);
	margin: calc(var(--default-margin) / 2) 0;
	padding: calc(var(--default-margin) / 2);
	border-radius: var(--border-radius-small);
}

.link {
	text-decoration: none;
	color: inherit;
}

.link span {
	position: relative;
}

.link span:before,
.link span:after {
	content: "";
	position: absolute;
	bottom: -0.25em;
	width: 0;
	height: var(--medium-border-width);
	margin: 0 0 0;
	background-color: var(--main-highlight-color);
}

.link span:before {
	left: 50%;
}

.link span:after {
	right: 50%;
}

.link:hover span:before,
.link:hover span:after {
	width: 50%;
}

.avatar-grid {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
}

img.avatar {
	width: 100%;
	border-radius: var(--border-radius-medium);
}

.avatar {
	box-shadow: 5px 5px 8px var(--shadow-color);
}

.avatar:hover, 
.themelist li:hover,
.link:hover { 
	transform: scale(1.1); 
}

.themelist li:hover {
	background-color: var(--secondary-bg-color);
}

.blur {
	transition: all .2s ease-in-out 2s;
	filter: blur(5px) grayscale(80%);
}

.separator {
	display: inline-block;
	border-left: var(--thin-border-width) solid black;
	width: var(--thin-border-width);
	height: var(--default-margin-small);
	box-sizing: border-box;
}

.avatar-box {
	width: 300px;
	margin: var(--default-margin);
}

.username {
	margin-left: 5px;
	color: var(--gray-dark);
}

.post-box {
	background: var(--gray-medium);
	border-radius: 5px;
}

.post-box {
	box-shadow: 5px 5px 10px var(--shadow-color);
}

.post-text-box {
	margin: 5px 0;
	padding: 3px;
	box-shadow: 0 0 11px 2px var(--shadow-color);
	border-radius: 5px;
}

.user-box, 
.post-meta-box {
	border-radius: 5px;
	background: var(--gray-light);
	padding: 3px;
	box-sizing: border-box;
	width: 100%;
	display: inline-block;
}

.user-box {
	padding-bottom: 0;
}

.post-meta-box {
	padding-top: 0;
}

.loader, 
.loader-small {
	border: var(--medium-border-width) solid var(--main-bg-color); /* Light grey */
	border-top: var(--medium-border-width) solid var(--main-highlight-color); /* Blue */
	border-radius: 50%;
	width: 20px;
	height: 20px;
	animation: spin 1s linear infinite;
	margin: auto;
}

.loader-small {
	width: 0.5em;
	height: 0.5em;
	margin-left: 0.5em;
	display: inline-block;
}

.presence-indicator {
	border: 5px solid var(--gray-dark);
	border-radius: 50%;
	display: inline-block;
	margin-left: 0.2em;
}

.linkbutton {
	border-radius: var(--border-radius-small);
	padding: calc(var(--default-margin) / 2);
	text-decoration: none;
	background: var(--gray-light);
	display: inline-block;
	margin-left: var(--default-margin);
	color: inherit;
}

button {
	border: none;
}

.avatar, 
.linkbutton, 
.themelist li, 
.link span:before, 
.link span:after,
.theme-chooser-list-item,
.theme-chooser-list-item span:before,
.theme-chooser-list-item span:after {
	transition: all .2s ease-in-out;
}

.theme-chooser-wrapper {
	background: var(--gray-light);
	border-radius: var(--border-radius-medium);
	padding: 0 var(--default-margin);
	display: inline-block;
}

.theme-chooser-wrapper > span, .theme-chooser-wrapper > div {
	padding: calc(var(--default-margin) / 2);
	border-radius: var(--border-radius-small);
	margin: calc(var(--default-margin) / 4);
	color: var(--main-bg-color);
	background: var(--gray-dark);
	display: inline-block;
}

.theme-chooser-list {
	display: inline-block;
	text-align: left;
	list-style: none;
	margin: calc(var(--default-margin) / 2);
	padding: 0;
}

.theme-chooser-list-item {
	display: inline-block;
	padding: calc(var(--default-margin) / 2);
	background: var(--main-bg-color);
	border-radius: var(--border-radius-small);
	margin: calc(var(--default-margin) / 4);
}

.theme-chooser-list > a {
	text-decoration: none;
	color: inherit;
}

.theme-chooser-list-item:hover {
	transform: scale(1.1);
}

.theme-chooser-list-item span {
	position: relative;
}

.theme-chooser-list-item span:before,
.theme-chooser-list-item span:after {
	content: "";
	position: absolute;
	bottom: -0.25em;
	width: 0;
	height: var(--medium-border-width);
	margin: 0 0 0;
	background-color: var(--main-highlight-color);
}

.theme-chooser-list-item span:before {
	left: 50%;
}

.theme-chooser-list-item span:after {
	right: 50%;
}

.theme-chooser-list-item:hover span:before,
.theme-chooser-list-item:hover span:after {
	width: 50%;
}

.theme-preview {
	background: var(--main-bg-color);
	color: var(--main-text-color);
	display: inline-block;
	border-radius: var(--border-radius-small);
	text-align: center;
	position: absolute;
	width: 80%;
	max-width: 400px;
	display: none;
	z-index: 1000;
	bottom: 10%;
	left: 50%;
	transform: translate(-50%, calc(100% - 2em));
}

.theme-preview div {
	padding: 0.5em;
	border-radius: inherit;
	margin: 0.5em;
}

.theme-preview > div {
	background: var(--gray-light);
}

.theme-preview > div > div {
	background: var(--main-bg-color);
}

.theme-preview .hl-color {
	border: 2px solid var(--main-highlight-color);
}

.theme-preview .link-color {
	border: 2px solid var(--main-link-color);
}

.theme-preview .red {
	border: 2px solid var(--red);
}

.theme-preview .green {
	border: 2px solid var(--green);
}

.theme-preview .light-gray {
	border: 2px solid var(--gray-light);
}

.theme-preview .medium-gray {
	border: 2px solid var(--gray-medium);
}

.theme-preview .dark-gray {
	border: 2px solid var(--gray-dark);
}

.theme-preview .shadow {
	box-shadow: 0px 0px 5px 5px var(--shadow-color);
}

.theme-preview::before {
	content: "";
	width: 0px;
	height: 0px;
	border: 0.8em solid transparent;
	position: absolute;
	left: 49%;
	bottom: -30px;
	border-top: 20px solid var(--main-bg-color);
}

.dimmer {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: black;
	opacity: 0.5;
	z-index: 999;
	pointer-events: none;
}

.advanced-upload {
	background-color: var(--gray-light);
  	/*
  	outline: 2px dashed var(--main-highlight-color);
  	outline-offset: -10px;
  	*/
  	border-radius: var(--border-radius-medium);
}

.advanced-upload .upload-box {
  	display: inline;
}

input:not([type=submit]):not([type=file]) {
	padding: var(--border-radius-small);
	background: var(--gray-light);
	border-radius: var(--border-radius-medium);
	border: none;
	-moz-appearance: textfield;
	-webkit-appearance: textfield;
	appearance: textfield;
	margin: 0;
	color: inherit;
}

input[type=number]::-webkit-inner-spin-button {
	-webkit-appearance: none;
}

input:focus {
	outline: outline: 5px solid var(--main-highlight-color);
}

#avatarupload {
	width: 0.1px;
	height: 0.1px;
	opacity: 0;
	overflow: hidden;
	position: absolute;
	z-index: -1;
}

.file-upload label {
	width: 100%;
	text-overflow: ellipsis;
	white-space: nowrap;
	cursor: pointer;
	display: inline-block;
	overflow: hidden;
	text-align: center;
}

.upload-form {
	display: none;
}

.file-upload {
	padding: 100px 20px;
	position: relative;
}

.advanced-upload .outline-radius {
	width: calc(100% - 20px);
	height: calc(100% - 20px);
	border: 2px dashed var(--main-highlight-color);
	position: absolute;
	left: 9px;
	top: 9px;
	border-radius: var(--border-radius-medium);
}


button.linkbutton {
	padding: var(--border-radius-small);
}

#avatarPreviewContainer {
	position: absolute;
	left: 0;
	bottom: 0;
}

#avatarPreview {
	max-width: 100px;
	max-height: 100px;
}

#removeImage {
	width: 20px;
	height: 20px;
	position: absolute;
	top: 0;
	right: 0;
	display: none;
}

#removeImage svg {
	fill: var(--red);
}

#uploadProgress {
	display: none;
	width: 100%;
	/*
	color: red;
	background: red;
	border: 1px solid red;
	*/
}

.notif {
	position: absolute;
	padding: var(--default-margin-small);
	min-width: 250px;
	z-index: 999999;
	border-radius: var(--border-radius-small);
	color: var(--shadow-color);
	font-weight: 300;
	white-space: nowrap;
	user-select: none;
	opacity: 0;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
	box-sizing: border-box;
	transform: scaleX(0.5);
	transition: all 0.4s ease-out;
	color: var(--gray-dark);
}

.notif[data-state="success"] {
    background-color: var(--green);
    color: var(--gray-light);
}

.notif[data-state="alert"] {
	background-color: var(--red);
}

.notif[data-state="default"] {
	background: var(--main-link-color);
	
}
/*
progress::-webkit-progress-bar { 
	background: var(--gray-light);
}

progress::-webkit-progress-value {
	background: red;
}

progress::-moz-progress-bar {
	background: red;
}

progress {
	color: red;
}
*/
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

@media (prefers-color-scheme: dark) {
	:root {
		--main-highlight-color: #EE6E1F;
		--main-bg-color: #333; 
		--main-text-color: #d0d0d0;
		--main-link-color: #1191e0;
		--gray-light: #4c4c4c;
		--gray-dark: #cacaca;
		--gray-medium: #3b3b3b;
		--shadow-color: #656565;
		--red: #e4053e;
		--green: #04c446;
	}
}