/* Workarounds (may be dropped in future releases) */

@media (min-width: 1200px) {
	.btn-group-justified .visible-lg {
		display: table-cell !important;
	}
}

/* Generic classes */

body {
	min-width: 465px;
}

dl {
	margin-bottom: 0px;
}

dd {
	padding-bottom: 6px;
}
dd:last-child {
	padding-bottom: 0px;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	-moz-appearance: none;
	margin: 0;
}
input[type="number"] {
	-moz-appearance: textfield;
}

label {
	font-weight: inherit;
}

@media (min-width: 768px) {
	#mobile-navbar {
		display: none !important;
	}
}

.no-horizontal-padding {
	padding-left: 0px !important;
	padding-right: 0px !important;
}

.panel-chart {
	padding-top: 0px;
	padding-bottom: 15px;
	padding-left: 15px;
	padding-right: 5px;
}

.panel-heading {
	padding-top: 3px;
	padding-bottom: 3px;
}
.panel-heading span {
	font-size: 14px;
}

.padding-small {
	padding-left: 8px !important;
	padding-right: 8px !important;
}

.slider .slider-handle {
	background-image: linear-gradient(to bottom, #337ab7 0, #2e6da4 100%);
}

.slider .tooltip-arrow {
	border-top-color: #d9edf7 !important;
}

.slider .tooltip-inner {
	background-color: #d9edf7;
	color: #31708f;
}

.slider.slider-horizontal {
	margin-left:12px;
	margin-right: 12px;
	margin-top: 32px;
	margin-bottom: 6px;
	width: calc(100% - 20px) !important;
}

.table-description {
	width: 100%;
}

.table-description td {
	width: 100%;
}
.table-description tr:not(:last-child) > td {
	padding-bottom: 9px;
}

.table-description tr > td:first-child {
	padding-right: 12px;
	text-align: right;
	width: auto;
	white-space: nowrap;
}

.table-description tr:first-child td {
	padding-top: 0px;
}

.tooltip {
	z-index: inherit !important;
}

/* Navigation bar */

.btn-mobile-send {
	display: table-cell;
	margin-left: 10%;
	width: 90%;
}

.brand-sm {
	display: inline-block !important;
}
.brand-lg {
	display: none !important;
}
@media (min-width: 1200px) {
	.brand-sm {
		display: none !important;
	}
	.brand-lg {
		display: inline-block !important;
	}
}

#extruder_drives {
	color: #333;
}

.gcode {
	display: inline;
	padding-left: 12px !important;
	padding-right: 8px !important;
	vertical-align: middle;
	white-space: nowrap;
}

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

.gcode span.label {
	display: inline-block;
	margin-left: 15px;
}

/* There appears to be no easy way to right-align list item labels, so I use JS for now
*  If anyone has a better solution for this, please implement it.
*/
.gcode-float span.label {
	position: absolute;
	right: 9px;
	margin-top: 3px;
}

.navbar-form.gcode-input > .input-group {
	width: 200px;
}

.navbar-brand {
	float: none;
	font-size: 20px;
	margin-left: 0px !important;
	padding-left: 3px !important;
	padding-right: 3px !important;
	padding-top: 15px !important;
}
@media (max-width: 767px) {
	.navbar-brand {
		margin-left: 15px !important;
	}
}
.navbar-brand > abbr {
	border: 0px;
	margin-left: 9px;
}
.navbar-brand > abbr > span {
	color: #F0AD4E;
}

.navbar-default {
	margin-bottom: 0px;
}

@media (max-width: 767px) {
	.navbar-checkbox {
		float: right;
		margin-right: 15px;
		margin-top: 8px;
		margin-bottom: 8px;
	}
}

@media (min-width: 768px) {
	.navbar-checkbox {
		margin-left: 15px;
		margin-top: 8px;
		margin-bottom: 8px;
	}
	
	.navbar-collapse {
		padding-left: 0px;
	}
}

@media (max-width: 767px) {
	#txt_instant_gcode_mobile {
		width: 100%;
	}
}

.navbar-label {
	margin-left: 0px !important;
	margin-right: 15px !important;
	margin-top: 17px;
	margin-bottom: 13px;
}

.navbar-table td {
	padding-left: 0px !important;
	padding-right: 0px !important;
}

.navbar-table {
	margin-bottom: 0px;
}

@media (max-width: 767px) {
	.span-refresh-files,
	.span-refresh-macros {
		padding-left: 6px;
	}
}

.ul-bed-temp a,
.ul-active-temp a,
.ul-standby-temp a {
	text-align: right;
}

.ul-bed-temp,
.ul-active-temp,
.ul-standby-temp {
	min-width: initial;
}

/* Heater and Status elements */

#chart_temp {
	min-height: 50px;
	min-width: 50px;
	height: 200px;
}

.extr-1, .extr-2, .extr-3, .extr-4, .extr-5, .extr-6 {
	white-space: nowrap;
}

#div_temp_chart {
	padding-left: 0px;
	padding-right: 0px;
}

.input-td {
	padding-top: 6px !important;
	padding-bottom: 6px !important;
}

.panel-status {
	margin-bottom: 12px;
}

.probe-slow-down {
	color:	#FFFFE0;
}

.probe-trigger {
	color: #FFF0F0;
}

#row_info {
	background-color: #FFFFFF;
	padding-top: 12px;
}

.span-collapse {
	cursor: pointer;
}

.table-centered-cells th, .table-centered-cells td {
	text-align: center;
	vertical-align: middle !important;
}

#table_heaters input[type="number"] {
	min: 0;
	max: 300;
}
#input_temp_bed {
	max: 160;
}

#table_heaters tr:first-child > th {
	width: 25%;
}
#table_heaters tr > th:first-child {
	padding-top: 2px;
	padding-bottom: 3px;
}
#table_heaters tr > th > * {
	display: block;
}
#table_heaters tr > th > span:last-child {
	font-size: 11px;
}

.table-status {
	margin: 0px !important;
	table-layout: fixed;
}
div.panel table.table-status:not(:last-child)
{
	border-bottom:  1px solid #ddd;
}

.th-status {
	width: 100px;
}

#tr_head_1 th > a {
	color: #FF0000;
}
#tr_head_2 th > a {
	color: #00DD00;
}
#tr_head_3 th > a {
	color: #FFA000;
}
#tr_head_4 th > a {
	color: #FF00FF;
}
#tr_head_5 th > a {
	color: #337AB7;
}
#tr_head_6 th > a {
	color: #00FFFF;
}
#tr_bed th > a {
	color: #0000FF;
}
#tr_chamber th {
	color: #000000;
}

/* Sidebar navigation */

.sidebar {
	padding-left: 20px;
	padding-right: 20px;
	padding-top: 0px;
	background-color: #f5f5f5;
	border-right: 1px solid #bfbfbf;
	border-top: 1px solid #bfbfbf;
}
@media (max-width: 767px) {
	.sidebar,
	.sidebar-continuaton {
		display: none;
	}
}

.sidebar-continuation {
	border-top: 0px;
	height: 100vh;
	position: fixed;
	top: 0px;
	bottom: 0px;
	z-index: -9999;
}

.nav-sidebar {
	margin-right: -21px; /* 20px padding + 1px border */
	margin-bottom: 20px;
	margin-left: -20px;
}

.nav-sidebar > li > a {
	font-size: 16px;
	padding-right: 20px;
	padding-left: 20px;
	white-space: nowrap;
}

@media (max-width: 1199px) {
	.nav-sidebar {
		margin-bottom: 10px;
	}
	.nav-sidebar > li > a {
		font-size: 15px;
	}
	
	#sidebar {
		padding-left: 10px;
		padding-right: 10px;
	}
}

.nav-sidebar:last-child {
	margin-bottom: 0px;
}

.nav-sidebar .glyphicon {
	padding-right: 3px;
}

.nav-sidebar > .active > a,
.nav-sidebar > .active > a:hover,
.nav-sidebar > .active > a:focus {
	color: #fff;
	background-color: #428bca;
}

.nav-sidebar .span-refresh-files,
.nav-sidebar .span-refresh-macros {
	position: absolute;
	right: 15px;
	top: 14px;
}

/* Main Content */

@media (min-width: 768px) {
	#main_content row > div[class^='col-'] {
		padding-left: 8px !important;
		padding-right: 8px !important;
	}
}
@media (max-width: 991px) {
	.content-collapsed-padding {
		padding-top: 15px;
	}
}

#main_content .panel-body {
	padding: 9px !important;
}

#main_content .panel-heading {
	padding-left: 9px !important;
	padding-right: 9px !important;
	text-align: center;
}

.page {
	display: none;
}

.page.active {
	display: block !important;
}

#panel_macro_buttons h4 {
	margin-top: 15px;
	margin-bottom: 0px;
}

/* Control Page */

#btn_homeall {
	min-width: 82px;
}

.btn-group-vertical-justified {
	display: inline-block;
	width: 100%;
}

#page_control .col-right:last-child {
	padding-left: 0px;
}
@media (min-width: 992px) {
	#page_control .col-right {
		padding-left: 0px;
	}
}

.home-warning {
	margin-top: -14px;
	padding-top: 6px;
	padding-bottom: 6px;
}

#panel_control_misc {
	padding-bottom: 4px;
}
#panel_control_misc .btn-group label {
	padding-left: 0px;
	padding-right: 0px;
}

#panel_extrude button {
	padding-left: 6px !important;
	padding-right: 6px !important;
}

#panel_extrude .btn-group label.btn {
	padding-left: 0px !important;
	padding-right: 0px !important;
}

@media (min-width: 1200px) {
	#panel_head_movement .panel-heading,
	#panel_macro_buttons .panel-heading
	{
		padding-top: 6px;
		padding-bottom: 6px;
	}
}

#mobile_home_buttons {
	padding-bottom: 9px;
}

#panel_macro_buttons button {
	font-size: 14px;
}

#panel_macro_buttons li {
	text-align: center;
}

#table_move_head .btn-group {
	padding-bottom: 9px;
}

#table_move_head a {
	padding-left: 6px;
	padding-right: 6px;
}
#table_move_head a[class*='btn-home-'] {
	padding-left: 12px;
	padding-right: 12px;
}

#table_move_head td {
	padding-right: 12px;
	width: 50%;
}

#table_move_head tr > td:first-child {
	width: auto;
}

#table_move_head tr > td:last-child {
	padding-right: 0px;
}

#table_move_head tr:last-child div
{
	padding-bottom: 0px;
}

/* Print Status */

#img_webcam {
	width: 100%;
}

#page_print .btn-group {
	padding-bottom: 6px;
}

#page_print .checkbox {
	margin-top: 0px;
	margin-bottom: 6px;
	padding-left: 12px;
}

#page_print .col-left {
	padding-right: 0px;
}
@media (min-width: 992px) {
	#page_print .col-right {
		padding-left: 0px;
	}
}

#page_print .progress {
	margin-bottom: 9px;
}

#progress {
	width: 100%;
	font-weight: bold;
}

.layer-done-animation {
	background-color: #D9EDF7 !important;
	-webkit-transition: background-color 500ms linear;
	-moz-transition: background-color 500ms linear;
	-o-transition: background-color 500ms linear;
	-ms-transition: background-color 500ms linear;
	transition: background-color 500ms linear;
}

#layer_tooltip {
	position: absolute;
	display: none;
	border: 1px solid #fdd;
	padding: 2px;
	background-color: #fee;
	opacity: 0.80;
}

#panel_print_control .btn {
	padding-left: 0px;
	padding-right: 0px;
}

#panel_print_control div.btn-group:last-child {
	padding-left: 6px;
}

#panel_print_info .row > div:not(:first-child) {
	padding-left: 6px;
}

#panel_print_info table {
	table-layout: fixed;
}
#panel_print_info table th,
#panel_print_info table td {
	text-align: center;
}

#chart_print {
	min-height: 50px;
	min-width: 50px;
	height: 190px;
}

.chart-print-line {
	color: #EDC240;
}

@media (min-width: 970px) {
	#span_progress_right {
		float: right;
	}
}

#table_estimations {
	table-layout: fixed;
}

/* G-Code Console */

#console_log {
	padding-top: 0px;
	background-color: #eee;
	border: 1px solid #bbb;
	margin-bottom: 15px;
}

#console_log div.row {
	padding-top: 3px !important;
	padding-bottom: 3px;
}

@media (max-width: 767px) {
	div.well {
		padding-left: 15px;
		padding-right: 15px;
	}
}

#page_console form > div {
	padding-left: 0px;
	padding-right: 9px;
}

#page_console form > div:first-child {
	padding-left: 15px;
}

#page_console form > div:last-child {
	padding-left: 0px;
	padding-right: 15px;
}

#page_console button[type='submit'] {
	padding-left: 6px;
	padding-right: 6px;
}

#page_console div.row:last-child {
	padding-top: 9px;
}

/* G-Code Files */

#btn_new_gcode_directory span {
	padding-right: 6px;
}

.breadcrumb-directory {
	margin-bottom: 0px !important;
}

.breadcrumb-directory > li:first-child span.glyphicon {
	padding-right: 3px;
}

#page_files h1 {
	margin-bottom: 20px;
}

#page_files ol {
	margin-bottom: 9px;
}

#page_files ol .pull-right:before {
	content: "";
}

.table-file-navigation {
	width: 100%;
	margin-bottom: 9px;
}

.table-file-navigation td:first-child {
	width: 100%;
}

.table-file-navigation td:not(:first-child) {
	padding-left: 6px;
}

.table-files {
	margin-bottom: 15px;
}

.table-files button > span {
	padding-top: 6px;
	padding-bottom: 6px;
}

.table-files td > span,
.table-files a > span {
	padding-right: 6px;
}

.table-files tbody > tr {
	height: 49px;
}

.table-files tr > td {
	padding-top: 4px !important;
	padding-bottom: 4px !important;
	vertical-align: middle !important;
}
.table-files tr > td:first-child {
	border-right: 0px;
	padding-right: 4px;
	width: 1%;
}
.table-files tr > td:nth-child(2) {
	border-left: 0px;
	padding-left: 4px;
	width: 1%;
}

.table-files tr button:last-child {
	float: right;
}
	
.table-files th:first-child {
	width: 97px;
}

@media (max-width: 991px) {
	.table-files th:first-child {
		width: 100px;
	}
}

/* Macros Page */

#btn_new_macro_directory span {
	padding-right: 6px;
}

#page_macros ol .pull-right:before {
	content: "";
}

/* Settings Page */

#page_tools button,
#btn_add_gcode,
#btn_fw_diagnostics {
	margin-top: 9px;
}

#btn_fw_diagnostics {
	padding-left: 4px;
	padding-right: 4px;
	width: 100%;
}

#btn_language {
	margin-left: 9px;
}

#check_heaters > label:first-child {
	padding: 6px;
}

#div_config > h1 {
	margin-top: 10px;
	margin-bottom: 20px;
}

#dropdown_language {
	margin-top: 9px;
	display: inline-block;
}

label[for="dropdown_language"] {
	margin-right: 6px;
}

#frm_settings li.open li > a {
	height: 40px;
	padding-top: 10px;
}

#label_feedrate {
	margin-top: 0px !important;
}

#panel_head_temps > div > label:first-child {
	display: block;
}
#panel_head_temps > div > div.radio {
	display: inline-block;
	margin: 0px;
	margin-bottom: 9px;
	width: 49%;
}

#software_info {
	margin-bottom: 7px;
}
#software_info tr * {
	padding-bottom: 8px;
}

#software_info tr > td {
	padding-left: 15px;
}

#page_settings {
	padding-bottom: 15px;
}

@media (min-width: 992px) {
	#page_settings .col-left {
		padding-right: 0px;
	}

	#page_settings .col-right {
		padding-left: 0px;
	}
}

#page_settings div.panel-body > div.checkbox:first-child {
	margin-top: 0px;
}

#page_settings div.panel-body > div.checkbox:last-child {
	margin-bottom: 0px;
}

#page_settings div.panel-body > label {
	margin-bottom: 3px;
}
#page_settings div.panel-body > label:not(:first-child) {
	margin-top: 6px;
}

.tab-content {
	border: 1px solid #ddd;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-right-width: 1px;
	border-top-width: 0px;
	padding: 15px;
	padding-bottom: 0px;
	margin-bottom: 15px;
}

.table-add-temp td:first-child {
	padding-right: 9px;
	width: 100%;
}

.table-add-temp .input-group {
	width: 100%;
}

.table-add-temp td:last-child {
	width: auto;
	vertical-align: bottom;
}

#table_add_gcode {
	width: 100%;
}
#table_gcodes {
	margin-bottom: 0px;
}

#table_gcodes .label {
	font-size: 95%;
}

#table_add_gcode td:first-child,
#table_gcodes > thead > tr > th:first-child {
	width: 35%;
}
#table_add_gcode td:first-child {
	padding-right: 9px;
}
#table_add_gcode td:nth-child(2),
#table_gcodes > thead > tr > th:nth-child(2) {
	width: 65%;
}
#table_gcodes > thead > tr > th:nth-child(3) {
	width: auto;
}
#table_gcodes > tbody > tr > td {
	vertical-align: middle;
}
#table_gcodes > tbody > tr > td:last-child {
	padding: 6px;
}

#table_define_tool > tbody > tr:first-child > td:first-child {
	padding-right: 9px;
}

##table_define_tool > tbody > tr:first-child > td {
	padding-top: 0px;
}
#table_define_tool > tbody > tr:nth-child(2) > td {
	padding-top: 9px;
}

.temp-list > li {
	line-height: 30px;
	vertical-align: middle;
	padding: 6px;
}

#text_config {
	background-color: inherit;
	border: 0px;
	margin-bottom: 15px;
	min-height: 200px;
	resize: none;
	width: 100%;
}

#ul_control_dropdown {
	padding: 5px;
}

#ul_control_dropdown > li > a {
	padding-left: 6px;
	padding-right: 6px;
}

#ul_control_dropdown > li:not(:first-child) {
	padding-top: 5px;
}

/* Modals */

#modal_textinput div.input-group {
	width: 100%;
}

#table_upload_files {
	width: 100%;
}
#table_upload_files .progress {
	margin-top: 8px;
	margin-bottom: 8px;
}
#table_upload_files td {
	vertical-align: middle;
}

/* Popovers */

.popover-content {
	padding: 6px;
}
