/*
 * Gravity Forms in blog posts (e.g. the gated AEO cheat-sheet download).
 *
 * Plain CSS, not compiled: loaded on single posts after library/css/style.css
 * (see bones_scripts_and_styles in functions.php). It mirrors the Contact page
 * form styles (.page-template-contact .contact-hero .gravity-theme in
 * library/scss/breakpoints/_base.scss and _768up.scss), so update both together.
 *
 * .single-post is part of every selector so these outrank Gravity Forms' own
 * label styles, as the Contact page selectors do.
 */

/* Form panel */
.single-post .single-content .gravity-theme {
  margin: calc(var(--space) * 2) 0;
  padding: 32px 24px;
  background-color: #F6F6F6;
}

.single-post .single-content .gravity-theme .gform_required_legend {
  display: none;
}

/* Labels. Fields with several inputs (e.g. consent) use a legend instead. */
.single-post .single-content .gravity-theme label,
.single-post .single-content .gravity-theme legend.gfield_label {
  font-weight: 400;
  font-size: 18px;
  line-height: 1.1;
  color: #191724;
}

.single-post .single-content .gravity-theme label .gfield_required,
.single-post .single-content .gravity-theme legend.gfield_label .gfield_required {
  padding-inline-start: 0;
  color: #191724;
}

/* Inputs */
.single-post .single-content .gravity-theme input,
.single-post .single-content .gravity-theme textarea {
  border: none;
  border-radius: 6px;
  font-size: 18px !important;
  padding: 8px 12px 3px !important;
}

.single-post .single-content .gravity-theme textarea {
  padding: 12px !important;
}

.single-post .single-content .gravity-theme input::placeholder,
.single-post .single-content .gravity-theme textarea::placeholder {
  color: #A4A4A4;
}

/* Submit button (markup from chaptr_gform_submit_button in functions.php).
   Unlike the Contact form's "Submit", button text here can be long enough to
   wrap on phones, so the height grows with it. */
.single-post .single-content .gravity-theme button.btn {
  position: relative;
  height: auto !important;
  margin-top: 28px;
  margin-left: auto;
  padding: 15px 27px 13px !important;
  border: 0;
  border-radius: 96px;
  background-color: #191724;
  color: #fff;
  font-size: 18px !important;
  line-height: 1;
  text-transform: capitalize;
  -webkit-appearance: auto;
  transition: all 0.2s linear;
}

.single-post .single-content .gravity-theme button.btn:after {
  content: "";
  position: absolute;
  top: 18px;
  right: 24px;
  width: 10px;
  height: 10px;
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.33647 2.84L1.17647 10L0 8.82353L7.16 1.66353L0.849412 1.66353L0.849412 0H10V9.15059H8.33647V2.84Z' fill='white'/%3E%3C/svg%3E%0A");
  transition: all 0.2s linear;
}

.single-post .single-content .gravity-theme button.btn:hover {
  padding: 15px 34px 13px 20px !important;
}

.single-post .single-content .gravity-theme button.btn:hover:after {
  right: 20px;
  opacity: 1;
}

/* Privacy note: an HTML field with the CSS class "privacy" */
.single-post .single-content .gravity-theme .privacy {
  max-width: 300px;
  margin-top: 28px;
  color: #A4A4A4;
  font-size: 16px;
  line-height: 1.4;
}

.single-post .single-content .gravity-theme .privacy a {
  color: #A4A4A4;
  text-decoration: underline;
}

/* Confirmation (thank-you) message */
.single-post .single-content .gravity-theme.gform_confirmation_wrapper {
  height: fit-content;
}

.single-post .single-content .gravity-theme.gform_confirmation_wrapper h3 {
  margin: 0; /* post headings otherwise get large margins */
  color: #191724;
  font-size: 32px;
  line-height: 1.2;
}

.single-post .single-content .gravity-theme.gform_confirmation_wrapper p {
  margin-top: 20px;
  margin-bottom: 0;
  color: #A4A4A4;
  font-size: 18px;
  line-height: 1.4;
}

/* Download button with an arrow that slides in on hover */
.single-post .single-content .gravity-theme.gform_confirmation_wrapper a {
  position: relative;
  z-index: 10;
  display: inline-block;
  margin-top: 28px;
  padding: 16px 27px 12px;
  border-radius: 50px;
  background-color: #191724;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  text-transform: capitalize;
  cursor: pointer;
  transition: all 0.2s linear;
}

.single-post .single-content .gravity-theme.gform_confirmation_wrapper a svg {
  position: absolute;
  top: 50%;
  right: 24px;
  opacity: 0;
  transform: translateY(-50%);
  transition: all 0.2s linear;
}

.single-post .single-content .gravity-theme.gform_confirmation_wrapper a svg path {
  fill: #fff !important;
  transition: all 0.3s linear;
}

@media (hover: hover) and (pointer: fine) {
  .single-post .single-content .gravity-theme.gform_confirmation_wrapper a:hover {
    padding-right: 34px !important;
    padding-left: 20px !important;
  }

  .single-post .single-content .gravity-theme.gform_confirmation_wrapper a:hover svg {
    right: 20px;
    opacity: 1;
  }
}

/* Tablet and up */
@media only screen and (min-width: 768px) {
  .single-post .single-content .gravity-theme {
    padding: 36px 36px 60px;
  }

  .single-post .single-content .gravity-theme input,
  .single-post .single-content .gravity-theme textarea {
    font-size: 21px !important;
    padding: 18px 20px 13px !important;
  }

  .single-post .single-content .gravity-theme textarea {
    padding: 20px !important;
  }
}
