/* Mixins
================================================== */
/* Breakpoints
================================================== */
/* Color
================================================== */
/* Labels
================================================== */
label,
legend,
.label,
.legend {
  display: inline-block;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

label.error {
  color: coral;
}

/* reset (iOS will turn these blue!
================================================== */
input, select, textarea, button {
  color: #000;
}
input:focus, select:focus, textarea:focus, button:focus {
  outline: none;
}

/* All fields
================================================== */
.fieldstyle, select, input[type=text],
input[type=email],
input[type=search],
input[type=date],
input[type=tel],
input[type=number],
input[type=password],
textarea {
  outline: 0;
  box-shadow: none;
  border: none;
  border-bottom: solid 1px;
  border-radius: 0;
  background-color: #fff;
  font-size: 0.9em;
  padding: 0.25em 0;
  outline: none;
  margin: 0;
  display: inline-block;
  position: relative;
  -ms-box-sizing: border-box;
  -o-box-sizing: border-box;
  box-sizing: border-box;
  transition: background-color 0.5s;
  -webkit-appearance: none;
  -moz-appearance: none;
  -o-appearance: none;
  appearance: none;
}
.fieldstyle:focus, select:focus, input[type=text]:focus,
input[type=email]:focus,
input[type=search]:focus,
input[type=date]:focus,
input[type=tel]:focus,
input[type=number]:focus,
input[type=password]:focus,
textarea:focus {
  outline: none !important;
}

.fieldstyle.error, select.error, input.error[type=text],
input.error[type=email],
input.error[type=search],
input.error[type=date],
input.error[type=tel],
input.error[type=number],
input.error[type=password],
textarea.error {
  border-color: coral;
}

.fieldstyle.valid, select.valid, input.valid[type=text],
input.valid[type=email],
input.valid[type=search],
input.valid[type=date],
input.valid[type=tel],
input.valid[type=number],
input.valid[type=password],
textarea.valid {
  border-color: green;
}

/* Input & textarea
================================================== */
textarea {
  resize: vertical;
  min-height: 6em;
}

/* Checkboxes  & Radio buttons
================================================== */
.checkradio, .checkboxes,
.radios {
  display: inline-block;
  padding: 0;
  position: relative;
}
.checkradio input, .checkboxes input,
.radios input {
  display: inline-block;
  visibility: hidden;
  width: 0;
  height: 0;
}
.checkradio label, .checkboxes label,
.radios label {
  display: inline-block;
  width: auto;
  padding: 0 0 0 24px;
  height: auto;
  margin: 0 19px 0 0;
  position: relative;
  font-weight: normal;
  cursor: pointer;
}
.checkradio label:before, .checkboxes label:before,
.radios label:before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 0;
  left: 0;
  display: inline-block;
  border: solid 1px;
  background: #fff;
  margin-right: 6px;
  cursor: pointer;
}

.checkradio.vert > input, .vert.checkboxes > input,
.vert.radios > input, .checkradio.vert label, .vert.checkboxes label,
.vert.radios label {
  display: block;
}

.checkboxes input[type=checkbox]:checked + label:after {
  position: absolute;
  top: 0;
  height: 18px;
  line-height: 18px;
  text-align: center;
  width: 18px;
  left: 0;
  background: url(../../images/icons/check.svg) center center no-repeat;
  -ms-background-size: contain;
  background-size: contain;
  content: "";
}

.radios label:before {
  border-radius: 100%;
  /*
  		.box { 
  			@include border-radius(100%);
  		}
  */
}
.radios input[type=radio]:checked + label:after {
  position: absolute;
  top: 4px;
  height: 10px;
  width: 10px;
  left: 4px;
  content: "";
  display: block;
  background: #000;
  border-radius: 100%;
}

.checkboxes.toggle {
  border: solid 1px #ccc;
  padding: 0;
  position: relative;
  width: 100px;
  height: 40px;
  line-height: 40px;
  padding: 0;
  margin-bottom: 20px;
}
.checkboxes.toggle > label {
  top: 0;
  margin: 0;
  padding: 0;
  text-align: left;
  position: absolute;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 20;
  background: #ccc;
}
.checkboxes.toggle span {
  display: block;
  vertical-align: middle;
  width: 50%;
  position: absolute;
  height: 100%;
  line-height: 40px;
  text-align: center;
  color: #fff;
}
.checkboxes.toggle > label:before {
  position: absolute;
  text-indent: -9999px;
  height: 100%;
  width: 50%;
  border: none;
  top: 0;
  left: 0;
  margin: 0;
  transition: 0.5s;
  z-index: 30;
}
.checkboxes.toggle > label:after {
  display: block;
  width: 100%;
  height: 100%;
  background: coral;
  content: "";
  top: 0;
  left: 0;
  position: absolute;
  opacity: 0;
  z-index: -10;
  transition: 0.5s;
}
.checkboxes.toggle > input[type=checkbox]:checked + label:before {
  left: 50%;
  background: #fff;
}
.checkboxes.toggle > input[type=checkbox]:checked + label:after {
  display: block;
  width: 100%;
  height: 100%;
  background: green;
  content: "";
  top: 0;
  left: 0;
  position: absolute;
  z-index: -10;
  opacity: 1;
}

.radios.toggle {
  border: solid 1px #ddd;
  display: table;
}
.radios.toggle > label {
  display: table-cell;
  padding: 1em;
  border-right: solid 1px #ddd;
  margin: 0;
  position: relative;
}
.radios.toggle > label span {
  display: inline-block;
  vertical-align: middle;
}
.radios.toggle > label:last-child {
  border-right: none;
}
.radios.toggle label:before {
  display: none;
}
.radios.toggle input[type=radio]:checked {
  visibility: hidden;
}
.radios.toggle input[type=radio]:checked + label {
  color: #fff;
}
.radios.toggle input[type=radio]:checked + label:after {
  position: absolute;
  top: 0;
  height: 100%;
  width: 100%;
  left: 0;
  content: "";
  display: block !important;
  background: #ddd;
  border-radius: 0;
  z-index: -10;
}

/* Select

	Ref: https://select2.org/
================================================== */
select {
  cursor: pointer;
}

select[multiple] {
  background-image: none;
}

select option {
  color: #000 !important;
  background-color: #FFF !important;
}

/* Autofill text
================================================== */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  background: transparent !important;
  -webkit-box-shadow: 0 0 0px 1000px #eee inset;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-transition: background-color 5000s ease-in-out 0s;
  transition: background-color 5000s ease-in-out 0s;
}

/* Ninja forms
================================================== */
.nf-form-fields-required {
  display: none !important;
}

.smartplaceholder .nf-field-label {
  top: 2.5em;
  position: relative;
  transition: 0.5s;
  pointer-events: none;
  z-index: 1;
}
.smartplaceholder .nf-field-label.active {
  top: 0;
}

/* Messages
================================================== */
.msg {
  padding: 0.5em 1em;
  border-radius: 0;
  margin: 1em 0;
}
.msg > * {
  color: #fff;
  display: inline-block;
  vertical-align: middle;
}

.msg.success {
  background-color: green;
}

.msg.error {
  background-color: coral;
}

.msg.waiting {
  background-color: goldenrod;
}

.msg .preloader-animation {
  margin-right: 1em;
  margin-bottom: 0.5em;
  margin-top: 0.5em;
}











form {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.fieldstyle, select, input[type=text], input[type=email], input[type=search], input[type=date], input[type=tel], input[type=number], input[type=password], textarea {
  width: calc(50% - 1em);
  margin: 1em 0;
}
input[type=text].full-width {
  width: 100%;
}
.submit-wrap {
  text-align: right;
  width: 100%;

}

@media (max-width:500px){
  .fieldstyle, select, input[type=text], input[type=email], input[type=search], input[type=date], input[type=tel], input[type=number], input[type=password], textarea {
    width: 100%;
    margin: 1em 0;
  } 
}