
/* Expert Contact Widget frontend styles - v1.3.0 */
.ecw-card,
.ecw-modal,
.ecw-modal * {
  box-sizing: border-box;
}

/* Remove theme sidebar padding/background around this widget so the card reaches the widget edges. */
.widget_ecw_widget,
.widget.widget_ecw_widget,
[id^="ecw_widget-"].widget {
  padding: 0 !important;
  margin-top: 0;
  overflow: hidden;
  background: transparent !important;
  border: 0 !important;
}
.widget_ecw_widget > :first-child,
[id^="ecw_widget-"].widget > :first-child {
  margin-top: 0 !important;
}

/* Sidebar expert card */
.ecw-card {
  width: 100%;
  max-width: none;
  margin: 0 !important;
  min-height: 330px;
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-color: #005680;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
}
.ecw-card--has-bg {
  background-position: center;
  background-size: cover;
}
.ecw-avatar-ring {
  width: 122px;
  height: 122px;
  margin: 0 auto 18px;
  border: 4px solid #fff;
  border-radius: 50%;
  position: relative;
  flex: 0 0 122px;
  overflow: visible;
  background: #e8eef2;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.ecw-avatar-ring__img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  border-radius: 50% !important;
  object-fit: cover;
  object-position: center;
}
.ecw-centered__name {
  margin: 0 0 5px;
  color: #fff;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}
.ecw-centered__pos {
  margin: 0 0 22px;
  color: rgba(255,255,255,.86);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
}

/* Buttons - explicit icon sizing prevents theme SVG rules from exploding icons */
.ecw-btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  color: #fff !important;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  transition: opacity .18s ease, transform .18s ease;
}
.ecw-btn:hover,
.ecw-btn:focus {
  color: #fff !important;
  opacity: .94;
  transform: translateY(-1px);
}
.ecw-btn:disabled {
  opacity: .55;
  cursor: wait;
  transform: none;
}
.ecw-btn svg {
  display: block;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px;
  max-width: 22px !important;
  max-height: 22px !important;
  flex: 0 0 22px;
}
.ecw-btn--cta,
.ecw-form__submit {
  width: 100%;
  min-height: 56px;
  padding: 15px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  background: #ED1C24;
  font-size: 15px;
}

/* Modal */
body.ecw-modal-open {
  overflow: hidden;
}
.ecw-modal {
  display: none !important;
  position: fixed;
  inset: 0;
  /* Keep the ECW modal above the theme header (≈10040), but below Google's
     reCAPTCHA challenge layer. A very large modal z-index can cover the
     challenge iframe on some browsers/themes. */
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.ecw-modal.is-open,
.ecw-modal.is-active,
.ecw-modal.ecw-modal--open,
.ecw-modal[aria-hidden="false"] {
  display: flex !important;
}
.ecw-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 28, 42, .62);
  cursor: pointer;
}
.ecw-sheet {
  width: min(620px, 100%);
  max-height: min(90vh, 820px);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  color: #111827;
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
}
.ecw-sheet__header {
  min-height: 74px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e4e8ee;
}
.ecw-sheet__title {
  margin: 0 !important;
  color: #005680 !important;
  font-size: 26px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
}
.ecw-sheet__close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: #f4f6f8;
  color: #005680;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}
.ecw-sheet__body {
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ecw-sheet__expert {
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.ecw-sheet__expert > img {
  display: block;
  width: 62px !important;
  height: 62px !important;
  max-width: 62px !important;
  border-radius: 50% !important;
  object-fit: cover;
  object-position: center;
}
.ecw-sheet__expert-name {
  color: #111827;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
}
.ecw-sheet__expert-pos {
  margin-top: 3px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.35;
}

/* Form */
.ecw-form {
  margin: 0;
}
.ecw-form__group {
  margin: 0 0 17px;
}
.ecw-form__label {
  display: block;
  margin: 0 0 7px;
  color: #26384a;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}
.ecw-form__input,
.ecw-form__textarea {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid #d7dee7 !important;
  border-radius: 0 !important;
  outline: 0;
  background: #fff !important;
  color: #111827 !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 15px !important;
  line-height: 1.45;
}
.ecw-form__input {
  min-height: 48px;
}
.ecw-form__textarea {
  min-height: 132px;
  resize: vertical;
}
.ecw-form__input::placeholder,
.ecw-form__textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}
.ecw-form__input:focus,
.ecw-form__textarea:focus {
  border-color: #005680 !important;
}
.ecw-form__hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.ecw-form__submit {
  margin-top: 4px;
}
.ecw-form__status {
  min-height: 0;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.ecw-form__status:empty {
  display: none;
}
.ecw-form__status.is-success {
  padding: 10px 12px;
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.ecw-form__status.is-error {
  padding: 10px 12px;
  background: #fff1f2;
  color: #b91c1c;
  border: 1px solid #fecdd3;
}

/* reCAPTCHA v2 checkbox. Google is lazy-loaded after a valid email is entered. */
.ecw-recaptcha-wrap {
  width: 100%;
  min-height: 78px;
  margin: 2px 0 15px;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.ecw-recaptcha-wrap.is-ready {
  display: flex;
}
.ecw-recaptcha {
  min-height: 78px;
}

@media (max-width: 600px) {
  .ecw-card {
    min-height: 300px;
    padding: 22px 20px 22px;
  }
  .ecw-avatar-ring {
    width: 108px;
    height: 108px;
    flex-basis: 108px;
  }
  .ecw-centered__name {
    font-size: 20px;
  }
  .ecw-modal {
    padding: 0;
    align-items: flex-end;
  }
  .ecw-sheet {
    width: 100%;
    max-height: 94vh;
  }
  .ecw-sheet__header {
    padding: 17px 18px;
  }
  .ecw-sheet__title {
    font-size: 22px !important;
  }
  .ecw-sheet__body {
    padding: 19px 18px 22px;
  }
}

@media (max-width: 350px) {
  .ecw-recaptcha-wrap {
    min-height: 70px;
  }
  .ecw-recaptcha {
    transform: scale(.88);
    transform-origin: center center;
  }
}


/* reCAPTCHA challenge layer - v4.1.6.
   Raise the whole Google body-level wrapper where :has() is supported. */
body > div:has(iframe[src*="/recaptcha/api2/bframe"]),
body > div:has(iframe[src*="/recaptcha/enterprise/bframe"]),
body > div:has(iframe[title*="recaptcha challenge" i]),
iframe[src*="/recaptcha/api2/bframe"],
iframe[src*="/recaptcha/enterprise/bframe"],
iframe[title*="recaptcha challenge" i] {
  z-index: 2147483647 !important;
}


/* reCAPTCHA stacking-context compatibility - v4.1.7.
   The TLC child theme moves fixed sidebar dialogs to <body> and assigns
   .tlc-sidebar-popup-detached z-index:2147483001!important. That is above
   Google's own reCAPTCHA challenge layer (~2,000,000,000), so the image
   challenge appears behind the Expert Contact sheet. Keep ECW above the
   site header, but explicitly below Google's challenge. The compound selector
   has higher specificity than the child-theme helper even if its CSS loads later. */
.ecw-modal.tlc-sidebar-popup-detached,
.ecw-modal.tlc-sidebar-popup-detached[aria-hidden="false"],
body .ecw-modal.tlc-sidebar-popup-detached {
  z-index: 100000 !important;
}


/* reCAPTCHA/body-root compatibility - v4.1.8.
   JS now moves ECW directly under <body> and removes the TLC sidebar helper
   class before opening. Keep this selector as a defensive fallback only. */
body > .ecw-modal {
  z-index: 100000 !important;
}
body > .ecw-modal.tlc-sidebar-popup-detached {
  z-index: 100000 !important;
}
