/* Root Elements */
body,
html {
	margin: 0;
	padding: 0;
	min-height: 100%;
	width: 100%;
	background: var(--root-background);
	background-size: cover;
	background-repeat: no-repeat;
	font-family: var(--font-family);
	color: var(--text-color);
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Posts */
.post-item {
	  display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: left;
    width: 100%;
    max-height: max-content;
    margin: 0.5rem 0;
    border: var(--fieldset-border);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.post-content-wrapper {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: left;
	width: 100%;
	height: 100%;
}

.post-title,
.user-title {
	font-weight: bold;
	font-size: var(--large-font-size);
	word-break: break-word;
	width: 100%;
}

.post-content {
	font-size: var(--primary-font-size);
	word-break: break-word;
	width: 100%;
}

.post-image-wrapper {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	margin-right: 0.8rem;
}
.post-image img,
.post-image * img {
	border: none;
	border-radius: var(--border-radius);
    margin: 0 1rem 0 0;
}

.post-created,
.post-updated {
    margin: 0.5rem 0 0 0;
	font-size: var(--tiny-font-size);
	color: #999;
}

em > .post-created,
strong > .post-created,
a > .post-created {
	text-decoration: none;
	font-style: normal;
	font-weight: normal;
	color: #999;
}

.post-username {
    margin: 0 1rem 0 0;
    font-weight: bold;
	font-size: var(--primary-font-size);
	color: var(--text-color);
	word-break: break-word;
}

/* Base styling */
#main {
	display: flex;
	flex-direction: column;
	height: 100%;
    
	width: calc(100% - 30px);
	margin: 15px;
	margin-top: 0;
	max-width: 800px;
	align-items: center;
}

/* Navigation */

nav {
  width: 100%;
}

a.subnav-item {
  width: calc(100% * 1/3);
  text-align: center;
  color: var(--nav-color);
  background: var(--nav-background);
}

.subnav-item[aria-current]:not([aria-current=false]) {
  background: var(--link-color);
}

#nav-header {
	display: flex;
	flex-direction: row;
	margin-top: 1rem;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 800px;
	height: 3em;
}

#nav-header a {
	text-decoration: none;
}

#nav-profile,
#nav-add-post {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	font-size: var(--large-font-size);
	height: 2em;
	width: 2em;
	background: var(--nav-background);
	border-radius: var(--border-radius);
	color: var(--nav-color);
	transition: 0.2s;
}

#nav-profile:hover,
#nav-add-post:hover {
	border: none;
	background: var(--nav-alt-background);
	color: var(--nav-alt-color);
}

#nav-links {
	width: 100%;
	max-width: 100vw;
	font-size: 0.9em;
	display: flex;
	flex-direction: row;
	justify-content: space-evenly;
	background: var(--nav-background);
	box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
	border-radius: var(--border-radius);
}

#nav-links a {
	border: none;
	color: var(--nav-color);
	text-decoration: none;
	padding: 0.4rem;
	flex: 1;
	text-align: center;
	transition: 0.2s;
}

#nav-links a:hover {
	border: none;
	background: var(--nav-alt-background);
	color: var(--nav-alt-color);
}

/* make first and last nav links round on left and right respetivly when hovered */
#nav-links a:first-child {
	border-top-left-radius: var(--border-radius);
	border-bottom-left-radius: var(--border-radius);
}
#nav-links a:last-child {
	border-top-right-radius: var(--border-radius);
	border-bottom-right-radius: var(--border-radius);
}

/* Pagination */

.paginate-container {
  width: 100%;
}

.paginate-container .pagination a {
  margin: 0 2px;
}

#pagination,
#comments-pagination {
	
}

#comment-form {
  display: flex;
  flex-direction: column;
  align-items: start;
}

#comment-form .form-group {
  display: flex;
  flex-direction: column;
  align-items: start;
  width: 100%;
}

#comment {
  width: 400px;
}

/* a.active {
	background-color: var(--link-alt-color);
	color: var(--text-color);
} */

/* Links */
a {
	text-decoration: none;
	color: var(--text-color);
	transition: 0.2s;
}

.post-content > a:not(#signoutlink),
#list-notice > p > a {
	text-decoration: underline;
	color: var(--link-color);
}

.post-created a {
	color: #999;
}

a:hover,
.post-content > a:not(#signoutlink):hover,
#list-notice > p > a:hover {
	color: var(--link-color);
}

/* Notifications */
#list-notice {
	max-width: 100%;
	overflow: wrap;
	display: flex;
	flex-direction: column;
}
.list-notice-text {
	margin: 0;
}

/* Border */
.double-border {
	border: 5px solid var(--nav-background);
}

#list,
#comments,
#settings {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: left;
	width: 100%;
	flex-shrink: 0;
}

/* Images & Media */
img {
	border-radius: var(--border-radius);
	filter: var(--global-filter);
}

/* Misc */
.purple-text {
	color: purple;
}
small {
	font-size: 0.5em;
}

/* Buttons */

button, a, input {
  outline: none;
  text-decoration: none;
  transition: 0.2s;
}

button {
  border: none;
  padding: 0.4rem 1.25rem;
}

.btn i {
  font-weight: 900;
}

.btn-main,
.btn-primary {
  background: var(--button-background);
	color: var(--button-color);
	transition: 0.2s;
	cursor: pointer;
/* 	font-size: 0.9em; */
}

.btn-main:hover,
.btn-primary:hover,
.btn-primary:active {
  background: var(--link-color);
	color: var(--button-color);
}

button:disabled {
	background-color: var(--button-background);
	color: #999;
	border: 2px solid #999;
	cursor: not-allowed;
}

button:disabled:hover {
	background-color: var(--button-background);
	color: #999;
	border: 2px solid #999;
	cursor: not-allowed;
}

.btn-alt {
	border-radius: var(--border-radius);
	height: max-content;
	background: var(--button-color);
    background-image: linear-gradient(to right, var(--link-color), var(--link-color));
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
	color: var(--button-background);
	transition: 0.2s;
	cursor: pointer;
	font-size: 0.9em;
	padding-inline: 1em;
}

.btn-alt:hover {
	background-size: 100% 100%;
	color: var(--button-color);
}

/* Fieldsets */

fieldset {
	background-color: var(--fieldset-background);
	backdrop-filter: var(--fieldset-bgfilter);
	border: var(--fieldset-border);
	border-radius: var(--border-radius);
	padding: 1rem;
	margin: 0.4rem 0 0 0;
	height: max-content;
  width: 100%;
  box-sizing: border-box;
}
fieldset .legend { 
    font-weight: bold;
    font-size: var(--large-font-size);
    color: var(--fieldset-label-color);
}

#list-notice-fieldset,
#settings-fieldset,
#comments-fieldset {
	display: none;
	flex-direction: column;
}

/* Forms */
.form-group {
	position: relative;
    display: flex;
  flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
    align-self: start;
    margin: 0 0 15px 0;
}

/* .form-group:after {
    content: "";
    position: absolute;
    z-index: 1;
    right: 0;
    width: 0;
    bottom: 0;
    background: var(--link-color);
    height: 2px;
    border-radius: 1px;
    transition-property: width;
    transition-duration: 0.2s;
    transition-timing-function: ease-out;
}
.form-group:hover:after {
    left: 0;
    right: auto;
    width: 100%;
} */

.form-group:focus-within:after {
    width: 100%;
}

label {
    color: var(--input-color);
    opacity: 1;
    user-select: none;
    pointer-events: none;
}

#signin-form,
#signup-form,
#add-post-form,
.form-generic {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	align-self: center;
	justify-content: center;
	width: 100%;
}

.form-generic * {
  margin: 0.5rem 0 0 0 !important;
}

textarea,
input, select, button {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	font-family: var(--font-family);
}

input[type="button"],
input[type="submit"],
input[type="reset"] {
	height: max-content;
	width: max-content;
	transition: 0.2s;
	cursor: pointer;
	margin-top: 0.15rem;
}

input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
	
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="username"] {
    background: var(--input-background);
    color: var(--input-color);
}

textarea {
	border: var(--input-border);
	border-radius: var(--border-radius);
	width: 100%;
	height: 5rem;
	resize: none;
	padding: 0.5rem;
	font-size: var(--small-font-size);
	background: var(--input-background);
	color: var(--input-color);
	transition: 0.2s;
}

select {
	border: var(--input-border);
	border-radius: var(--border-radius);
	background: var(--input-background);
	color: var(--text-color);
	width: 100%;
	height: 1.75rem;
	padding: 0.2rem;
	font-size: var(--small-font-size);
	transition: 0.2s;
}

input[type="file"] {
  display: none;
	border: none;
	width: 100%;
	max-width: 100%;
}

input[type="file"]:focus {
	outline: none;
	background-color: transparent;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
	outline: none;
	background-color: var(--input-background);
	color: var(--text-color);
  border-color: var(--link-color);
}

.btns {
    margin: 0.5rem 0 0 0;
}

input[type="file"]:focus {
	border: none;
	outline: none;
	color: var(--text-color);
}

/* Footer */
#footer {
	display: flex;
	justify-content: space-between;
	width: 100%;
	color: var(--outer-color);
	font-size: var(--small-font-size);
	padding: 1rem;
	/* Allow people to scroll to the bottom of the page, even with anchor ads */
	margin-bottom: 8rem;
}
#footer a { color: var(--outer-color); }
#footer a:hover { color: var(--outer-alt-color); }
#footer .right { text-align: right; }

#footer p {
	margin: 0.1rem;
}

/* Patches */
brandname {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	font-weight: 200;
	color: var(--outer-color);
	font-family: var(--title-font-family);
}

superscript {
	font-size: 0.5em;
	background: var(--nav-color);
	border-radius: 2rem;
	padding-inline: 0.5rem;
	margin-inline: 0.4rem;
	color: var(--nav-background);
}

.post-views {
	font-size: var(--small-font-size);
}

.views-icon {
	margin-right: 0.2rem;
}

.followbtn-small {
	font-size: 0.5rem;
	width: 64px;
}

#list h1,
#list h2,
#list h3,
#list h4,
#list h5,
#list h6 {
	margin-top: 0.5rem;
}