/* Page Layout
-------------------------------------------------- */
* {
    margin: 0;
	padding: 0;
	outline: none;
    outline-width: 0;
}

html,
body {
    height: 100%;
    font-size: 16px;
}

body { font-family: Lato, arial, sans-serif; font-size: 62.5%; }
aside { float:left; width: 180px; margin-top: 8px; padding: 8px; background: #EEE; }
button { 
	opacity: 1;
	transition: opacity .25s ease-in-out;
	-moz-transition: opacity .25s ease-in-out;
	-webkit-transition: opacity .25s ease-in-out;
	font-size: 14px;
}
button:hover { opacity: .8}
button:disabled { opacity: .2; }
#buttonspan { border: 0 !important; }
#buttonspan[data-row-span] [data-field-span]:hover { background: transparent; }
#buttonspan > div { display: block; }
.imgspan { height: auto !important; padding: 10px 0 10px 10px; }
img { max-width: 100%; margin-right: -8px; }
button { background: #1B75BC; color: #FFF; border: 0; padding: 10px; margin: 2px; min-width: 100px; cursor:pointer; }
#reset { background: #CCC; }
#print { background: #000; float: right; }
#results { border-top: 1px solid #333; }

/* Structural Elements */
#data { width: 24%; }
#results #table {
	position: absolute;
	width: 75%;
	top: 145px;
	right: 0;
}
span.results-msg {
    line-height: 17px;
    display: block;
    float: left;
    font-size: 12px;
    text-align: right;
    margin: 7px 15px;
    font-style: italic;
}
.table-wrapper {
	overflow-x: scroll;
	overflow-y: visible;
	margin-left: 270px;
	border: 1px solid #f1f1f1;
}
#results #table table {
	margin-bottom: 0;
}
table tbody tr:nth-child(even){
	background-color: #FFF;
}
#conditions {
	margin: 76px 0 140px;
}
@-moz-document url-prefix() { 
  #conditions {
		margin-top: 75px;
	}
}
table tbody {
	border-top: none;
}
table tbody, table tfoot {
	border-left: none;
	border-right: none;
}
table tbody th, table tbody td {
	padding: 0 10px;
	line-height: 1;
	height: 50px;
}
tr.section {
	height: 50px;
}
th[rel='section']{
	border: none;
	border-bottom: 4px solid #404040;
	color: #404040;
	font-size: 18px;
	font-weight: bold;
}
#table button {
	width: 115px;
}
button.red {
	background-color: red;
}
#table tr[rel='cost']{
	visibility: hidden;
}
#table tr > *.active {
	background-color: #1b75bc26;
}
#table tr > th:first-child {
	width: 100%;
	position: absolute;
	left: 0;
	padding: 10px 0;
	line-height: 2rem;
	pointer-events: none;
}
.drawing table tr > *:first-child {
	width: 100px;
}

.results-btn { display: none; float:right; }
.results-detail {padding: 10px 0 20px 0; overflow:hidden; }
.results-drawing { width: 100%; float: left; padding: 10px 0 0 0; }
fieldset.drawing { padding: 8px !important; }
.result { 
	position: relative; 
	display: none; 
	overflow: hidden;
	margin: 20px auto 0;
	max-width: 650px;
}
@media screen and (min-width: 800px) {
	form { position: relative; }
	/* #customer, #conditions, #buttonspan { padding-right: 50%; } */
	.results-specs { position: absolute; width: 52%; left: 0; }
	.results-detail { padding-left: 52% }
	.results-drawing { padding: 0 0 0 10px; }
}
legend { margin-bottom: 0; padding: 0 0 0 8px; }
a.logout {
	float: right;
	text-transform: uppercase;
	display:block;
	font-size: 12px;
	margin: 4px 10px;
	text-decoration: none;
	color: white;
}
#footer div.row {
	margin: 0 auto;
}
/* Log-in Form
-------------------------------------------------- */
body.login {
	background: #eee;	
}
.wrapper {	
	margin-top: 80px;
  	margin-bottom: 80px;
}
.form-signin, .form-signup {
  max-width: 380px;
  padding: 15px 35px 45px;
  margin: 0 auto;
  background-color: #fff;
  border: 1px solid rgba(0,0,0,0.1);  
}
.form-signin-heading, .form-signin .checkbox,
.form-signup-heading {
  margin-bottom: 30px;
}
.form-signin .checkbox {
	font-weight: normal;
	font-size: .8rem;
}
.form-signin .checkbox input[type="checkbox"] {
	position: relative;
	margin: 4px 4px 0 0;
}
.form-signin .form-control {
  	position: relative;
  	font-size: 16px;
  	height: auto;
  	padding: 10px;
	box-sizing: border-box;
}
.form-signin .form-control:focus {
	  z-index: 2;
}
.form-signin input[type="text"] {
	margin-bottom: -1px;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}
.form-signin input[type="password"] {
  margin-bottom: 20px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
small.goto {
	margin-top: 10px;
	font-size: 12px;
	width: 100%;
	display: block;
	cursor: pointer;
}
small.smallprint p {
	font-size: inherit;
	line-height: inherit;
}
.form-signup label {
	font-size: .75rem;
}
.form-signup small {
	font-size: .65rem;
	text-align: justify;
	display: block;
}
.form-signup .form-group {
	margin-bottom: 1.5rem;
}
.form-signup .has-error {
	padding-top: 5px;
	text-indent: 7px;
	border-radius: 5px;
}
/* Calculated Values
-------------------------------------------------- */
h1.toolname {
	background: #1b75bc;
	width: 100%;
	color: white;
	margin: 0 0 10px;
	padding: 15px 8px;
	font-size: 1.75rem;
}
span.match {
	float: right;
	font-size: 14px;
	display: block;
	margin: 4px 0 0 0;
}
#calculated input, #calculated textarea,
.drawing input, .drawing textarea,
.results-drawing input, span.match {
	color: #000;
}
.grid-form select {
	line-height: 1;
}
select option {
	font-size: 18px;
	line-height: 1;
}
#conditions table tbody tr th { width: 45%; }
.grid-form fieldset.results-header {
	border: 5px solid #000;
}
#form.grid-form input {
	box-shadow:none;
}
fieldset.results-header [data-row-span] [data-field-span] {
	background: #FFF !important;
}
fieldset.results-header input:disabled,
.grid-form [data-row-span] [data-field-span] label:first-child {
	color: #000;
}
fieldset.results-header > * {
	user-select: none;
	pointer-events: none;
}

@media screen {
	#calculated input, #calculated textarea,
	.drawing input, .drawing textarea,
	.results-drawing input, span.match {
		color: #1B75BC;
	}
	#calculated.response {
		color: #990000;
	}
	.grid-form #customer fieldset {
		border-bottom: 5px solid #1b75bc;
	}
	.grid-form fieldset {
		margin: 15px 0 0 !important;
	}
	.grid-form fieldset.results-header {
		border: 0;
		cursor: pointer;
	}
	fieldset.results-header {
		background: rgba(27, 117, 188, 0.85) !important;
		transition: all .25s ease-in-out;
		-moz-transition: all .25s ease-in-out;
		-webkit-transition: all .25s ease-in-out;
	}
	fieldset.results-header:hover  {
		background: rgba(27, 117, 188, 1) !important;
	}
	fieldset.results-header [data-row-span] [data-field-span] {
		background: transparent !important;
	}
	fieldset.results-header input:disabled {
		color: #FFF;
	}
	input:disabled, textarea:disabled {
		background: transparent;
		border: none;
	}
	textarea {
		min-height: 70px;
		box-shadow: none;
	}
}
/* Quotes
-------------------------------------------------- */
#request textarea {
	width: 100%;
	min-height: 100px;
	display: block;
	padding: 6px 12px;
	font-size: 14px;
	line-height: 1.42857143;
	color: #555;
	background-color: #fff;
	background-image: none;
	border: 1px solid #ccc;
	border-radius: 4px;
	-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
	box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
	-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
	-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
	transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}
#request legend {
	margin-bottom: 8px;
	font-size: 16px;
	font-weight: bold;
}
#request .modal-header {
	padding: 4px 15px;
}
#request .modal-header .close {
    margin: 10px -40px;
}
#request .form-group {
    margin-bottom: 5px;
}
.alert {
	display:none;
	font-size: 14px;
}
.alert:after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.05);
	z-index: -1;
}
div.alert.alert-success,
div.alert.alert-danger {
	display:block;
}
div.alert.alert-danger p {
	color: #a94442;
	font-size:inherit;
	line-height: inherit;
}
div.alert.alert-success p {
	color: #3c763d;
	font-size:inherit;
	line-height: inherit;
}
.alert-warning, .alert-warning a, .form-group.has-error .alert-warning a {
	color: #414042;
}
/* Gridforms
-------------------------------------------------- */
.grid-form [data-row-span] [data-field-span].disabled:hover,
.grid-form [data-row-span] [data-field-span].disabled.focus:hover {
	background: #CCC;
	cursor: pointer;
}
.grid-form [data-row-span] [data-field-span].disabled.focus {
	background: #FFF;
	cursor: pointer;
}

/* Debug
-------------------------------------------------- */
pre {
	font-size:11px;
}
.has-error {
	background: rgba(153, 0, 0, 0.07);
}
.has-error .tippy-tooltip {
	background-color: #990000;
	max-width: 175px;
}
.has-error .tippy-popper[x-placement^=top] [x-arrow]{
	border-top-color: #990000;
}

/* Print Styles 
-------------------------------------------------- */
@media print {
	textarea { resize: none; }
	form { padding: 0; position: relative; }
	/* .results-drawing { width: 100%; position: relative; top: 0; right: 8px; right: 0; padding-left: 188px; } */
	#buttonspan, .tippy-tooltip { display: none }
	.results-specs, #customer, #conditions { display: block !important }
	aside { left: 0}
	.results-drawing legend { left: 8px; }
}
