#main-loading {
	text-align: center;
	padding-top: 20px;
}
#main-loading .mdl-spinner {
	width: 100px;
	height: 100px;
}
.page-content .half {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	flex-wrap: wrap;
}
.page-content .half .mdl-card {
	width: calc(50% - 10px);
	margin: 5px;
}
.page-content .half .mdl-card__title {
	height: 64px;
}
.page-content .half .mdl-card__supporting-text > * {
	vertical-align: middle;
}
.page-content .half .option {
	margin-bottom: 5px;
}
.help-button {
	font-size: 22px;
	vertical-align: middle;
	cursor: pointer;
}
.mdl-cell {
	display: inline-block;
}
.style-name-box,
.style-update-url-box {
	width: 100%;
}
/* Panels */
.left-section {
	width: calc(100% - 290px);
}
.left-section .code-area {
	margin-bottom: 10px;
}
.right-section {
	width: 280px;
	position: fixed;
	top: 75px;
	height: calc(100% - 85px);
}
.right-section .mdl-tabs__tab-bar {
	border-bottom: none;
}
.right-section .mdl-tabs__tab {
	width: 33.3%;
}
.right-section .mdl-card__supporting-text {
	padding: 0;
	overflow-x: hidden;
	overflow-y: auto;
}
.right-section .mdl-tabs__panel {
	padding: 16px;
}
.right-section .mdl-tabs__panel > *{
	margin-bottom: 10px;
}
#style-panel .mdl-button,
#editor-panel .mdl-button {
	width: 100%;
	display: block;
}
#style-panel #save-link .loading,
#editor-panel #gt_connect .loading {
	width: 20px;
	height: 20px;
	margin-left: 8px;
}
#style-panel #save-link.saving .loading,
#editor-panel #gt_connect.connecting .loading {
	display: inline-block;
}
#editor-panel .mdl-textfield {
	padding-bottom: 1px;
}
#editor-panel .mdl-textfield__label::after {
	bottom: 0;
}

/* code */
.code {
	height: 10rem;
	width: 40rem;
}
.CodeMirror {
	border: solid #CCC 1px;
	height: 450px;
}
.CodeMirror-lint-mark-warning {
	background: none;
}
.CodeMirror-vscrollbar {
	margin-bottom: 8px; /* make space for resize-grip */
}
.CodeMirror-dialog {
	animation: highlight 3s ease-out;
}
.CodeMirror-focused {
	outline: -webkit-focus-ring-color auto 5px;
	outline-offset: -2px;
}
.CodeMirror-search-field {
	width: 10em;
}
.CodeMirror-jump-field {
	width: 5em;
}
.CodeMirror-search-hint {
	color: #888;
}
.codemirror-colorview {
	vertical-align: middle;
}
@keyframes highlight {
	from {
		background-color: #ff9;
	}
	to {
		background-color: none;
	}
}
.resize-grip {
	position: absolute;
	display: block;
	width: 8px;
	height: 8px;
	content: " ";
	right: 0;
	bottom: 0;
	z-index: 99;
	cursor: n-resize;
	background: linear-gradient(-45deg, transparent 2px, rgba(0,0,0,0.5) 2px, transparent 3px, transparent 4.5px, rgba(0,0,0,0.5) 5px, transparent 5.5px);
}


/* Advanced */
#advanced-box.close .mdl-card__supporting-text,
#advanced-box.close .mdl-card__actions {
	display: none;
}
#advanced-box #toggle-advanced {
	transition: .2s;
}
#advanced-box.close #toggle-advanced {
	transform: rotate(180deg);
}
#advanced .remove-top {
	width: 100%;
}
#advanced .mdl-textfield {
	margin-top: 0;
	margin-bottom: 3px;
	padding-bottom: 3px;
	padding-top: 15px;
}
#advanced .mdl-textfield .mdl-textfield__label::after {
	bottom: 6px;
}
#advanced .color {
	padding-top: 20px;
}
#advanced .color input[type="color"] {
	border: none;
	background-color: transparent;
	padding: 0;
	cursor: pointer;
	height: 25px;
	width: 50px;
}
#advanced .color label > * {
	vertical-align: middle;
}
#advanced .CodeMirror {
	height: 150px;
}
#advanced textarea {
	width: 100%;
	min-height: 120px;
}
#advanced .options .mdl-grid {
	padding-top: 0;
}

/************ help popup ************/
#help-popup {
	top: 3rem;
	right: 3rem;
	max-width: 50vw;
	position: fixed;
	display: none;
	background-color: white;
	box-shadow: 3px 3px 30px rgba(0, 0, 0, 0.5);
	padding: 0.5rem;
	z-index: 99;
}
#help-popup.big {
	max-width: 100%;
	left: 3rem;
}
#help-popup.big .CodeMirror {
	min-height: 2rem;
	height: 70vh;
}
#help-popup .title {
	font-weight: bold;
	background-color: rgba(0,0,0,0.05);
	margin: -0.5rem -0.5rem 0.5rem;
	padding: 0.5rem;
}
#help-popup .contents {
	max-height: calc(100vh - 8rem);
	overflow-y: auto;
}
#help-popup .close-icon {
	cursor: pointer;
	width: 8px;
	height: 8px;
	border: 8px solid transparent;
	position: absolute;
	right: 4px;
	top: 4px;
	background: linear-gradient(-45deg, transparent 5px, black 5px, black 6px, transparent 6.5px) no-repeat, linear-gradient(45deg, transparent 5px, black 5px, black 6px, transparent 6.5px) no-repeat;
}

.keymap-list {
	font-size: 85%;
	line-height: 1.0;
	border-spacing: 0;
	word-break: break-all;
}
.keymap-list input {
	width: 100%;
}
.keymap-list tr:nth-child(odd) {
	background-color: rgba(0, 0, 0, 0.07);
}
.keymap-list td:first-child {
	white-space: nowrap;
	font-family: monospace;
	padding-right: 0.5rem;
}

#help-popup button[name^="import"] {
	line-height: 1.5rem;
	padding: 0 0.5rem;
	margin: 0.5rem 0 0 0.5rem;
	pointer-events: none;
	opacity: 0.5;
	float: right;
}
#help-popup.ready button[name^="import"] {
	pointer-events: all;
	opacity: 1.0;
}

/************ lint ************/
#issue-panel {
	color: #888;
	padding-left: 0;
	padding-right: 0;
}
#issue-panel .title {
	padding-left: 16px;
	padding-right: 16px;
	font-size: 16px;
}
#issue-panel .help-button {
	margin-left: 10px;
}
#issue-panel .code-list > div .mdl-list {
	margin-top: 0;
	margin-bottom: 0;
	padding-top: 0;
	padding-bottom: 0;
	font-size: 14px;
	display: none;
}
#issue-panel .code-list > div.show .mdl-list {
	display: block;
}
#issue-panel .code-list > div .label-title {
	font-size: 15px;
	margin-bottom: 0;
	padding: 8px 16px;
	cursor: pointer;
}
#issue-panel .code-list > div .label-title .material-icons {
	transition: .2s;
	transform: rotate(180deg);
	float: right;
	user-select: none;
	-moz-user-select: none;
	-webkit-user-select: none;
}
#issue-panel .code-list > div.show .label-title .material-icons {
	transform: rotate(0);
}
#issue-panel li {
	padding: 8px 16px;
	height: 56px;
	cursor: pointer;
}
#issue-panel li:hover {
	background-color: rgba(50, 50, 50, 0.1);
}
#issue-panel .mdl-list__item-primary-content {
	width: 100%;
}
#issue-panel .mdl-list__item-sub-title {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	width: 100%;
}
#issue-panel .severity {
	padding-right: 5px;
}

/************ CSS beautifier ************/
.beautify-options {
	white-space: nowrap;
	font-family: monospace;
}
.beautify-options div.left-padding {
	padding-left: 2rem;
}
.beautify-options:after {
	clear: both;
	display: block;
	content: " ";
	height: 1rem;
}
.beautify-options span {
	font-weight: bold;
}
.beautify-options select {
	border: none;
	background-color: rgba(0, 0, 0, 0.05);
}

@media screen and (max-width: 1024px) {
	.left-section {
		width: 100%;
	}
	.right-section {
		margin-top: 10px;
		width: 100%;
		position: static;
		height: auto;
	}
}