/**
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

html, body {
	font-family: 'Roboto', 'Helvetica', sans-serif;
}

.savew-form table.full-width {
	width: 100%;
}
.savew-form table.full-width td:first-child {
	white-space: normal;
	width: 100%;
}
.savew-form .mdl-textfield {
	width: 100%;
}
.savew-form .mdl-textfield__label {
	color: rgba(0,0,0,.46);
}
 #chart canvas {
	min-height: 60vh;
}

section.mdl-layout__content:not(:target) {
	display: none !important;
}
section.mdl-layout__content:target ~ main.mdl-layout__content {
	display: none;
}
[data-units]:after {
	content: attr(data-units);
	margin-left: 0.2em;
}

#page-loading {
	visibility: hidden;
	width: 100%;
	height: 2px;
	position: absolute;
	z-index: 10;
}
#chart-loading {
	display: none;
	margin: 40px auto;

}
body.calculating #page-loading,
body.calculating #chart-loading,
body.rendering #page-loading,
body.rendering #chart-loading {
	display: block;
	visibility: visible;
}
.savew-label {
	margin: 16px 0 8px 0;
	line-height: 24px;
}
.savew-label.savew-switch-right {
	width: auto;	
}
.savew-switch {
	width: auto;
	margin-left: 50px;
}
.savew-switch-right {
	padding-right: 150px;
}
.savew-switch-right + .savew-switch {
	position: absolute;
	right: 0;
	padding-right: 24px;
}
.savew-switch-label {
	position: absolute;
	left: -45px;
	font-size: 15px;
	line-height: 24px;
}
.savew-label + .savew-switch {
	margin-top: 16px;
}
table.savew-table th,
table.savew-table td {
	color: #757575;
	line-height: 24px;
	font-size: 16px;
	vertical-align: top;
	padding: 8px 0px;
}
table.savew-table th {
	font-weight: normal;
	text-align: left;
	padding: 8px 3px;
}
table.savew-table thead th {
    font-size: 12px;
}
table.savew-table tbody td {
	text-align: center;
}
.savew-align-right {
	float: right;
}
.savew-warning {
	padding: 5px 8px;
	background-color: rgba(255,0,0,0.2);
	color: #666;
	margin-left: 16px;
	margin-right: -16px;
}
table.savew-table th.savew-radio-header {
	min-width: 50px;
	text-align: center;
}
table.savew-table .mdl-radio.is-upgraded {
    padding-left: 15px;
}
table.savew-table .mdl-textfield {
	padding: 0;
}
.savew-title-icon {
	padding-right: 24px;
}
.savew-icon {
	position: absolute;
	right: 12px;
}
.savew-icon i {
	color: white !important;
}
.savew-icon input ~ .savew-open {
	display: block;
}
.savew-icon input ~ .savew-close {
	display: none;
}
.savew-icon input:checked ~ .savew-open {
	display: none;
}
.savew-icon input:checked ~ .savew-close {
	display: block;
}
.savew-container {
	position: relative;
}
body.savew-graph-fullscreen .savew-graph-container {
	position: absolute;
	left: 0;
	width: 100%;
	width: calc(100% - 16px);
	height: 100%;
}
[data-savew-warning] input {
	border-color: #e8a502 !important;
}
[data-savew-warning]::after {
	content: attr(data-savew-warning);
	display: block;
	color: #e8a502 !important;
	text-align: left;
	font-size: 12px;
}
[data-savew-error] input {
	border-color: #d50000 !important;
}
[data-savew-error]::after {
	content: attr(data-savew-error);
	display: block;
	color: #d50000 !important;
	text-align: left;
	font-size: 12px;
}
.savew-indent {
	padding-left: 32px;
}
.mdl-textfield__input {
	color: black;
}
.images .mdl-card__title {
	padding: 0;
	height: 100%;
}
.images .image-name {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	z-index: 1;
}
.images .image-cover {
	object-fit: contain;
	width: 100%;
}
.images {
	overflow: hidden;
	margin-left: calc( -1em + 6px );
	width: 120vw;
}
.images .mdl-card {
	width: calc( 50vw - 2em - 7px );
	height: calc( 50vw - 2em - 7px );
	float: left;
	margin-top: 1em;
	margin-left: 1em;
	padding: 0;
	position: relative;
	min-height: auto;
}
@media screen and (min-width: 640px) {
	.images .mdl-card {
		width: calc( 33vw - 2em + 3px );
		height: calc( 33vw - 2em + 3px );
	}
}
@media screen and (min-width: 1024px) {
	.images .mdl-card {
		width: calc( 33vw - 2em - 76px );
		height: calc( 33vw - 2em - 76px );
	}
}
@media screen and (min-width: 1280px) {
	.images .mdl-card {
		width: calc( 25vw - 2em - 56px );
		height: calc( 25vw - 2em - 56px );
	}
}
@media screen and (min-width: 1600px) {
	.images .mdl-card {
		width: calc( 16.6vw - 2em - 28px );
		height: calc( 16.6vw - 2em - 28px );
	}
}

.is-invalid input:invalid ~ span.mdl-radio__outer-circle {
    border-color: red;
}
input:-ms-input-placeholder {
	color: #888;
}