/* BestCan Site Toolkit: CTA and form styling (Mediaforce). Styling only: no fields, labels, text or behaviour change. */

/* ---------- CTA buttons ---------- */
/* Accessible brand orange (audit V3): #D42B00 with white text is 5.07:1, which passes WCAG AA at any size. */
body .et_pb_button,
body .et_pb_module .et_pb_button,
body a.et_pb_button {
  font-size: 19px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.02em !important;
  padding: 14px 28px !important;
  border: 0 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
body .et_pb_button:after { display: none !important; } /* Divi hover arrow shifted the text */
body .et_pb_button:hover,
body .et_pb_button:focus {
  background-color: #D42B00 !important;
  padding: 14px 28px !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}
body .et_pb_button:focus-visible {
  outline: 3px solid #0E2B4F !important;
  outline-offset: 3px;
}

/* ---------- Gravity Forms ---------- */
body .gform_wrapper.gravity-theme .gform_fields { row-gap: 14px !important; column-gap: 14px !important; }
body .gform_wrapper.gravity-theme input[type="text"],
body #service_banner_form .gform_wrapper.gravity-theme input[type="text"],
body #service_banner_form .gform_wrapper.gravity-theme input[type="email"],
body #service_banner_form .gform_wrapper.gravity-theme input[type="tel"],
body #service_banner_form .gform_wrapper.gravity-theme select,
body #service_banner_form .gform_wrapper.gravity-theme textarea,
body .gform_wrapper.gravity-theme input[type="email"],
body .gform_wrapper.gravity-theme input[type="tel"],
body .gform_wrapper.gravity-theme input[type="number"],
body .gform_wrapper.gravity-theme select,
body .gform_wrapper.gravity-theme textarea {
  background-color: #FFFFFF !important;
  color: #1F2933 !important;
  border: 1px solid #B8C2CC !important;
  border-radius: 4px !important;
  font-size: 16px !important; /* 16px stops phones zooming in on focus */
  line-height: 1.4 !important;
  padding: 13px 14px !important;
  min-height: 50px;
  box-shadow: none !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}
body .gform_wrapper.gravity-theme textarea { min-height: 120px; }
body .gform_wrapper.gravity-theme select { padding-right: 40px !important; text-overflow: ellipsis; }
body .gform_wrapper.gravity-theme input::placeholder,
body .gform_wrapper.gravity-theme textarea::placeholder { color: #5B6670 !important; opacity: 1; }
body .gform_wrapper.gravity-theme input:focus,
body .gform_wrapper.gravity-theme select:focus,
body .gform_wrapper.gravity-theme textarea:focus {
  border-color: #0E2B4F !important;
  box-shadow: 0 0 0 3px rgba(14, 43, 79, 0.25) !important;
  outline: none !important;
}
/* Submit: was an unstyled grey system button on several forms */
body .gform_wrapper.gravity-theme .gform_footer,
body .gform_wrapper.gravity-theme .gform_page_footer { padding-top: 10px !important; margin-top: 6px !important; justify-content: center; }
body .gform_wrapper.gravity-theme .gform_footer input[type="submit"],
body .gform_wrapper.gravity-theme .gform_footer button[type="submit"],
body .gform_wrapper.gravity-theme .gform_page_footer input[type="submit"],
body .gform_wrapper.gravity-theme input.gform_button {
  -webkit-appearance: none;
  appearance: none;
  background-color: #D42B00 !important;
  color: #FFFFFF !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2 !important;
  padding: 15px 34px !important;
  border: 0 !important;
  border-radius: 4px !important;
  width: 100% !important;
  max-width: 420px;
  min-height: 54px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: background-color .15s ease, transform .15s ease;
}
body .gform_wrapper.gravity-theme .gform_footer input[type="submit"]:hover,
body .gform_wrapper.gravity-theme input.gform_button:hover { background-color: #D42B00 !important; transform: translateY(-1px); }
body .gform_wrapper.gravity-theme .gform_footer input[type="submit"]:focus-visible,
body .gform_wrapper.gravity-theme input.gform_button:focus-visible { outline: 3px solid #0E2B4F !important; outline-offset: 3px; }
/* error state stays readable */
body .gform_wrapper.gravity-theme .gfield_error input,
body .gform_wrapper.gravity-theme .gfield_error select,
body .gform_wrapper.gravity-theme .gfield_error textarea { border-color: #C02B0A !important; }
@media (max-width: 640px) {
  body .gform_wrapper.gravity-theme .gform_footer input[type="submit"],
  body .gform_wrapper.gravity-theme input.gform_button { max-width: none; }
  body .et_pb_button { font-size: 19px !important; }
}

/* Fixed side "Get a Quote" tab in the footer layout: keep its original size so it does not cover more of the page */
body [class*="_tb_footer_wrapper"] .et_pb_button,
body [class*="_tb_footer_wrapper"] .et_pb_button:hover {
  font-size: 16px !important; font-weight: 600 !important; padding: 9px 24px 8px !important;
  border-radius: 0 !important; box-shadow: none !important; transform: none !important; letter-spacing: normal !important;
}

/* Headings: avoid a single word wrapping onto its own line */
body h1, body h2, body h3, body .et_pb_module_header { text-wrap: balance; }

/* reCAPTCHA badge: collapse to the icon so it no longer pushes the page sideways (gallery page) */
body .grecaptcha-badge { width: 70px !important; overflow: hidden !important; right: 0 !important; transition: width .3s ease !important; }
body .grecaptcha-badge:hover { width: 256px !important; }

/* Divi gallery slider: keep the arrows inside the screen on phones (basement and home additions pages) */
body .et_pb_gallery.et_pb_slider { overflow: hidden; }
@media (max-width: 767px) {
  body .et_pb_gallery .et-pb-arrow-next { right: 8px !important; }
  body .et_pb_gallery .et-pb-arrow-prev { left: 8px !important; }
}

/* Dropdowns: replace the theme's beige arrow image with a plain chevron and match the other fields' height */
body .gform_wrapper.gravity-theme select,
body #service_banner_form .gform_wrapper.gravity-theme select {
  -webkit-appearance: none !important; appearance: none !important;
  background-color: #FFFFFF !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230E2B4F' stroke-width='2'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 16px center !important; background-size: 14px 9px !important;
  height: 50px !important; min-height: 50px !important; line-height: normal !important;
}

/* Form labels shown above fields (audit V4); field settings are unchanged, this only reveals labels Gravity Forms hid visually */
body .gform_wrapper.gravity-theme .gfield.hidden_label > .gfield_label,
body .gform_wrapper.gravity-theme .gfield.hidden_label > legend.gfield_label {
  position: static !important; clip: auto !important; clip-path: none !important; width: auto !important; height: auto !important;
  overflow: visible !important; margin: 0 0 6px !important; padding: 0 !important; display: block !important;
  font-size: 14px !important; font-weight: 600 !important; line-height: 1.3 !important; color: inherit;
}

/* 1.3.0 (30 Nov 2026), Checklist Addendum 15, section 48: blog grid cards. Titles clamped to 2 lines and excerpts to
   4 lines so every card in a row has the same layout, and "read more" sits at the bottom of each card. Blog grid module only. */
@media (min-width: 768px) {
  .et_pb_blog_grid article.et_pb_post { display: flex; flex-direction: column; }
  .et_pb_blog_grid article.et_pb_post .entry-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
  .et_pb_blog_grid article.et_pb_post .post-content { flex: 1 1 auto; display: flex; flex-direction: column; }
  .et_pb_blog_grid article.et_pb_post .post-content-inner { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .et_pb_blog_grid article.et_pb_post .post-content .more-link { margin-top: auto; }
}
