.CodeMirror {
	animation: fadeIn 0.5s cubic-bezier(0.3, 0, 0.3, 1) 0s 1 forwards;
	border-radius: 4px;
	height: auto;
	opacity: 0;
	position: absolute;
	top: 0;
	width: 100%;
	z-index: 0;
}

.CodeMirror,
.docs-content pre {
	font-family: $font-mono;
}

.docs-content pre {
	border: 0;
	font-size: 14px;
	line-height: 24px;
	margin: 0;
	opacity: 0;
	padding: 4px;
	position: relative;
}

.docs-content pre code {
	white-space: pre;
}

.docs-content .CodeMirror pre {
	font-size: 14px;
	line-height: 24px;
	margin: 0;
	padding: 0;
	opacity: 1;
}

.code-container {
	position: relative;
	margin: 20px 0;
}

.btn-copy {
	@include anim(background);
	background: rgba(white, .3);
	height: 36px;
	line-height: 36px;
	padding: 0;
	position: absolute;
	right: 5px;
	top: 5px;
	width: 36px;
	z-index: 1;

	&:hover,
	&:focus {
		background: rgba(white, .5);
	}
}

// Scrollbar

@mixin scrollbar() {
	::-webkit-scrollbar {
	  width: 12px;
	}

	::-webkit-scrollbar:horizontal {
	  height: 12px;
	}

	::-webkit-scrollbar-thumb {
	  transition: all 0.3s ease-in-out;
	  border-radius: 12px;
	}
}

@mixin scrollbar-dark() {
	@include scrollbar();

	::-webkit-scrollbar-track {
		background-color: #222426;
	}

	::-webkit-scrollbar-track:vertical {
		border-left: 1px solid #303236;
	}

	::-webkit-scrollbar-track:horizontal {
		border-top: 1px solid #303236;
	}

	::-webkit-scrollbar {
		background-color: #222426;
	}

	::-webkit-scrollbar-thumb {
	  background-color: #666;
	  border: 1px solid #222426;
	}

	::-webkit-scrollbar-thumb:hover {
		background-color: #888;
	}

	::-webkit-scrollbar-corner {
	  background-color: #222426;
	}
}

@mixin scrollbar-light() {
	@include scrollbar();

	::-webkit-scrollbar-track {
		background-color: white;
	}

	::-webkit-scrollbar-track:vertical {
		border-left: 1px solid #eee;
	}

	::-webkit-scrollbar-track:horizontal {
		border-top: 1px solid #eee;
	}

	::-webkit-scrollbar {
		background-color: white;
	}

	::-webkit-scrollbar-thumb {
	  background-color: #999;
	  border: 1px solid #ddd;
	}

	::-webkit-scrollbar-thumb:hover {
		background-color: #888;
	}

	::-webkit-scrollbar-corner {
	  background-color: #ddd;
	}
}

.CodeMirror.cm-s-dracula {
	@include scrollbar-dark();
}
