.documentation {
	position: static;
	margin: 0;
	padding: 1rem;

	.is-dark-mode & {
		color: var(--color-text-light);
	}

	.with-navigation & {
		width: 75%;
	}

	h1,
	h2,
	h3 {
		margin-top: 1.25rem;
		margin-bottom: 0.625rem;
	}

	h1 {
		font-size: 2.25rem;
		line-height: 1.1;
		margin: .67em 0;

		&.title {
			border-left: 2px solid var(--color-primary);
			padding-left: 1rem;
			margin-bottom: 4rem;
			font-weight: 700;

			&:after {
				content: "";
				width: 100%;
				height: 0px;
				display: block;
				border-bottom: 1px dashed rgba(var(--color-border-rgb), 0.5);
				transform: translateY(2rem);
			}
		}

		&[id] {
			&:before {
				content: "#";
				margin-left: -1rem;
				margin-top: 0.25rem;
				position: absolute;
				font-size: 1rem;
				color: var(--color-primary);
				opacity: 0.75;
			}
		}
	}

	h2 {
		font-size: 1.875rem;
		font-weight: 700;
		opacity: 0.9;

		&[id] {
			&:before {
				content: "#";
				margin-left: -1rem;
				margin-top: 0.25rem;
				position: absolute;
				font-size: 0.8rem;
				color: var(--color-primary);
				opacity: 0.75;
			}
		}
	}

	h3 {
		font-size: 1.5rem;
		opacity: 0.8;
	}

	hr {
		border-top: 1px dashed rgba(var(--color-border-rgb), 0.2);
		margin-top: 2rem;
		margin-bottom: 2rem;
	}

	img {
		border-radius: 0.5rem;
		max-width: 100%;
	}

	abbr {
		border-bottom: 0;
		cursor: help;
		text-decoration: underline;
		-webkit-text-decoration: underline dotted;
		text-decoration: underline dotted;
		-webkit-text-decoration-skip-ink: none;
		text-decoration-skip-ink: none
	}

	.documentation-nav {
		position: fixed;
		padding: 1rem;
		list-style: none;
		padding: 0;
		width: 20%;
		top: 1rem;
		right: 1rem;

		li {
			border-bottom: 1px dashed rgba(var(--color-border-rgb), 0.35);
			line-height: 1.5;
			padding: 0.75rem;

			a {
				font-size: 0.875rem;
				color: rgba(var(--color-text-rgb), 0.65);

				.is-dark-mode & {
					color: rgba(var(--color-text-light-rgb), 0.75);
				}
			}
		}

		ul {
			list-style: none;
			padding: 0;
			padding-left: 1rem;
		}
	}

	&:not(pre),
	*:not(pre) {
		>code {
			background-color: var(--color-pink-lucid);
			padding: 0.2rem 0.35rem;
			border-radius: 0.25rem;
			color: var(--color-pink-shade);
			line-height: 1.5;
			line-height: 1.6;
			font-size: 0.9em;
			margin: 0 0.2rem;

			.is-dark-mode & {
				background-color: rgba(255, 255, 255, 0.2);
				color: var(--color-text-light);
			}
		}
	}

	pre {
		position: relative;
		display: block;

		&:hover >button {
			transform: translateX(0);
			opacity: 1;
		}

		>button {
			position: absolute;
			top: 0.5rem;
			right: 0.5rem;

			width: 1.75rem;
			height: 1.75rem;

			display: flex;
			align-items: center;
			justify-content: center;
			margin: 0;
			font-size: 1rem;
			line-height: 1em;
			border-radius: 6px;
			outline: none !important;
			cursor: pointer;
			background-color: transparent;
			transition: 0.3s;
			color: var(--color-border);
			border: 1px solid rgba(var(--color-text-light-rgb), 0.2);
			transform: translateX(2.2rem);
			opacity: 0;

			&:active, &.active {
				border: 1px solid rgba(var(--color-success-rgb), 0.2);
				color: var(--color-success);
				background-color: rgba(var(--color-success-rgb), 0.2);
			}
		}

		>code {
			background-color: #344258 !important;
			border-radius: 0.5rem;
			border: none;
			display: block;
			overflow-x: auto;
			padding: 1em;
			color: var(--color-text-light);
		}
	}

	ol {
		>li {
			padding-top: 0.5rem;
			padding-bottom: 0.5rem;
		}
	}

	ul {
		>li {
			padding-top: 0.5rem;
			padding-bottom: 0.5rem;
		}

		li {
			input[type="checkbox"] {
				-webkit-appearance: none;
				appearance: none;
				margin: 0;
				font: inherit;
				color: currentColor;
				position: relative;
				display: inline-block;
				width: 15px;
				height: 15px;
				margin-top: -3px;
				margin-right: 4px;
				vertical-align: middle;
				border-style: solid;
				border-width: 1px;
				border-radius: 2px;
				border-color: var(--color-border);

				&:checked {
					background-color: var(--color-success);
					border-color: var(--color-success-shade);

					&:after {
						position: absolute;
						top: 1px;
						left: 4px;
						display: table;
						width: 5px;
						height: 9px;
						border: 2px solid #fff;
						border-top: 0;
						border-left: 0;
						-webkit-transform: rotate(45deg);
						transform: rotate(45deg);
						content: "";
					}
				}

			}
		}
	}

	p {
		font-size: 1rem;
		line-height: 2;
	}

	blockquote {
		border-left: 2px solid var(--color-border);
		padding: 1rem;
		font-style: italic;

		p:last-child {
			margin: 0;
		}
	}

	table {
		background-color: var(--color-white);
		border: none;
		border-collapse: collapse;
		border-color: transparent !important;
		border-radius: 0.5rem;
		border-width: 0 !important;
		margin: 1rem auto;
		max-width: 100%;
		overflow: hidden;
		padding: 0;
		position: relative;
		width: 100%;
		box-shadow: 0 3px 12px rgba(var(--color-border-rgb), 0.35), inset 0 0 0 1px rgba(var(--color-border-rgb), 0.35);

		&:hover {
			box-shadow: 0 3px 12px rgba(var(--color-border-rgb), 0.35),
				inset 0 0 0 1px rgba(var(--color-border-rgb), 0.35);
		}

		.is-dark-mode & {
			background-color: var(--color-black);
			box-shadow: 0 3px 12px rgba(var(--color-black-rgb), .35), inset 0 0 0 1px var(--color-dark-tint);
		}

		thead {
			th {
				border: 0 solid transparent;
				color: var(--color-text);
				font-size: 0.75rem;
				font-weight: 700;
				line-height: 1em;
				padding: 1.25rem;
				text-transform: uppercase;

				.is-dark-mode & {
					color: var(--color-text-light);
				}
			}

			tr {
				border-width: 0;

				th {
					&:hover {
						background: none !important;
						box-shadow: none;
					}
				}

				&:hover {
					background: none !important;
					box-shadow: none;
				}
			}
		}

		tbody {
			tr {
				border: none;
				transition: background-color 0.4s, border 0.4s, box-shadow 0.3s;

				td {
					border: none;
					border-top: 1px dashed rgba(var(--color-border-rgb), 0.1);
					box-sizing: content-box;
					color: var(--color-text-rgb);
					padding: 0.875rem 1.25rem;
					vertical-align: middle;

					tt {
						font-family: inherit;
					}

					&:hover {
						background-color: transparent;
						box-shadow: none;
						cursor: pointer;
					}
				}

				&:hover {
					background-color: hsla(0, 0%, 75%, 0.1);
				}
			}
		}
	}

	.alert-block code {
		background-color: rgba(255, 255, 255, 0.5);
		color: inherit !important;
	}

	.mermaid {
		background-color: var(--color-white) !important;
		padding: 2rem 1rem;
		border-radius: 0.5rem;

		border: none;
		border-collapse: collapse;
		overflow: hidden;
		text-align: left;
		color: var(--color-border);
	}

	.youtube-embed {
		display: block;
		width: 560px;
		height: 315px;
		background-color: var(--color-white) !important;
		border-radius: 0.5rem;
	}

	.tabs {
		display: block;
		width: 100%;
		padding: 0.5rem;
		margin-bottom: 1rem;

		&.tabs-code {
			background-color: #344258 !important;
			border-radius: 0.5rem;
			border: none;
			display: block;
			color: var(--color-text-light);

			>ul {
				border-bottom: 2px solid rgba(var(--color-text-light-rgb), 0.2) !important;

				>li {
					color: rgba(var(--color-text-light-rgb), 0.45);

					i {
						font-size: 2rem;
					}

					&:hover {
						background-color: transparent;
						color: var(--color-text-light);
						border-bottom: 2px solid rgba(var(--color-text-light-rgb), 0.2);
					}

					&.active {
						color: var(--color-text-light);
						border-bottom: 2px solid var(--color-primary) !important;
					}
				}
			}

			>.tab>p {
				font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
				font-size: 0.75rem;
				padding: 0px;
				margin: 0px;
				margin-bottom: 0.35rem;
				color: var(--color-muted) !important;
			}
		}

		>ul {
			display: block;
			list-style: none;
			padding: 0;
			margin: 0;
			width: 100%;
			border-bottom: 2px solid var(--color-default-lucid);

			>li {
				display: inline-block;
				padding: 4px 10px;
				cursor: pointer;
				border-bottom: 2px solid transparent;
				margin-bottom: -2px;
				transition: 0.4s;

				&:hover {
					background: rgba(var(--color-border-rgb), 0.1);
					border-bottom: 2px solid var(--color-default-lucid);
				}

				&.active {
					border-bottom: 2px solid var(--color-primary) !important;
				}
			}
		}

		>.tab {
			display: none;
			width: 100%;
			padding: 1rem 0.5rem 0.5rem;
			opacity: 0;
			transition: 0.4s;

			&.active {
				display: block;
				opacity: 1;
				animation: fadeTab 0.4s;
			}

			>pre {
				margin: 0;

				>code {
					background-color: transparent !important;
					padding: 0;
					border-radius: 0;
				}
			}
		}
	}
}

@media (max-width: 780px) {
	.documentation {
		padding: 0 40px !important;
		width: 100%;

		.documentation-nav {
			list-style: none;
			padding: 0;
			width: 100%;
			position: inherit;
			top: 10px;
			right: 30px;
		}
	}
}

@keyframes fadeTab {
	from {
		display: block;
		opacity: 0;
		transform: translateX(30px)
	}

	to {
		opacity: 1;
		transform: translateX(0px)
	}
}
