/* Positioning */
.left {
  text-align: left;
}

.right {
  text-align: right;
}

.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.justify {
  text-align: justify;
}

.float-left {
	float: left;
}

.float-right {
	float: right;
}

.block {
	display: block;
}

.inline {
  display: inline-block;
  vertical-align: middle;
}

/* Remove margins */
.m-b-0 {
	margin-bottom: 0 !important;
}

.m-t-0 {
	margin-top: 0 !important;
}

.m-l-0 {
  margin-left: 0 !important;
}

.m-r-0 {
  margin-right: 0 !important;
}

/* Add margins */
.m-b-5 {
	margin-bottom: 0.5rem;
}

.m-b-10 {
	margin-bottom: 1rem;
}

.m-b-20 {
	margin-bottom: 2rem;
}

.m-t-5 {
	margin-top: 0.5rem;
}

.m-t-10 {
	margin-top: 1rem;
}

.m-t-20 {
	margin-top: 2rem;
}

.m-l-5 {
	margin-left: 0.5rem;
}

.m-l-10 {
	margin-left: 1rem;
}

.m-l-20 {
	margin-left: 2rem;
}

.m-r-5 {
	margin-right: 0.5rem;
}

/* Colors */
.text-light {
	color: var(--light1);
}

.text-extra-light {
	color: var(--border);
}

/* Fix div with floating elements inside */
.clearfix::after {
	content: "";
	display: table;
	clear: both;
}

/* Format headers */
h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.125rem;
}

h5 {
  font-size: 1.0625rem;
}

h6 {
  font-size: 0.95rem;
}

/* Prevent long strings from overflowing container */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Fix line height when title wraps */
h1,
h2,
h3 {
  line-height: 1.1;
}

/* Reduce heading sizes on mobile */
@media only screen and (max-width: 64em) {
	/* to do if needed */
}

/* Format links & buttons */
a,
a:visited {
  color: var(--accent);
	text-decoration: none;
}

a:hover {
  text-decoration: none;
}

textarea,
input[type] {
  font-size: 1rem;
}

button,
[role="button"],
input[type="submit"],
input[type="reset"],
input[type="button"],
label[type="button"] {
  border: none;
  border-radius: var(--standard-border-radius);
  background-color: var(--accent);
  font-size: 1rem;
  color: var(--bg);
  padding: 0.7rem 0.9rem;
  margin: 0.5rem 0;
}

button.button,
input[type="submit"].button {
  padding: 0.464rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
}

button.link {
  border-radius: none;
  background-color: transparent;
  color: var(--accent);
  padding: 0;
}

input[type='search']::-webkit-search-cancel-button {
  /*filter: brightness(0) saturate(100%) invert(28%) sepia(35%) saturate(2879%) hue-rotate(336deg) brightness(96%) contrast(84%);*/
  -webkit-appearance: none;
	appearance: none;
	display: none;
}

button[disabled],
[role="button"][aria-disabled="true"],
input[type="submit"][disabled],
input[type="reset"][disabled],
input[type="button"][disabled],
input[type="checkbox"][disabled],
input[type="radio"][disabled],
select[disabled] {
  cursor: not-allowed;
}

input:disabled,
textarea:disabled,
select:disabled,
button[disabled] {
  cursor: not-allowed;
  background-color: var(--disabled);
  color: var(--text-light);
}

input[type="range"] {
  padding: 0;
}

/* Set the cursor to '?' on an abbreviation and style the abbreviation to show that there is more information underneath */
abbr[title] {
  cursor: help;
  text-decoration-line: underline;
  text-decoration-style: dotted;
}

button:enabled:hover,
[role="button"]:not([aria-disabled="true"]):hover,
input[type="submit"]:enabled:hover,
input[type="reset"]:enabled:hover,
input[type="button"]:enabled:hover,
label[type="button"]:hover {
  filter: brightness(1.4);
  cursor: pointer;
}

button:focus-visible:where(:enabled, [role="button"]:not([aria-disabled="true"])),
input:enabled:focus-visible:where(
  [type="submit"],
  [type="reset"],
  [type="button"]
) {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Format navigation */
header > nav {
  line-height: 1.865;
  padding: 0.8rem 0;
}

/* Use flexbox to allow items to wrap, as needed */
header > nav ul,
header > nav ol {
  align-content: space-around;
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

/* List items are inline elements, make them behave more like blocks */
header > nav ul li,
header > nav ol li {
  display: inline-block;
}

header > nav a,
header > nav a:visited {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--standard-border-radius);
  color: var(--text);
  display: inline-block;
  padding: 0.1rem 0.8rem;
  text-decoration: none;
}

header > nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
  cursor: pointer;
}

/* Reduce nav side on mobile */
@media only screen and (max-width: 64em) {
  header > nav a {
    border: none;
    padding: 0;
    line-height: 1;
  }
}

/* Consolidate box styling */
aside, details, pre, progress {
  background-color: var(--accent-bg);
  border-radius: var(--standard-border-radius);
  margin-bottom: 1rem;
}

progress {
	margin-bottom: 0;
}

aside {
  font-size: 1rem;
  width: 30%;
  padding: 0 15px;
  margin-left: 15px;
  float: right;
}

/* Make aside full-width on mobile */
@media only screen and (max-width: 64em) {
  aside {
    width: 100%;
    float: none;
    margin-left: 0;
  }
}

article, fieldset, dialog {
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--standard-border-radius);
  margin-bottom: 1rem;
}

article h2:first-child,
section h2:first-child {
  margin-top: 1rem;
}

section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1rem;
  margin: 3rem 0;
}

/* Don't double separators when chaining sections */
section + section,
section:first-child {
  border-top: 0;
  padding-top: 0;
}

section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

details {
  padding: 0.7rem 1rem;
}

summary {
  cursor: pointer;
  font-weight: bold;
  padding: 0.7rem 1rem;
  margin: -0.7rem -1rem;
  word-break: break-all;
}

details[open] > summary + * {
  margin-top: 0;
}

details[open] > summary {
  margin-bottom: 0.5rem;
}

details[open] > :last-child {
  margin-bottom: 0;
}

/* Format tables */
table {
  border-collapse: collapse;
  margin: 1.5rem 0;
}

td,
th {
  border: 1px solid var(--border);
  text-align: left;
  padding: 0.5rem;
}

th {
  background-color: var(--accent-bg);
  font-weight: bold;
}

tr:nth-child(even) {
  /* Set every other cell slightly darker. Improves readability. */
  background-color: var(--accent-bg);
}

table caption {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* Format forms */
textarea,
select,
input {
  font-size: inherit;
  font-family: inherit;
  padding: 0.429rem 0.7rem;
  color: var(--text);
  background-color: var(--accent-bg);
  border: 1px solid var(--accent-bg);
  border-radius: var(--standard-border-radius);
  box-shadow: none;
  max-width: 100%;
  display: inline-block;
}
label {
  display: block;
}
textarea:not([cols]) {
  width: 100%;
}

/* Input placeholder text color fix */
::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: var(--text-light);
  opacity: 1; /* Firefox */
}
:-ms-input-placeholder { /* Internet Explorer 10-11, Microsoft Edge */
  color: var(--text-light);
}

/* Remove focus outline for inputs */
textarea:focus,
select:focus,
input:focus {
	outline: none;
}

/* Add arrow to drop-down */
select:not([multiple]) {
  background-image: linear-gradient(45deg, transparent 49%, var(--light1) 51%),
    linear-gradient(135deg, var(--light1) 51%, transparent 49%);
  background-position: calc(100% - 1.125rem), calc(100% - 0.75rem);
  background-size: 0.375rem 0.375rem, 0.375rem 0.375rem;
  background-repeat: no-repeat;
  padding-right: 1.88rem;
}

select {
	cursor: pointer;
}

/* checkbox and radio button style */
input[type="checkbox"],
input[type="radio"] {
  vertical-align: top;
  position: relative;
  width: min-content;
  margin-top: 0.1rem;
  margin-left: 0;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline-block;
  margin-right: 0.9rem;
}

input[type="radio"] {
  border-radius: 100%;
  padding: 0.5rem;
}

input[type="checkbox"] {
  padding: 0.55rem;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: var(--accent);
}

input[type="checkbox"]:checked::after {
  /* Creates a rectangle with colored right and bottom borders which is rotated to look like a check mark */
  content: " ";
  width: 0.18em;
  height: 0.32em;
  border-radius: 0;
  position: absolute;
  top: 0.12em;
  left: 0.22em;
  background-color: transparent;
  border-right: solid var(--bg) 0.08em;
  border-bottom: solid var(--bg) 0.08em;
  font-size: 1.8em;
  transform: rotate(45deg);
}
input[type="radio"]:checked::after {
  /* creates a colored circle for the checked radio button  */
  content: " ";
  width: 0.25em;
  height: 0.25em;
  border-radius: 100%;
  position: absolute;
  top: 0.125em;
  background-color: var(--bg);
  left: 0.125em;
  font-size: 32px;
}

/* Makes input fields wider on smaller screens */
@media only screen and (max-width: 64em) {
  textarea,
  select,
  input {
    width: 100%;
  }
}

/* Set a height for color input */
input[type="color"] {
  height: 2.5rem;
  padding:  0.2rem;
}

/* do not show border around file selector button */
input[type="file"] {
  border: 0;
}

/* Misc body elements */
hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 3.2rem auto;
}

mark {
  padding: 0.2rem 0.4rem;
  border-radius: var(--standard-border-radius);
  background-color: var(--accent-bg);
  color: var(--text);
}

img,
video {
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
  display: block;
  overflow-x: auto;
}

figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

blockquote {
  margin: 2rem 0 2rem 2rem;
  padding: 0.4rem 0.8rem;
  border-left: 0.35rem solid var(--accent);
  color: var(--text-light);
  font-style: italic;
}

cite {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: normal;
}

dt {
    color: var(--text-light);
}

/* Use mono font for code elements */
code,
pre,
pre span,
kbd,
samp {
  font-family: var(--mono-font);
  color: var(--code);
}

kbd {
  color: var(--preformatted);
  border: 1px solid var(--preformatted);
  border-bottom: 3px solid var(--preformatted);
  border-radius: var(--standard-border-radius);
  padding: 0.1rem 0.4rem;
}

pre {
  padding: 1rem 1.4rem;
  max-width: 100%;
  overflow: auto;
  color: var(--preformatted);
}

/* Fix embedded code within pre */
pre code {
  color: var(--preformatted);
  background: none;
  margin: 0;
  padding: 0;
}

/* Progress bars */
/* Declarations are repeated because you */
/* cannot combine vendor-specific selectors */
progress {
  width: 100%;
}

progress:indeterminate {
  background-color: var(--accent-bg);
}

progress::-webkit-progress-bar {
  border-radius: var(--standard-border-radius);
  background-color: var(--accent-bg);
}

progress::-webkit-progress-value {
  border-radius: var(--standard-border-radius);
  background-color: var(--accent);
}

progress::-moz-progress-bar {
  border-radius: var(--standard-border-radius);
  background-color: var(--accent);
  transition-property: width;
  transition-duration: 0.3s;
}

progress:indeterminate::-moz-progress-bar {
  background-color: var(--accent-bg);
}

dialog {
  max-width: 40rem;
  margin: auto;
}

dialog::backdrop {
  background-color: var(--bg);
  opacity: 0.8;
}

@media only screen and (max-width: 720px) {
  dialog {
    max-width: 100%;
    margin: auto 1em;
  }
}

/* Classes for buttons */
.button,
.button:visited {
  display: inline-block;
  text-decoration: none;
  border: none;
  border-radius: var(--standard-border-radius);
  background: var(--accent);
  color: var(--bg);
  padding: 0.33rem 0.78rem;
  margin: 0;
	font-weight: 500;
}

.button:hover,
.button:focus {
  filter: brightness(1.12);
  cursor: pointer;
}

.button .fa {
	font-size: 0.875rem;
	margin-right: 0.3rem;
}

.button.light-button .fa {
	color: var(--accent);
}

.button.light-button:hover,
.button.light-button:focus {
	filter: brightness(0.92);
}

.button.light-button {
  background: var(--accent-bg);
  color: var(--text);
}

.button.light-button.red {
  background: var(--red);
  color: var(--bg);
  margin-right: 0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.button.light-button.red .fa {
  color: var(--bg);
}

.button.light-button.dash-button {
  background: var(--border);
}

.btn-group {
	display: inline-block;
}

.btn-group.flex-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-group .button {
	border-radius: 0;
}

.btn-group span.button {
	cursor: text;
}

.btn-group .button:first-of-type {
	border-radius: var(--standard-border-radius) 0 0 var(--standard-border-radius);
}

.btn-group.flex-group .button:first-of-type {
  width: 100%;
}

.btn-group .button:last-of-type {
	border-radius: 0 var(--standard-border-radius) var(--standard-border-radius) 0;
}

.btn-group.single-btn .button {
  border-radius: var(--standard-border-radius);
  margin-left: 0;
}

button.link-btn {
	padding: 0;
	background: none;
	color: var(--accent);
}

.button.red-button {
  background-color: var(--red);
  color: var(--bg);
}

button.link-btn .fa {
	padding-right: 0.4rem;
}

button.link-btn:enabled:hover {
  filter: brightness(1);
}

/* Separators */
.sep-vertical {
	height: 2.05rem;
	border-left: 1px solid var(--border);
	display: block;
	margin-left: 0.54rem;
	margin-right: 0.42rem;
}

.sep-horizontal {
	border-bottom: 1px solid var(--accent-bg);
	display: block;
}

.sep-horizontal-top {
  border-top: 1px solid var(--accent-bg);
  display: block;
}

.sep-bull {
	color: var(--border);
	margin-left: 0.15rem;
	margin-right: 0.15rem;
}

/* Miscs */
.link:hover {
	text-decoration: underline;
}

.link .fa {
	color: var(--border);
	text-decoration: none;
	margin-right: 0.4rem;
}

.medium {
	font-weight: 500;
}

.hide {
  display: none;
}

.line-clamp {
  overflow : hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.avatar,
.cover,
.book-cover,
.user-avatar {
	background: url("/assets/loading-5017dbd0.png") no-repeat center center;
}

/* Popover */
.popover {
	position: relative;
	display: inline;
}

.popover .fa {
  color: var(--border);
  font-size: 0.875rem;
  margin-left: 0.2rem;
}

.popover-wrapper {
	display: none;
  z-index: 1;
	position: absolute;
	left: 99%;
  top: calc(50% - 0.95rem);
	padding-left: 0.75rem;
}

.popover-wrapper.near-button {
  top: calc(50% - 1.2rem);
}

.popover-wrapper.bottom {
  top: 1.75rem;
  left: -5.02rem;
}

.popover-content {
	display: block;
	position: relative;
  z-index: 3;
	background: var(--bg);
	border-radius: var(--standard-border-radius);
	padding: 0.48rem 0.7rem;
	box-shadow: 0px 0px 18px 2px rgba(221, 227, 234, 0.7);
  width: auto;
	font-weight: 400;
	font-size: var(--small-text);
  line-height: 1.4;
	color: var(--light1);
	white-space: nowrap;
  text-align: left;
}

.popover-wrapper.bottom .popover-content {
  width: 9.6rem;
  white-space: wrap;
  text-align: center;
}

.dark .popover-content {
	box-shadow: 0px 0px 18px 2px rgba(221, 227, 234, 0.15);
}

.popover-content:before {
	display: block;
	position: absolute;
	z-index: 2;
  content: '';
  border-right: 0.45rem solid var(--bg);
  border-top: 0.45rem solid transparent;
  border-bottom: 0.45rem solid transparent;
	left: -0.42rem;
	top: 0.57rem;
}

.popover-wrapper.bottom .popover-content:before {
	display: block;
	position: absolute;
	z-index: 2;
  content: '';
  border-bottom: 0.45rem solid var(--bg);
  border-right: 0.45rem solid transparent;
  border-left: 0.45rem solid transparent;
	left: 4.54rem;
	top: -0.84rem;
}

.popover:hover > .popover-wrapper {
	display: block;
}

/* Hidden elements */
.hidden {
	display: none;
}

[hidden] {
  display: none !important;
}

.errors {
  display: block;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.notice {
  margin-top: 0;
  color: var(--accent);
  font-weight: 600;
}

.alert,
.errors li {
  margin-top: 0;
  color: var(--danger);
  font-weight: 600;
}

/* Text Color Classes */
.red {
	color: var(--red);
}

.brown {
	color: var(--brown);
}

.yellow {
	color: var(--yellow);
}

.blue {
	color: var(--blue);
}

.green {
	color: var(--green);
}

.turbo-progress-bar {
	background: var(--accent);
}

input[type="search"] {
  padding-right: 2rem;
}
