/******************************************************************
Site Name:
Author:

Stylesheet: Read Class Styles for Gravity Forms

Reference: http://www.gravityhelp.com/documentation/page/CSS_Ready_Classes,
https://wordpress.org/plugins/gravity-forms-css-ready-selector/

******************************************************************/

//
// Inline fields
//

li.gf_inline div.ginput_container {
	white-space: nowrap !important;
}

.top_label,
.left_label,
.right_label {
	input.small,
	select.small,
	select.small + .select2-container,
	textarea.small,
	input.medium,
	select.medium,
	select.medium + .select2-container,
	textarea.medium,
	input.large,
	select.large,
	select.large + .select2-container,
	textarea.large {
		width: 100%;
	}
}

.top_label {
	li.gfield.gf_inline {
		vertical-align: top;
		width: auto !important;
		margin-right: 14px;
		float: none !important;
		display: inline-block;

		input[type="text"].large,
		input[type="url"].large,
		input[type="email"].large,
		input[type="tel"].large,
		input[type="number"].large,
		input[type="password"].large {
			width: 25.4em !important;
		}

		input[type="text"].medium,
		input[type="url"].medium,
		input[type="email"].medium,
		input[type="tel"].medium,
		input[type="number"].medium,
		input[type="password"].medium {
			width: 18.7em !important;
		}

		input[type="text"].datepicker.medium {
			width: 6em !important;
		}

		input[type="text"].small,
		input[type="url"].small,
		input[type="email"].small,
		input[type="tel"].small,
		input[type="number"].small,
		input[type="password"].small {
			width: 5em !important;
		}

		select {
			width: auto !important;
		}

		textarea {
			width: 95% !important;
		}

		div.gfield_time_hour input[type="text"],
		div.gfield_time_minute input[type="text"] {
			width: 70% !important;
		}

		div.gfield_time_hour,
		div.gfield_time_minute,
		div.gfield_date_month,
		div.gfield_date_day,
		div.gfield_date_year {
			width: 50px;
		}

		div.gfield_time_ampm {
			width: auto;
		}
	}
	// end li.gfield.gf_inline

	// 2 column

	li.gfield.gf_left_half,
	li.gfield.gf_right_half {
		width: 100%;

		input.medium,
		input.large,
		select.medium,
		select.large,
		select.medium + .select2-container,
		select.large + .select2-container {
			width: 100%;
		}

		textarea {
			width: 100%;
		}

		input.small {
			width: 100%;
		}
	}

	li.gfield.gf_left_half + li.gfield.gsection.gf_left_half,
	li.gfield.gf_right_half + li.gfield.gsection.gf_left_half,
	li.gfield.gf_left_half + li.gfield.gsection.gf_right_half,
	li.gfield.gf_right_half + li.gfield.gsection.gf_right_half,
	li.gfield.gsection.gf_left_half + li.gfield.gsection.gf_left_half,
	li.gfield.gsection.gf_right_half + li.gfield.gsection.gf_left_half,
	li.gfield.gsection.gf_right_half + li.gfield.gsection.gf_right_half {
		padding: 16px 0 8px 0;
	}

	li.gfield.gsection.gf_left_half + li.gfield.gsection.gf_right_half {
		padding: 0 0 8px 0;
	}

	li.gfield.gsection.gf_left_half + li.gfield.gsection.gf_right_half + li.gfield.gsection.gf_left_half + li.gfield.gsection.gf_right_half {
		padding: 16px 0 8px 0;
	}

	li.gfield.gf_left_half + li.gfield,
	li.gfield.gf_right_half + li.gfield,
	li.gfield.gf_left_half + .gform_footer,
	li.gfield.gf_right_half + .gform_footer {
		clear: both;
	}

	// 3 column

	li.gfield.gf_left_third,
	li.gfield.gf_middle_third,
	li.gfield.gf_right_third {
		width: 100%;
	}

	li.gfield.gfield_error.gf_left_third,
	li.gfield.gfield_error.gf_middle_third,
	li.gfield.gfield_error.gf_right_third {
		width: 100%;
	}

	li.gfield.gf_left_third + li.gsection,
	li.gfield.gf_right_third + li.gsection {
		padding: 16px 0 8px 0;
	}

	li.gfield.gf_left_third + li.gfield,
	li.gfield.gf_middle_third + li.gfield,
	li.gfield.gf_right_third + li.gfield,
	li.gfield.gf_left_third + .gform_footer,
	li.gfield.gf_middle_third + .gform_footer,
	li.gfield.gf_right_third + .gform_footer {
		clear: both;
	}
}
// end .top_label

// optional height settings for the radio/checkbox columns

li.gfield.gf_list_height_25 {
	ul.gfield_checkbox li,
	ul.gfield_radio li {
		height: 25px;
	}
}

li.gfield.gf_list_height_50 {
	ul.gfield_checkbox li,
	ul.gfield_radio li {
		height: 50px;
	}
}

li.gfield.gf_list_height_75 {
	ul.gfield_checkbox li,
	ul.gfield_radio li {
		height: 75px;
	}
}

li.gfield.gf_list_height_100 {
	ul.gfield_checkbox li,
	ul.gfield_radio li {
		height: 100px;
	}
}

li.gfield.gf_list_height_125 {
	ul.gfield_checkbox li,
	ul.gfield_radio li {
		height: 125px;
	}
}

li.gfield.gf_list_height_150 {
	ul.gfield_checkbox li,
	ul.gfield_radio li {
		height: 150px;
	}
}

// radio/checkbox inline list

li.gfield.gf_list_inline {
	ul.gfield_checkbox li
	ul.gfield_radio li {
		width: auto !important;
		float: none !important;
		margin: 0 10px 10px 0;
		display: inline-block;
	}
}

//
// hide am/pm field
//

li.gf_hide_ampm div.gfield_time_ampm {
	display: none !important;
}

//
// scrolling text section break
//

li.gsection.gf_scroll_text {
	height: 180px;
	width: 96%;
	overflow: auto;
	border: 1px solid #CCC;
	border-bottom: 1px solid #CCC !important;

	h2.gsection_title {
		margin: 10px 10px 0 10px !important;
	}

	.gsection_description {
		margin: 10px;
		font-size: 0.8em;
	}
}

div.gform_ul.gform_fields li.gfield.gsection.gf_scroll_text div.gsection_description,
form div.gform_ul.gform_fields li.gfield.gsection.gf_scroll_text div.gsection_description {
	ul {
		list-style-type: disc !important;
		margin: 1em 0 1em 1.5em;
		padding-left: 0;

		li {
			margin: 0 0 0.5em;
			overflow: visible;
			padding-left: 0;
		}
	}

	ol {
		list-style-type: decimal !important;
		margin: 1em 0 1.5em 2.0em;
		padding-left: 0;

		li {
			overflow: visible;
			margin: 0 0 0.5em;
			padding-left: 0;

			ul {
				margin: 1em 0 1em 1.5em;

				li {
					padding-left: 0;
					margin: 0 0 0.5em;
				}
			}
		}
	}
}

div.gform_ul.gform_fields li.gfield.gsection.gf_scroll_text div.gsection_description dl {
	margin: 0 0 1.5em 0;
	padding-left: 0;

	dt {
		font-weight: bold;
	}

	dd {
		margin: 0 0 1em 1.5em;
	}
}

//
// HTML field alert style
//

li.gfield.gfield_html.gf_alert_green,
li.gfield.gfield_html.gf_alert_red,
li.gfield.gfield_html.gf_alert_yellow,
li.gfield.gfield_html.gf_alert_gray,
li.gfield.gfield_html.gf_alert_blue {
	margin: 20px 0 !important;
	padding: 20px !important;
}

li.gfield.gfield_html.gf_alert_green {
	border: 1px solid #97B48A;
	background-color: #CBECA0;
	text-shadow: #DFB 1px 1px;
	color: #030;
}

li.gfield.gfield_html.gf_alert_red {
	border: 1px solid #CFADB3;
	background-color: #FAF2F5;
	text-shadow: #FFF 1px 1px;
	color: #832525;
}

li.gfield.gfield_html.gf_alert_yellow {
	border: 1px solid #E6DB55;
	background-color: #FFFBCC;
	text-shadow: #FCFAEA 1px 1px;
	color: #222;
}

li.gfield.gfield_html.gf_alert_gray {
	border: 1px solid #CCC;
	background-color: #EEE;
	text-shadow: #FFF 1px 1px;
	color: #424242;
}

li.gfield.gfield_html.gf_alert_blue {
	border: 1px solid #a7c2e7;
	background-color: #D1E4F3;
	text-shadow: #E0F1FF 1px 1px;
	color: #314475;
}

//
// Confirmation Styles
//

div.gform_confirmation_wrapper.gf_confirmation_simple_yellow {
	margin: 30px 0;
	max-width: 99%;
	border-top: 1px solid #E6DB55;
	border-bottom: 1px solid #E6DB55;
	padding: 2em;
	background-color: #FFFBCC;
	color: #424242;
	font-size: 1.6em;
}

div.gform_confirmation_wrapper.gf_confirmation_simple_gray {
	margin: 30px 0;
	max-width: 99%;
	border-top: 1px solid #CCC;
	border-bottom: 1px solid #CCC;
	padding: 2em;
	background-color: #EAEAEA;
	color: #424242;
	font-size: 1.6em;
}

div.gform_confirmation_wrapper.gf_confirmation_yellow_gradient {
	position: relative;
	background-color: #FFFBD2;
	margin: 30px 0;
	border: 1px solid #E6DB55;
	box-shadow: 0 0 5px rgba(221, 215, 131, 0.75);

	div#gforms_confirmation_message {
		margin: 0;
		padding: 40px;
		max-width: 99%;
		font-size: 1.8em;
		border-top: 2px solid #FFF;
		border-bottom: 1px solid #E6DB55;
		background-color: #FFFBCC;
		color: #424242;
		background: linear-gradient(to bottom, #fffce5 0%, #fff9bf 100%);
	}
}

div.gform_confirmation_wrapper.gf_confirmation_green_gradient {
	position: relative;
	background-color: #f1fcdf;
	margin: 30px 0;
	border: 1px solid #a7c37c;
	box-shadow: 0 0 5px rgba(86, 122, 86, 0.4);

	div#gforms_confirmation_message {
		margin: 0;
		padding: 40px;
		max-width: 99%;
		font-size: 1.8em;
		border-top: 2px solid #effade;
		border-bottom: 1px solid #a7c37c;
		background-color: #FFFBCC;
		text-shadow: #DFB 1px 1px;
		color: #030;
		background: linear-gradient(to bottom, rgba(219, 242, 183, 1) 0%, rgba(180, 208, 136, 1) 100%);
	}
}

div.gform_confirmation_wrapper.gf_confirmation_yellow_gradient
div.gform_confirmation_wrapper.gf_confirmation_green_gradient {
	&:before,
	&:after {
		z-index: -1;
		position: absolute;
		content: "";
		bottom: 15px;
		left: 10px;
		width: 50%;
		top: 80%;
		max-width: 40%;
		background: rgba(0, 0, 0, 0.2);
		box-shadow: 0 15px 10px rgba(0, 0, 0, 0.2);
		transform: rotate(-3deg);
	}

	&:after {
		transform: rotate(3deg);
		right: 10px;
		left: auto;
	}
}

//
// MEDIA QUERIES
//

@include media-breakpoint-up('md') {

	.right_label input.small,
	.right_label select.small,
	.right_label select.small + .select2-container,
	.right_label textarea.small,
	.left_label input.small,
	.left_label select.small,
	.left_label select.small + .select2-container,
	.left_label textarea.small {
		width: 15%;
	}

	.right_label input.medium,
	.right_label select.medium,
	.right_label select.medium + .select2-container,
	.right_label textarea.medium,
	.left_label input.medium,
	.left_label select.medium,
	.left_label select.medium + .select2-container,
	.left_label textarea.medium {
		width: 35%;
	}

	.right_label input.large,
	.right_label select.large,
	.right_label select.large + .select2-container,
	.right_label textarea.large,
	.left_label input.large,
	.left_label select.large,
	.left_label select.large + .select2-container,
	.left_label textarea.large {
		width: 69%;
	}

	.right_label .ginput_complex,
	.left_label .ginput_complex {
		width: 69%;
	}

	.top_label {
		input.large,
		select.large,
		select.large + .select2-container,
		textarea.large,
		textarea.medium,
		textarea.small {
			width: 100%;
		}

		input.small,
		select.small,
		select.small + .select2-container {
			width: 25%;
		}

		input.medium,
		select.medium,
		select.medium + .select2-container {
			width: 49%;
		}

		li.gf_list_inline {
			ul.gfield_radio,
			ul.gfield_checkbox {
				li {
					display: inline-block;

					label {
						margin-right: 2em;
					}
				}
			}
		}

		li.gfield.gf_left_half,
		li.gfield.gf_right_half,
		li.gfield_medium {
			width: 49%;

			input.small {
				width: 35%;
			}
		}

		li.gfield.gf_left_half {
			float: left;
			clear: left !important;
		}

		li.gfield.gf_right_half {
			float: right;
			clear: right !important;
		}

		li.gfield.gf_left_half,
		li.gfield.gf_right_half {
			input.large,
			select.large,
			select.large + .select2-container,
			textarea.large,
			input.medium,
			select.medium,
			select.medium + .select2-container,
			textarea.medium {
				width: 100% !important;
			}
		}

		li.gfield.gf_left_third,
		li.gfield.gf_middle_third,
		li.gfield.gf_right_third {
			width: 33.3%;

			input.medium,
			input.large,
			select.medium,
			select.large,
			select.medium + .select2-container,
			select.large + .select2-container {
				width: 100%;
			}
		}

		li.gfield.gfield_error.gf_left_third,
		li.gfield.gfield_error.gf_middle_third,
		li.gfield.gfield_error.gf_right_third {
			width: 29%;
		}

		li.gfield.gf_left_third {
			float: left;
			clear: left !important;
		}

		li.gfield.gf_middle_third {
			float: left;
			clear: none !important;
		}

		li.gfield.gfield_error.gf_middle_third {
			margin-left: 3%;
		}

		li.gfield.gf_right_third {
			float: right;
			clear: right !important;
		}
	}
	// end .top_label

	li.gfield.gf_list_2col,
	li.gfield.gf_list_3col,
	li.gfield.gf_list_4col,
	li.gfield.gf_list_5col {
		ul.gfield_checkbox,
		ul.gfield_radio {
			display: flex;
			flex-wrap: wrap;

			li {
				float: left;
				padding-right: 1em;
			}
		}
	}

	li.gfield.gf_list_2col ul.gfield_checkbox li,
	li.gfield.gf_list_2col ul.gfield_radio li,
	li.gfield.gf_2col ul.gfield_checkbox li,
	li.gfield.gf_2col ul.gfield_radio li {
		max-width: 50%;
		flex: 0 0 50%;

		&:nth-child(2n) {
			clear: right;
		}

		&:nth-child(2n+1) {
			clear: left;
		}
	}

	li.gfield.gf_list_3col ul.gfield_checkbox li,
	li.gfield.gf_list_3col ul.gfield_radio li,
	li.gfield.gf_3col ul.gfield_checkbox li,
	li.gfield.gf_3col ul.gfield_radio li {
		max-width: 33.333%;
		flex: 0 0 33.333%;

		&:nth-child(3n) {
			clear: right;
		}

		&:nth-child(3n+1) {
			clear: left;
		}
	}

	li.gfield.gf_list_4col ul.gfield_checkbox li,
	li.gfield.gf_list_4col ul.gfield_radio li {
		max-width: 25%;
		flex: 0 0 25%;

		&:nth-child(4n) {
			clear: right;
		}

		&:nth-child(4n+1) {
			clear: left;
		}
	}

	li.gfield.gf_list_5col ul.gfield_checkbox li,
	li.gfield.gf_list_5col ul.gfield_radio li {
		max-width: 20%;
		flex: 0 0 20%;

		&:nth-child(5n) {
			clear: right;
		}

		&:nth-child(5n+1) {
			clear: left;
		}
	}
}
