<?php

$stla_options = get_option( 'gf_stla_form_id_' . $form_id );

echo '<style>
@media screen and (min-width: 641px) {
	#gform_wrapper_'.$form_id.' .stla_material_large {
	  width: 100% !important;
	}
	#gform_wrapper_'.$form_id.' .stla_material_medium {
	  width: 50% !important;
	}
	#gform_wrapper_'.$form_id.' .stla_material_small {
	  width: 25% !important;
  }
  
  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield.gf_left_half .stla_material_medium,
  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield.gf_right_half .stla_material_medium,
  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield.gf_left_third .stla_material_medium,
  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield.gf_middle_third .stla_material_medium,
  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield.gf_right_third .stla_material_medium,
  #gform_wrapper_'.$form_id.'.gform_wrapper ul.row li.gfield:not(.col-md-12) .stla_material_medium,
  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield.gf_left_half .stla_material_large,
  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield.gf_right_half .stla_material_large,
  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield.gf_left_third .stla_material_large,
  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield.gf_middle_third .stla_material_large,
  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield.gf_right_third .stla_material_large,
  #gform_wrapper_'.$form_id.'.gform_wrapper ul.row li.gfield:not(.col-md-12) .stla_material_large
 {
   width: 100% !important;
 }
  }




	#gform_wrapper_'.$form_id.' .gform_fields ul.row li.gfield:not(.col-md-12) .stla_material_medium{
    width:100% !important;
  }


  #gform_wrapper_'.$form_id.' div.charleft{
	  width: 100% !important;
	  padding-right: 32px;
	  text-align: right;
	  position: absolute;
  }

  #gform_wrapper_'.$form_id.' .stla_material_char_counter{
	overflow-x: hidden !important;
	overflow-y: scroll !important;
  }

  #gform_wrapper_'.$form_id.' ul.gfield_checkbox li input[type=checkbox], #gform_wrapper_'.$form_id.' ul.gfield_radio li input[type=radio]{
	visibility: visible !important;
  }

  #gform_wrapper_'.$form_id.' .mdc-text-field{
	padding-bottom: 0 !important;
  }

  #gform_wrapper_'.$form_id.'  .mdc-text-field__input{
	margin-bottom: 0 !important;
  }

  #gform_wrapper_'.$form_id.' .mdc-text-field__input {
	width: 100% !important;
	border-top: 0 !important;
	border-left: 0 !important;
	border-right: 0 !important;
	margin-bottom:0;
  }

  #gform_wrapper_'.$form_id.' .mdc-switch__native-control{
	width: 48px !important;
	height: 48px !important;
  }

  #gform_wrapper_'.$form_id.' .field_sublabel_below .ginput_complex.ginput_container label,
  #gform_wrapper_'.$form_id.' .field_sublabel_below div[class*="gfield_time_"].ginput_container label {
	margin-bottom: 0 !important;
  }

  #gform_wrapper_'.$form_id.'.gform_wrapper .field_sublabel_above .ginput_complex.ginput_container label,
  #gform_wrapper_'.$form_id.'.gform_wrapper .field_sublabel_above div[class*=gfield_time_].ginput_container label{
    margin-top: 0px;
  }
  #gform_wrapper_'.$form_id.' .ginput_complex label,
  #gform_wrapper_'.$form_id.' .ginput_container_time label {
	line-height: 1.4;
  }
  #gform_wrapper_'.$form_id.' ul.gfield_checkbox li input[type="checkbox"].mdc-checkbox__native-control,
  #gform_wrapper_'.$form_id.' ul.gfield_radio li input[type="radio"].mdc-radio__native-control {
	width: 100% !important;
  }

  #gform_wrapper_'.$form_id.' li.gfield.gf_list_2col ul.gfield_checkbox,
  #gform_wrapper_'.$form_id.' li.gfield.gf_list_2col ul.gfield_radio,
  #gform_wrapper_'.$form_id.' li.gfield.gf_list_3col ul.gfield_checkbox,
  #gform_wrapper_'.$form_id.' li.gfield.gf_list_3col ul.gfield_radio,
  #gform_wrapper_'.$form_id.' li.gfield.gf_list_4col ul.gfield_checkbox,
  #gform_wrapper_'.$form_id.' li.gfield.gf_list_4col ul.gfield_radio,
  #gform_wrapper_'.$form_id.' li.gfield.gf_list_5col ul.gfield_checkbox,
  #gform_wrapper_'.$form_id.' li.gfield.gf_list_5col ul.gfield_radio,
  #gform_wrapper_'.$form_id.' ul.gfield_checkbox li,
  #gform_wrapper_'.$form_id.' ul.gfield_radio li {
	overflow: visible !important;
  }
  #gform_wrapper_'.$form_id.' .mdc-checkbox {
	box-sizing: content-box !important;
  }
  #gform_wrapper_'.$form_id.' .mdc-form-field {
	display: inline-flex !important;
  }
  .gfield_checkbox .mdc-form-field,
   .gfield_radio .mdc-form-field,
  #gform_wrapper_'.$form_id.' .ginput_container_multiselect select.mdc-list {
	width: 100%;
  }
  #gform_wrapper_'.$form_id.' .ginput_container_fileupload,
  #gform_wrapper_'.$form_id.' .ginput_container_post_image {
	text-align: left;
  }
  #gform_wrapper_'.$form_id.' .ginput_container_fileupload input[type="file"].mdc-button,
  #gform_wrapper_'.$form_id.' .ginput_container_post_image input[type="file"].mdc-button {
	padding-left: 0;
	text-align: left;
  }
  #gform_wrapper_'.$form_id.' .ginput_complex .ginput_right.mdc-text-field__input {
	min-height: auto;
  }
  #gform_wrapper_'.$form_id.' .sk-gfield_error .gfield_label,
  #gform_wrapper_'.$form_id.' .gfield_description.validation_message {
	color: #d50000;
  }
  #gform_wrapper_'.$form_id.' .mdc-list option {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-ms-flex-align: center;
	-webkit-box-pack: start;
	-ms-flex-pack: start;
	height: 40px;
	padding: 0 16px;
  }
  #gform_wrapper_'.$form_id.' .mdc-list {
	height: auto !important;
	padding: 0 !important;
  }

  #gform_wrapper_'.$form_id.' .field_description_below .gfield_description{
	padding-top: 8px;
  }

  #gform_wrapper_'.$form_id.' .gfield_list_group, #gform_wrapper_'.$form_id.' .gfield_list_cell, #gform_wrapper_'.$form_id.' .gfield_list_cell .mdc-text-field{
	padding-top: 0;
	margin:0;
  }


   body #gform_wrapper_'.$form_id.' .gform_body .gform_fields .gfield ul.gfield_radio li input[value="Other"]{
      border-width: 0px 0px 1px 0px;
    }
    #gform_wrapper_'.$form_id.' .gfield_list_group .gfield_list_cell .mdc-text-field{
      width:100%;
    }

    #gform_wrapper_'.$form_id.' .name_prefix_select{
      padding-top:2px;
    }

    #gform_wrapper_'.$form_id.' .mdc-text-field--textarea .mdc-floating-label{
      background-color:transparent;
	}
	
	#gform_wrapper_'.$form_id.' ul.gform_fields li.gfield select.mdc-select__native-control{
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    letter-spacing: .00937em;
    width: 100%;
    border: none;
    border-bottom: 1px solid;
    border-radius: 0;
    outline: none;
    background-color: transparent;
    white-space: nowrap;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-bottom-color: rgba(0,0,0,0.42);
    margin-top: 0px;
	}

  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield .ginput_container_time.mdc-select{
    margin-top: 0px;
  }
  #gform_wrapper_'.$form_id.' ul.gform_fields li.gfield .ginput_container_time.mdc-select select,#gform_wrapper_'.$form_id.' .ginput_complex .ginput_right select,
  #gform_wrapper_'.$form_id.' .ginput_complex select{
    height:100%;
    margin-bottom:0px;
  }
  #gform_wrapper_'.$form_id.' .mdc-floating-label{
    white-space: normal;
  }

  #gform_wrapper_'.$form_id.' .mdc-text-field:not(.mdc-text-field--fullwidth):not(.mdc-text-field--box){
	margin-top: 0;
}


#gform_wrapper_'.$form_id.':not(.gf_browser_chrome) .mdc-select{
	height: 48px;
}



#gform_wrapper_'.$form_id.' select.mdc-select__native-control{
  height:auto;
}
#gform_wrapper_'.$form_id.' .ginput_container_textarea.mdc-text-field--textarea{
  width: 100%;
}

#gform_wrapper_'.$form_id.'.gform_wrapper .ginput_complex .ginput_cardinfo_left span.ginput_card_expiration_container div.mdc-select{
  width:47% ;
}
#gform_wrapper_'.$form_id.' .gfield .ginput_container_creditcard .ginput_card_expiration_container .mdc-select select{
  width: 100% !important;
}
#gform_wrapper_'.$form_id.' .gfield .ginput_container_creditcard .mdc-text-field input{
  max-width: 100% !important;
}
#gform_wrapper_'.$form_id.' .gfield .ginput_container_creditcard .ginput_cardinfo_right .mdc-text-field,
#gform_wrapper_'.$form_id.' .gfield .ginput_container_creditcard .ginput_cardinfo_right span.ginput_card_security_code_icon{
  vertical-align: middle;
}
#gform_wrapper_'.$form_id.' .gfield .ginput_container_creditcard.ginput_container_creditcard .mdc-floating-label--float-above{
  -webkit-transform: translateY(-70%) scale(.75);
  transform: translateY(-70%) scale(.75);
}
#gform_wrapper_'.$form_id.'.gform_wrapper .top_label .gfield_label, #gform_wrapper_'.$form_id.'.gform_wrapper legend.gfield_label{

  font-family: Roboto,sans-serif;
  letter-spacing: .00937em;
  text-decoration: inherit;
  text-transform: inherit;

}
#gform_wrapper_'.$form_id.'.gform_wrapper .gfield_checkbox li.pretty,
#gform_wrapper_'.$form_id.'.gform_wrapper .gfield_radio li.pretty{
  font-size: .766em;
  font-family: Roboto,sans-serif;
}
#gform_wrapper_'.$form_id.'.gform_wrapper .gform_body .gform_fields li.gfield ul li.pretty .state label{
  vertical-align: middle;
}

#gform_wrapper_'.$form_id.' .gfield .mdc-notched-outline__notch label {
    line-height: 1;
}

#gform_wrapper_'.$form_id.' .gfield .mdc-text-field--textarea .charleft {
	left: auto;
	right: 16px;
	position: absolute;
	bottom: 13px;
	font-family: Roboto,sans-serif;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	font-size: .75rem;
	line-height: 1.25rem;
	font-weight: 400;
	letter-spacing: .0333333333em;
	text-decoration: inherit;
	text-transform: inherit;
	display: block;
	margin-top: 0;
	line-height: normal;
	margin-left: auto;
	margin-right: 0;
	padding-left: 16px;
	padding-right: 0;
	white-space: nowrap;
	width: auto !important;
}

#gform_wrapper_'.$form_id.' .gfield .stla-charleft textarea {
	margin-bottom: 40px !important;
}

#gform_wrapper_'.$form_id.' .gfield .mdc-text-field__input {
	background:none;
}

#gform_wrapper_'.$form_id.' ul.gform_fields li.gfield .mdc-select.mdc-select--outlined{
  display: inline-flex;
  height: 56px;
}

#gform_wrapper_'.$form_id.' ul.gform_fields li.gfield .mdc-select--outlined .mdc-select__native-control,
#gform_wrapper_'.$form_id.' ul.gform_fields li.gfield .mdc-select--outlined .mdc-select__selected-text {
  display: flex;
  border: none;
  background-color: transparent;
  z-index: 1;
  padding: 12px 16px 14px;
}

#gform_wrapper_'.$form_id.' ul.gform_fields .mdc-notched-outline .mdc-floating-label{
  white-space: nowrap;
}
#gform_wrapper_'.$form_id.' ul.gform_fields .mdc-text-field--outlined .mdc-text-field__input{
  padding: 12px 16px 14px;
}
#gform_wrapper_'.$form_id.' ul.gform_fields .mdc-text-field__input,
#gform_wrapper_'.$form_id.' ul.gform_fields .mdc-select__native-control{
  padding: 20px 16px 6px;
}
#gform_wrapper_'.$form_id.' ul.gform_fields .ginput_container_address .mdc-text-field,
#gform_wrapper_'.$form_id.' ul.gform_fields .ginput_container_address .mdc-select--outlined{
  margin-bottom: 16px;
}
#gform_wrapper_'.$form_id.'.gform_wrapper .field_sublabel_above .ginput_complex.ginput_container label,
#gform_wrapper_'.$form_id.'.gform_wrapper .field_sublabel_above div[class*=gfield_date_].ginput_container label, #gform_wrapper_'.$form_id.'.gform_wrapper .field_sublabel_above div[class*=gfield_time_].ginput_container label, #gform_wrapper_'.$form_id.'.gform_wrapper .field_sublabel_below .ginput_complex.ginput_container label,
#gform_wrapper_'.$form_id.'.gform_wrapper .field_sublabel_below div[class*=gfield_date_].ginput_container label, #gform_wrapper_'.$form_id.'.gform_wrapper .field_sublabel_below div[class*=gfield_time_].ginput_container label{
  display: inline-block;
  font-size: 1em;

}



.gform_wrapper .field_sublabel_above .ginput_complex.ginput_container .mdc-notched-outline label,
.gform_wrapper .field_sublabel_above div[class*=gfield_time_].ginput_container .mdc-notched-outline label{
  margin-top: 0px;
}
#gform_wrapper_'.$form_id.'.gform_wrapper .gfield_date_day,
#gform_wrapper_'.$form_id.'.gform_wrapper .gfield_date_year{
  display: inline-flex;
}
#gform_wrapper_'.$form_id.'.gform_wrapper .gfield .ginput_container_singleproduct .mdc-notched-outline .ginput_quantity_label.mdc-floating-label{
  line-height: 1;
  margin: 0px;
}

#gform_wrapper_'.$form_id.'.gform_wrapper .ginput_container_creditcard .ginput_full {
	margin-bottom: 10px;
}

@media all and ( max-width:768px ) {
	#gform_wrapper_'.$form_id.' .mdc-text-field, #gform_wrapper_'.$form_id.' .mdc-select {
        width:100%;
	}
    #gform_wrapper_'.$form_id.' .ginput_container .gfield_required {
        display:inline;
    }
}';

// setting background color to transparent for inputs
if ( isset( $stla_options['text-fields']['background-color'] ) ) {
echo 'body #gform_wrapper_'.$form_id.'.gform_wrapper .gform_body .gform_fields .gfield input[type=text],
	body #gform_wrapper_'.$form_id.'.gform_wrapper .gform_body .gform_fields .gfield input[type=email],
	body #gform_wrapper_'.$form_id.'.gform_wrapper .gform_body .gform_fields .gfield input[type=tel],
	body #gform_wrapper_'.$form_id.'.gform_wrapper .gform_body .gform_fields .gfield input[type=url],
	body #gform_wrapper_'.$form_id.'.gform_wrapper .gform_body .gform_fields .gfield input[type=password]
	{
		background-color: transparent !important;
	}';
}

if ( isset( $stla_options['text-fields']['background-color'] ) ) {
	echo 'body #gform_wrapper_'.$form_id.'.gform_wrapper .gform_body .gform_fields select {
		background-color: transparent !important;
	}';
}



// Applying Background color to contianers

if ( isset( $stla_options['text-fields']['background-color'] ) ) {
	echo 'body #gform_wrapper_'.$form_id.'.gform_wrapper .gform_body .gform_fields .mdc-text-field {
		background-color: '.$stla_options['text-fields']['background-color'] .';
	}';
}

if ( isset( $stla_options['dropdown-fields']['background-color'] ) ) {
	echo 'body #gform_wrapper_'.$form_id.'.gform_wrapper .gform_body .gform_fields .mdc-select {
		background-color: '.$stla_options['dropdown-fields']['background-color'] .';
	}';
}


echo '</style> ';



//   #gform_wrapper_'.$form_id.' .gform_fields .stla-mat-top-label{
// 	position: static;
//     transform: translateY(100%) scale(1);
//   }

// #gform_wrapper_'.$form_id.'.gform_wrapper .gfield .gfield_label_before_complex {
// 	margin-bottom: 16px;
// }

// #gform_wrapper_'.$form_id.'.gform_wrapper .top_label div.ginput_container{
// 	margin-top: 16px;
// }

// #gform_wrapper_'.$form_id.'.gform_wrapper .gfield .ginput_container_singleproduct{
// 	margin-top: 16px;
// }