#so-custom-css-form {
	margin-right: 340px;
}

#so-custom-css-info{
	width: 315px;
	float: right;

	p:first-child {
		margin-top: 0;
	}

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

#so-custom-css-revisions {
	ol {
		list-style: none;
		margin: 0;

		li{
			margin: 0;
			line-height: 2.2em;
		}
	}
}

#custom-css-container {
	border:1px solid #D0D0D0;
	background: #f7f7f7;
	cursor: text;
	overflow: hidden;

	.CodeMirror {
		height: auto;
	}

	.CodeMirror-scroll {
		min-height: 300px;
	}

	.CodeMirror-lines {
		padding: 8px 0 8px 0;
	}

	textarea {
		border: 0;
		padding: 8px 0 8px 4px;
		width: 100%;
		min-height: 300px;
		display: block;
		font-family: monospace;
		font-size: 13px;
		line-height: 1em;
		border-left: 1px solid #ddd;
		margin-left: 16px;
	}
}

#custom-css-toolbar {
	border:1px solid #D0D0D0;
	border-bottom: none;
	background: #efefef;
	padding: 8px 10px;
	position: relative;
	box-sizing: border-box;


	a.toolbar-button {
		line-height: 1em;
		display: inline-block;
		border:1px solid #c0c0c0;
		background: #f6f6f6;
		text-decoration: none;
		padding: 8px 14px;
		font-weight: bold;
		color: #555;
		font-size: 0.95em;

		&:hover {
			border:1px solid #b0b0b0;
			background: #fff;
			box-shadow: 0 1px 2px rgba(0,0,0,0.1);
		}
	}

	#css-editor-expand {
		text-decoration: none;
		position: absolute;
		top: 7px;
		right: 10px;
		color: #666;
		padding: 5px;
		line-height: 1em;

		.dashicons {
			font-size: 20px;
		}

		.dashicons-no-alt {
			display: none;
		}
	}
}

#so-custom-css-form {
	#custom-css-preview {
		iframe {
			display: none;
		}
	}

	.decoration {
		display: none;
	}
}

#so-custom-css-form.expanded {

	@expanded_form_width: 320px;

	z-index: 100000;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: @expanded_form_width;

	#custom-css-toolbar {
		#css-editor-expand {

			.dashicons-editor-expand {
				display: none;
			}
			.dashicons-no-alt {
				display: inline-block;
			}
		}
	}

	.decoration {
		display: block;
		position: absolute;
		top: 0;
		bottom: 0;
		left: @expanded_form_width - 1px;
		width: 2px;
		background: rgba(0,0,0,0.1);
	}

	.description {
		display: none;
	}

	.submit {
		display: none;
	}

	#custom-css-preview {
		position: fixed;
		display: block;
		top: 0;
		right: 0;
		bottom: 0;
		left: 320px;
		background: #ffffff;

		iframe {
			display: block;
			width: 100%;
			height: 100%;
		}

	}
}

#snippet-browser {

	#snippet-browser-overlay {
		position: fixed;
		z-index: 100000;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0,0,0,0.8);
	}

	#snippet-browser-dialog {

		@dialog_side_space: 40px;

		> div {
			position: fixed;
			z-index: 100001;
			background: #fff;
			box-sizing: border-box;
		}

		.toolbar {
			top: @dialog_side_space;
			left: @dialog_side_space;
			right: @dialog_side_space;
			height: 50px;
			background: #FCFCFC;
			border-bottom: 1px solid #dddddd;
			overflow: hidden;

			h1 {
				padding: 0 16px;
				font-size: 22px;
				line-height: 50px;
				margin: 0;
				color: #444;
			}

			.close {
				cursor: pointer;
				color: #777;
				background-color: transparent;
				height: 50px;
				width: 50px;
				padding: 15px 0 0 0;
				position: absolute;
				text-align: center;
				border: 0;
				border-left: 1px solid #ddd;
				top: 0;
				right: 0;
				text-decoration: none;
				box-sizing: border-box;

				&:hover {
					background: #dddddd;
				}

				.icon {
					&:before {
						content: '\f158';
						font: normal 20px/1 'dashicons';
						vertical-align: middle;
						-webkit-font-smoothing: antialiased;
						-moz-osx-font-smoothing: grayscale;
						color: #666;
					}
				}
			}
		}

		.sidebar {
			top: @dialog_side_space + 50px;
			left: @dialog_side_space;
			bottom: @dialog_side_space + 50px;
			width: 300px;
			background: #f3f3f3;
			border-right: 1px solid #dddddd;
			padding: 16px;
			overflow: auto;

			#snippet-search {
				width: 100%;
				margin-bottom: 20px;
				padding: 8px;
			}

			.snippets {
				margin: 0;

				.snippet {
					cursor: pointer;
					margin-bottom: 0.5em;
					font-size: 1.1em;
					line-height: 1.35em;
					margin-bottom: 20px;

					&.active {
						font-weight: bold;
					}
				}
			}
		}

		.main {
			top: @dialog_side_space + 50px;
			left: @dialog_side_space + 300px;
			right: @dialog_side_space;
			bottom: @dialog_side_space + 50px;
			background: #fff;
			overflow: auto;

			.snippet-view {
				padding: 20px;

				.snippet-title {
					margin: 0 0 0.75em 0;
					padding: 0;
				}

				.snippet-description {
					font-size: 1.1em;
					color: #666;
					margin-bottom: 2em;
				}

				.snippet-code {
					padding: 20px;
					border: 1px solid #d0d0d0;
					background: #f8f8f8;
				}
			}
		}

		.buttons {
			bottom: @dialog_side_space;
			left: @dialog_side_space;
			right: @dialog_side_space;
			height: 50px;
			background: #FCFCFC;
			border-top: 1px solid #dddddd;
			text-align: right;
			padding: 10px 20px;
			overflow: hidden;
		}


	}
}


.CodeMirror-lint-tooltip {
	z-index: 100002;
}