/* Prevent parent theme.js from collapsing hero slider (it sets small height on .head_panel children) */
.head_panel .slider_wrapper {
  height: auto !important;
  min-height: 60vh !important;
}

/* Hero height on mobile: 60vh (was 100vh) */
@media (max-width: 767px) {
  body .head_panel .slider_wrapper {
    min-height: 60vh !important;
    height: 60vh !important;
  }
  body .head_panel .slider_wrapper .owl-carousel,
  body .head_panel .slider_wrapper .owl-carousel .owl-stage-outer,
  body .head_panel .slider_wrapper .owl-carousel .owl-stage,
  body .head_panel .slider_wrapper .owl-carousel .owl-item {
    height: 100% !important;
    min-height: 60vh !important;
  }
  body .head_panel .stretchy_wrapper.ratio_slider {
    padding-bottom: 0 !important;
    height: 60vh !important;
    min-height: 60vh !important;
  }
  body .head_panel .slider_wrapper .owl-carousel .item {
    height: 100% !important;
    /* Force background image to zoom/cover and fit the hero area */
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
  }
  body .head_panel .slider_wrapper .owl-carousel .item .container {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
  }
  /* No top: 50% + translate(-50%) vertical center on mobile */
  body .head_panel .slider_wrapper .caption {
    top: auto !important;
    -o-transform: none !important;
    -webkit-transform: none !important;
    -ms-transform: none !important;
    transform: none !important;
  }
  /* Hero title 26px: also in functions.php wp_add_inline_style( healthflex-child-overrides ) */
  /* 3rd button black text on mobile (override any other rule) */
  body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a,
  body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a:link,
  body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a:visited {
    color: #000 !important;
  }
  /* Hero buttons stacked on mobile */
  body .head_panel .slider_wrapper .caption .inner .caption_buttons_row {
    width: 100%;
    flex-direction: column !important;
  }
  body .head_panel .slider_wrapper .caption .inner .caption_btn_wrap {
    width: 100%;
    max-width: 200px;
  }
  body .head_panel .slider_wrapper .caption .inner .caption_btn_wrap a {
    width: 100% !important;
    box-sizing: border-box;
    text-align: center !important;
  }
}

/* Theme overrides: no underline on links, primary #b7cf4c, button border, hover white */

a,
a:link,
a:visited,
a:hover,
a:focus,
a:active {
  text-decoration: none !important;
}

/* Primary/green buttons – do NOT apply to .btn-white so "button style white" works */
.btn-primary,
.btn.btn-primary,
a.btn-primary,
.skincolored_section .btn:not(.btn-white),
.skincolored_section a.btn:not(.btn-white),
.head_panel .slider_wrapper .caption .btn-primary,
.head_panel .slider_wrapper .caption a.btn:not(.btn-white) {
  background-color: #b7cf4c !important;
  border: solid 1px #b7cf4c !important;
  border-color: #b7cf4c !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
a.btn-primary:hover,
a.btn-primary:focus,
.skincolored_section .btn:not(.btn-white):hover,
.skincolored_section .btn:not(.btn-white):focus,
.skincolored_section a.btn:not(.btn-white):hover,
.skincolored_section a.btn:not(.btn-white):focus,
.head_panel .slider_wrapper .caption .btn-primary:hover,
.head_panel .slider_wrapper .caption .btn-primary:focus,
.head_panel .slider_wrapper .caption a.btn:not(.btn-white):hover,
.head_panel .slider_wrapper .caption a.btn:not(.btn-white):focus {
  background-color: #fff !important;
  border-color: #b7cf4c !important;
  color: #b7cf4c !important;
}

/* Hero: white-style button (when you choose "White" in slider) */
.head_panel .slider_wrapper .caption a.btn-white {
  background-color: #fff !important;
  border: solid 1px #b7cf4c !important;
  border-color: #b7cf4c !important;
  color: #000 !important;
}
.head_panel .slider_wrapper .caption a.btn-white:hover,
.head_panel .slider_wrapper .caption a.btn-white:focus {
  background-color: #b7cf4c !important;
  color: #fff !important;
  border-color: #b7cf4c !important;
}

/* Hero slider: force buttons in one row (inline style on .caption_buttons_row is fallback) */
.head_panel .slider_wrapper .caption .inner .caption_buttons_row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin-top: 14px !important;
}
.head_panel .slider_wrapper .caption .inner .caption_buttons_row:empty {
  display: none !important;
  margin-top: 0 !important;
}
.head_panel .slider_wrapper .caption .inner .caption_btn_wrap {
  display: block !important;
  margin-right: 0 !important;
}
/* 3rd hero button only: white background, black text */
body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a,
body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a:link,
body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a:visited,
body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a.btn,
body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a.btn-primary {
  background-color: #fff !important;
  border: solid 1px #b7cf4c !important;
  border-color: #b7cf4c !important;
  color: #000 !important;
}
body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a:hover,
body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a:focus,
body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a.btn:hover,
body .head_panel .slider_wrapper .caption .inner .caption_buttons_row .caption_btn_wrap:nth-child(3) a.btn:focus {
  background-color: #b7cf4c !important;
  color: #fff !important;
  border-color: #b7cf4c !important;
}
/* Fallback: if no wrapper, any div in .inner that contains a .btn (modern browsers) */
.head_panel .slider_wrapper .caption .inner > div:has(> a.btn) {
  display: inline-block !important;
  vertical-align: middle !important;
  margin-right: 10px !important;
}

/* Autoéval modal = same classes as exit-intent xip (see jotform-autoeval-modal.php <style>) */
#autoeval-container.xip-container {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  min-height: 100vh !important;
  z-index: 2147483000 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
#autoeval-container .xip {
  position: relative !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

@media (max-width: 767px) {
  #autoeval-container.xip-container {
    padding: 6px !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }
  #autoeval-container .xip {
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100vh - 12px) !important;
    min-height: calc(100dvh - 12px) !important;
    max-height: calc(100vh - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
    margin: 0 !important;
    padding: 46px 12px 12px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  #autoeval-container .xip-close {
    z-index: 50 !important;
    top: 12px !important;
    right: 12px !important;
  }
  #autoeval-container .xip > div:not(.xip-close)[tabindex="0"] {
    flex: 0 0 auto !important;
    display: block !important;
    overflow: visible !important;
  }
  #autoeval-container #autoeval-form-embed {
    overflow: visible !important;
  }
  #autoeval-container #autoeval-form-embed iframe {
    display: block !important;
    width: 100% !important;
    min-height: 400px !important;
    height: 700px !important;
    max-height: none !important;
    flex: 0 0 auto !important;
  }
  #autoeval-container .xip > p {
    flex-shrink: 0 !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
  }
}

