/*****************************************************************************
 * Open MCT Web, Copyright (c) 2014-2015, United States Government
 * as represented by the Administrator of the National Aeronautics and Space
 * Administration. All rights reserved.
 *
 * Open MCT Web is 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.
 *
 * Open MCT Web includes source code licensed under additional open source
 * licenses. See the Open Source Licenses file (LICENSES.md) included with
 * this source code distribution or the Licensing information page available
 * at runtime from the About dialog for additional information.
 *****************************************************************************/
.section-header {
	@include border-radius($basicCr);
	background: $colorFormSectionHeader;
	$c: lighten($colorBodyFg, 20%);
	//border-bottom: 1px solid rgba(#fff, 0.3);
	color: $c;
	font-size: 0.8em;
	padding: $formTBPad $formLRPad;
	text-transform: uppercase;
}

.form {
//	@include test(orange);
	color: $colorFormText;
	.form-section {
		position: relative;
		margin-bottom: $interiorMarginLg * 2;
	}

	.form-row {
		$m: $interiorMargin;
		@include box-sizing(border-box);
		@include clearfix;
		border-top: 1px solid $colorFormLines;
		margin-top: $m;
		padding: $formTBPad 0;
		position: relative;
		&.first {
			border-top: none;
		}

		>.label,
		>.controls {
			@include box-sizing(border-box);
			@include clearfix;
			font-size: 0.8rem;
			line-height: $formInputH;
            min-height: $formInputH;
		}

		>.label {
			// Only style this way for immediate children of .form-row; prevents problems when .label is used in .controls section of a form
			//@include test(orange, 0.05);
			float: left;
			min-width: 120px;
            position: relative;
			white-space: nowrap;
			width: $formLabelW;
		}

		.value {
			color: $colorInputFg; //lighten($colorBodyFg, 20%);
		}

		.controls {
			float: left;
            position: relative;
			width: 99.9% - $formLabelW; // Start with less than 100% for Firefox

			.l-composite-control {
//				display: inline-block;
				&.l-checkbox {
//					@include test();
//					height: $formRowCtrlsH;
					display: inline-block;
					line-height: $formRowCtrlsH;
					margin-right: 5px;
				}
			}

			.l-med input[type="text"] {
				width: 200px;
			}

			.l-small input[type="text"] {
				width: 50px;
			}

			.l-numeric input[type="text"] {
				text-align: right;
			}

			.select {
				margin-right: $interiorMargin;
			}
		}

		.field-hints {
			color: darken($colorBodyFg, 20%);
		}

		.selector-list {
			// Used in create overlay to display tree view
			@include nice-input($colorInputBg, $colorInputFg);
			$h: 150px;
			//@include border-radius($basicCr);
			//@include box-sizing(border-box);
			//background: rgba(black, 0.2);
			//padding: $interiorMargin;
			position: relative;
			height: $h;
//			max-width: 50%;
			>.wrapper {
				$p: $interiorMargin;
				overflow: auto;
				position: absolute;
				top: $p;
				right: $p;
				bottom: $p;
				left: $p;
			}
		}
	}
}

label.form-control.checkbox {
	input {
		margin-right: $interiorMargin;
		vertical-align: top;
	}
}

.hint,
.s-hint {
	font-size: 0.9em;
}

.l-result {
	// Used in /vista/channel-query.html and evr-query.html as of 2/24/15
	display: inline-block;
	min-width: 32px; min-height: 32px;
	position: relative;
	vertical-align: top;

	div.s-hint {
		@include border-radius($basicCr);
		background: rgba($colorFormInvalid, 0.8);
		display: block;
		color: lighten($colorFormInvalid, 30%);
		padding: $interiorMargin;
	}
}

input[type="text"] {
	@include nice-input($colorInputBg, $colorInputFg);
	&.filter {
		&.ng-dirty {
			//            background: red;
		}
	}
	&.numeric {
		text-align: right;
	}
}

textarea {
	@include nice-textarea($colorInputBg, $colorInputFg);
	//	font-size: 0.9em;
	position: absolute;
	height: 100%;
	width: 100%;
}