/*
 * Gravity Forms in the theme's form styling.
 *
 * The rules mirror the Contact Form 7 rules in frontend.css, so the forms look
 * the way they did. Gravity Forms' own CSS is turned off
 * (see includes/plugins/gravityforms/markup.php).
 */

/* Things Gravity Forms normally hides with its own CSS */
.twentyfour-gform .gform_heading,
.twentyfour-gform .gform_validation_container,
.twentyfour-gform .gform_hidden,
.twentyfour-gform .gfield--type-hidden,
.twentyfour-gform .gform_ajax_frame {
  display: none !important;
}
.twentyfour-gform .hidden_label .gfield_label,
.twentyfour-gform .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Layout: the wrapper takes the place of the CF7 form's outer .col-12 */
.twentyfour-gform {
  width: 100%;
  padding: 0 15px;
}
.twentyfour-gform .gform_fields {
  margin-left: -15px;
  margin-right: -15px;
}
.twentyfour-gform .gfield {
  position: relative;
  padding: 19px 15px 10px;
}
.twentyfour-gform .gfield--type-textarea {
  padding-top: 17px;
  padding-bottom: 17px;
}
.twentyfour-gform .gfield--type-turnstile {
  padding-top: 0;
  padding-bottom: 0;
}
.twentyfour-gform .ginput_container {
  width: 100%;
}
.twentyfour-gform textarea.html24-input {
  display: block;
  padding-top: 1rem;
  resize: vertical;
}

/* Submit button, in the place of the CF7 form's last column */
.twentyfour-gform .gform_footer {
  display: flow-root; /* contains the floated .submit-box */
  position: relative;
  width: 100%;
  padding: 0;
}
@media screen and (min-width: 768px) {
  .twentyfour-gform .gform_footer {
    width: calc((100% + 30px) * 0.416667 - 30px);
  }
}
@media screen and (max-width: 767px) {
  .twentyfour-gform .gform_footer {
    margin: 1rem 0 0;
  }
}
.twentyfour-gform .gform_ajax_spinner,
.twentyfour-gform .gform-loader {
  position: absolute;
  top: 10px;
  right: 15px;
  width: 30px;
  height: 30px;
  z-index: 99;
}

/* The handwritten note next to the button */
.footer-form-wrapper .twentyfour-gform .gform_footer::after {
  padding: 0 0 0 53px;
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  line-height: 2rem;
  content: 'Bare rolig, det er helt uforpligtende.';
  width: 180%;
  height: 40px;
  position: absolute;
  bottom: 10px;
  left: 105%;
  transform: rotate(-7deg);
  background: url("../img/handwriting-arrow.png") no-repeat;
  background-position: left -20px;
  background-size: contain;
  color: #1b1919;
}
html[lang='en-US'] .footer-form-wrapper .twentyfour-gform .gform_footer::after {
  content: 'Don’t worry - it’s completely without obligation.';
}
@media screen and (max-width: 767px) {
  .footer-form-wrapper .twentyfour-gform .gform_footer::after {
    display: none;
  }
}
@media screen and (min-width: 768px) {
  .footer-form-wrapper .twentyfour-gform .gform_footer::after {
    font-size: 1.8rem;
    line-height: 1.8rem;
    bottom: 10px;
  }
}
@media screen and (min-width: 1255px) {
  .footer-form-wrapper .twentyfour-gform .gform_footer::after {
    font-size: 2.3rem;
    line-height: 2.5rem;
    bottom: 18px;
  }
}

/* Messages */
.twentyfour-gform .gfield_validation_message,
.twentyfour-gform .validation_message {
  margin: 10px 0 0 15px;
  padding: 0.2em 0.4em;
  font-family: 'proxima-soft' !important;
  font-weight: 400;
  font-size: 1.6rem;
  color: #f7214f;
}
.twentyfour-gform .gform_validation_errors,
.gform_confirmation_wrapper .gform_confirmation_message {
  margin: 20px 0 0 20px;
  font-family: 'proxima-soft';
  font-weight: 500;
  font-size: 1.6rem;
}
.twentyfour-gform .gform_validation_errors,
.twentyfour-gform .gform_validation_errors h2 {
  font-family: 'proxima-soft' !important;
  font-weight: 400;
  font-size: 1.6rem;
  color: #f7214f;
}
.twentyfour-gform .gform_validation_errors h2 {
  margin: 0;
}
.twentyfour-gform .gform_validation_errors .gform-icon,
.twentyfour-gform .gform_validation_errors ol {
  display: none;
}

/* The contact call to action section shows three fields in a row and no note */
.contact-cta .content-wrapper .contact-form-section .twentyfour-gform .gform_footer::after {
  content: none;
}
@media screen and (min-width: 767px) {
  .contact-cta .content-wrapper .contact-form-section .twentyfour-gform .col-md-5,
  .contact-cta .content-wrapper .contact-form-section .twentyfour-gform .gform_footer {
    -ms-flex: 0 0 33.333333%;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}
