/**
 * 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.
 */

code {
	display: block;
	padding: 1em;
	word-break: break-all;
}

.demo-ribbon {
  width: 100%;
  height: 40vh;
  background-color: #1EA52D;
  -webkit-flex-shrink: 0;
      -ms-flex-negative: 0;
          flex-shrink: 0;
}

.demo-main {
  margin-top: -35vh;
  -webkit-flex-shrink: 0;
      -ms-flex-negative: 0;
          flex-shrink: 0;
}

.demo-header .mdl-layout__header-row {
  padding-left: 40px;
}

.demo-container {
  max-width: 1600px;
  width: calc(100% - 16px);
  margin: 0 auto;
}

.demo-content {
  border-radius: 2px;
  padding: 40px 56px;
  padding: 3em 4em;
  margin: 0 auto 40px auto;
}

.demo-layout.is-small-screen .demo-content {
  padding: 40px 28px;
}

.demo-content h3 {
  margin-top: 48px;
}

.demo-footer {
  padding: 1.5em 3em;
  flex: 1 0 auto;
}

.demo-footer .mdl-mini-footer--link-list a {
  font-size: 13px;
}

	
/** SPECTRUM OVERRIDES */
.sp-container, .sp-picker-container {
    min-width: 20em;
}

	.sp-input {
		width: 100%;
	}

	.sp-input-container {
		flex: 1 0 auto;
		order: 3;
		margin-left: 1em;
		margin-top: .5em;
	}

	.sp-button-container {
		margin-top: .5em;
		order: 4;
		width: 100%;
		text-align: right;
	}

	.sp-picker-container {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: space-between;
	}

	.sp-initial {
		order: 2;
		height: 2.05em;
		margin-top: .5em;
	}

/** FORM STUFF */
textarea {
	display: block;
	width: 100%;
}

.labelHeading {
	display: block;
	font-weight: bold;
	margin: 2em 0 1em 0;
	font-size: 1.2em;
}

.buttonDiv {
    margin: 1em 0;
    display: flex;
    justify-content: flex-end;
}

fieldset {
    margin: 1em 0;
}
	fieldset > div {display: flex;}
	legend {
		font-weight: bold;
		font-size: 1.2em;
	}
	
.imageDiv {
    display: flex;
    justify-content: center;
	flex-wrap: wrap;
}
	.imageDiv img {margin: 1em 0;}
	
.colorContainer {
    margin-top: 1em;
}

	.colorComponent, .colorResult {
		min-height: 2em;
		display: flex;
		justify-content: center;
		align-items: center;
		padding: .5em;
		box-sizing: border-box;
	}
		
	.colorResult {
		min-height: 2em;
		/* border: 1px solid #ccc; */
		border-radius: .5em;
		margin-top: .5em;
	}

	.colorComponent.quarter, .colorResult.quarter {
		width: 25%;
	}

	.colorComponent.half, .colorResult.half {
		width: 50%;
	}

	.colorComponent.threeQuarter, .colorResult.threeQuarter {
		width: 75%;
	}
	
	.componentContainer {
		display: flex;
		/* width: fit-content; */
		max-width: 100%;
	}

	.colorComponent .componentLabel, .colorResult .componentLabel {
		background-color: #ffffffd6;
		padding: .2em .5em;
		border-radius: .5em;
		font-weight: 600;
		font-size: .9em;
	}

	.componentContainer .colorComponent:first-child {
		border-top-left-radius: .5em;
		border-bottom-left-radius: .5em;
	}

	.componentContainer .colorComponent:last-child {
		border-top-right-radius: .5em;
		border-bottom-right-radius: .5em;
	}
	
	.componentContainer .colorComponent, .colorResult {
		border: .125em solid #00000033;
		border-collapse: collapse;
	}
	.componentContainer .colorComponent:not(:first-child) { border-left: none; }
	.componentContainer .colorComponent:not(:last-child) { border-right: none; margin-right: -1px; }
	
	.componentRuler {
		display: flex;
		border: 1px solid black;
		margin-bottom: 1em;
	}
		.componentRuler > div {
			flex: 1 1 auto;
			text-align: center;
			padding: .2em;
		}
		.componentRuler > div:not(:last-child) {
			border-right: 1px solid #8c8c8c;
			margin-right: 1px;
		}

p.question {
    font-weight: bold;
    font-size: 1.15em;
    margin-top: 2em;
}

/** Beaker styles */
.beakerContainer {
	height: 10em;
	width: fit-content;
	position: relative;
}

.beakerContainer .beakerImg {
    height: 100%;
    width: auto;
	position: relative;
}

.beakerDrop.quarter {height: 2.5em;}
.beakerDrop.half {height: 5em;}
.beakerDrop.threeQuarter {height: 7.5em;}
.beakerDrop.noheight{height: 0em;}

.beakerFill {
    position: absolute;
    height: 9.9em;
    width: 98%;
    display: inline-flex;
    flex-direction: column-reverse;
    margin: auto 1%;
    padding-bottom: .1em;
}

.beakerDrop {
    position: relative;
    transition: height 1s;
    height: 10em;
}

.buttonContainer {
    margin-top: 1em;
}

.beakerMixArea .beakerBarContainer {
    display: flex;
    margin-left: 2em;
    align-items: center;
    margin-bottom: 1em;
}

.beakerBarContainer .colorContainer {
    flex: 1 1 0;
    margin-left: 2em;
    margin-top: 0;
	display: flex;
	flex-direction: column;
}

.beakerMixArea {
    margin: 1em;
}
	
.beakerSideBySide {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: -2em -2em 0 0;
}
	.beakerSideBySide .beakerContainer { margin: 2em 2em 0 0; }

.beakerContainer.captioned {
    margin-bottom: 1.5em;
}

	.beakerCaption {
		margin-top: .5em;
		text-align: center;
		font-size: .9em;
	}

.side-by-side {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: -1em;
    padding-top: .5em;
}

.spaceAfter {
	margin-bottom: 1em;
}

.colorContainer .hintButton {
    margin-top: 1em;
}

.colorContainer label {
    margin: 0;
    margin-bottom: 1em;
}

.messageArea {
    background: #ffabab;
    padding: .5em .75em;
    border-radius: .3em;
    max-width: 25em;
    margin: 1em auto 0 auto;
}
	.messageArea.correct { background: #a8f3a8; }
	
.colorResult.emptyColor {
    background-color: transparent!important;
}

.actionsContainer {
    margin: 3em -4em 0 -4em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(0,0,0,.1);
    padding: 2em 4em 0 4em;
}

	.actionsContainer .buttonDiv {
		margin: 0;
		justify-content: space-between;
		width: 100%;
	}
		.actionsContainer .buttonDiv .nextButton { margin-left: auto; }
		.actionsContainer .buttonDiv .previousButton { margin-right: auto; }

fieldset.inline .containerDiv {
    display: flex;
    flex-direction: row;
}
	fieldset.inline .fieldGroup { margin-left: 1em; }


.colorLabelContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}
	.colorLabelContainer label {
		margin-bottom: .5em;
	}

.encoderContainer .formActions, .decoderContainer .formActions {
    display: flex;
    justify-content: space-between;
    margin-top: 1em;
    align-items: center;
}

	.encoderContainer .textContainer, .decoderContainer .textContainer {
		display: flex;
		flex-wrap: wrap;
		margin: 0 0 -1em -1em;
	}

	.textContainer textarea {
		/* margin: 0 0 1em 1em; */
		border: none;
		border-radius: .5em;
		background: #eaeaea;
		padding: .75em;
		box-sizing: border-box;
		min-height: 10em;
	}
	
	.textLabelContainer {
		flex: 1 0 auto;
		box-sizing: content-box;
		margin: 0 0 1em 1em;
	}

		.textLabelContainer label {
			margin-bottom: 0.5em;
			font-weight: 600;
			display: block;
		}