/* xGrowth Contact Popup */
.xg-popup-overlay {
  --xg-pop-navy: #16183A;
  --xg-pop-red: #FD625E;
  --xg-pop-ink: #1A1B2E;
  --xg-pop-muted: #5F6178;
  --xg-pop-faint: #8B8D9F;
  --xg-pop-border: #E5E2DC;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(22, 24, 58, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--xg-pop-ink);
}
.xg-popup-overlay * { box-sizing: border-box; }
.xg-popup-overlay.is-visible { display: flex !important; opacity: 1 !important; }
.xg-popup-card {
  background: #fff;
  border-radius: 8px;
  padding: 48px 48px 36px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  position: relative;
  margin: auto;
  transform: translateY(12px);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.xg-popup-overlay.is-visible .xg-popup-card { transform: translateY(0); }
.xg-popup-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  color: var(--xg-pop-faint);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .2s ease, color .2s ease;
}
.xg-popup-close:hover { background: rgba(22, 24, 58, 0.06); color: var(--xg-pop-navy); }
.xg-popup-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.xg-popup__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--xg-pop-red); margin-bottom: 12px; }
.xg-popup__title { font-size: 28px; font-weight: 800; color: var(--xg-pop-navy); line-height: 1.15; letter-spacing: -0.5px; margin: 0 0 12px; }
.xg-popup__sub { font-size: 15px; color: var(--xg-pop-muted); line-height: 1.6; margin: 0 0 28px; }
.xg-popup__form { display: flex; flex-direction: column; gap: 14px; }
.xg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.xg-field { display: flex; flex-direction: column; gap: 6px; }
.xg-field label { font-size: 12px; font-weight: 600; color: var(--xg-pop-navy); letter-spacing: 0.3px; display: flex; align-items: center; justify-content: space-between; }
.xg-field__optional { font-size: 10px; font-weight: 500; letter-spacing: 0.10em; text-transform: uppercase; color: var(--xg-pop-faint); }
.xg-field input,
.xg-field textarea {
  height: 44px;
  border: 1.5px solid var(--xg-pop-border);
  border-radius: 6px;
  padding: 0 14px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--xg-pop-navy);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}
.xg-field textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.xg-field input::placeholder,
.xg-field textarea::placeholder { color: #B0B2C2; }
.xg-field input:focus,
.xg-field textarea:focus { border-color: #d90040 !important; }
.xg-field.has-error input,
.xg-field.has-error textarea { border-color: var(--xg-pop-red); background: rgba(253, 98, 94, 0.04); }
.xg-field__error { display: none; font-size: 12px; color: var(--xg-pop-red); margin-top: 2px; }
.xg-field.has-error .xg-field__error { display: block; }
.xg-popup__check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; margin-top: 4px; user-select: none; }
.xg-check__input { position: absolute; opacity: 0; pointer-events: none; }
.xg-check__box {
  width: 18px; height: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--xg-pop-border);
  border-radius: 4px;
  background: #fff;
  margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease;
}
.xg-check__check {
  width: 11px; height: 11px;
  fill: none; stroke: #fff; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transform: scale(0.7);
  transition: opacity .15s ease, transform .15s ease;
}
.xg-check__input:checked ~ .xg-check__box { background: var(--xg-pop-red); border-color: var(--xg-pop-red); }
.xg-check__input:checked ~ .xg-check__box .xg-check__check { opacity: 1; transform: scale(1); }
.xg-popup__check:hover .xg-check__box { border-color: var(--xg-pop-faint); }
.xg-check__label { font-size: 13px; color: var(--xg-pop-navy); line-height: 1.5; }
.xg-check__label strong { font-weight: 600; }
.xg-check__label small { display: block; color: var(--xg-pop-muted); font-size: 12px; margin-top: 1px; }
.xg-popup__submit {
  width: 100%;
  height: 48px;
  background: #d90040 !important;
  color: white;
  border: none;
  border-radius: 40px;
  font-size: 15px; font-weight: 700; font-family: 'Inter', sans-serif;
  cursor: pointer;
  margin-top: 12px;
  transition: opacity 0.2s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.xg-popup__submit:hover { opacity: 0.85; }
.xg-popup__submit:disabled { opacity: 0.5; cursor: not-allowed; }
.xg-popup__submit svg { width: 14px; height: 14px; }
.xg-popup__privacy {
  font-size: 11px;
  color: var(--xg-pop-muted);
  margin: 20px 0 0;
  line-height: 1.5;
  border-top: 1px solid var(--xg-pop-border);
  padding-top: 16px;
  text-align: center;
}
.xg-popup__privacy a { color: var(--xg-pop-navy); text-decoration: underline; text-decoration-color: rgba(22, 24, 58, 0.3); text-underline-offset: 2px; }
.xg-popup__privacy a:hover { text-decoration-color: var(--xg-pop-navy); }
.xg-popup__success { display: none; text-align: center; padding: 24px 4px; }
.xg-popup__success.is-visible { display: block; }
.xg-success__icon {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(253, 98, 94, 0.10);
  display: inline-flex; align-items: center; justify-content: center;
}
.xg-success__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--xg-pop-red); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.xg-success__title { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; color: var(--xg-pop-navy); margin: 0 0 10px; }
.xg-success__text { font-size: 14px; color: var(--xg-pop-muted); line-height: 1.6; max-width: 360px; margin: 0 auto; }
@media (max-width: 640px) {
  .xg-popup-overlay { padding: 16px; align-items: flex-start; padding-top: 32px; }
  .xg-popup-card { padding: 36px 24px 28px; border-radius: 6px; }
  .xg-popup__title { font-size: 24px; }
  .xg-row { grid-template-columns: 1fr; gap: 14px; }
}
.show-contact-form { cursor: pointer; }

/* au.24: CF7 form 17012 inside the popup. Every rule is scoped under #xgContactPopup so the
   homepage theme rules (.xg-au-home ...) cannot override the .co popup styling. Values copied from xgrowth.co. */
#xgContactPopup .xg-popup-card { font-size: 15px; line-height: 1.55; color: var(--xg-pop-ink); }
#xgContactPopup .wpcf7 { margin: 0; }
#xgContactPopup .wpcf7-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
#xgContactPopup .wpcf7-form p { margin: 0; }
#xgContactPopup .xg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#xgContactPopup .xg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#xgContactPopup .xg-field label { font-size: 12px; font-weight: 600; color: var(--xg-pop-navy); letter-spacing: 0.3px; display: flex; align-items: center; justify-content: space-between; text-transform: none; margin: 0; }
#xgContactPopup .xg-field__optional { font-size: 10px; font-weight: 500; letter-spacing: 0.10em; text-transform: uppercase; color: var(--xg-pop-faint); }
#xgContactPopup .xg-field .wpcf7-form-control-wrap { display: block; }
#xgContactPopup .xg-field input:not([type="checkbox"]):not([type="submit"]):not([type="hidden"]),
#xgContactPopup .xg-field textarea {
  height: 44px;
  border: 1.5px solid var(--xg-pop-border);
  border-radius: 6px;
  padding: 0 14px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--xg-pop-navy);
  background: #fff;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  box-shadow: none;
}
#xgContactPopup .xg-field textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
#xgContactPopup .xg-field input::placeholder,
#xgContactPopup .xg-field textarea::placeholder { color: #B0B2C2; opacity: 1; }
#xgContactPopup .xg-field input:focus,
#xgContactPopup .xg-field textarea:focus { border-color: #d90040 !important; }
#xgContactPopup .xg-field .wpcf7-not-valid { border-color: var(--xg-pop-red) !important; background: rgba(253, 98, 94, 0.04) !important; }
#xgContactPopup .wpcf7-not-valid-tip { display: block; font-size: 12px; color: var(--xg-pop-red); margin-top: 2px; font-weight: 400; }

/* Newsletter checkbox: native input hidden, custom box drawn on the label (same look as .xg-popup__check). */
#xgContactPopup .xg-popup__check { position: relative; display: block; padding-left: 30px; margin: 4px 0 0; cursor: pointer; user-select: none; font-size: 13px; line-height: 1.5; color: var(--xg-pop-navy); }
#xgContactPopup .xg-popup__check .wpcf7-form-control-wrap,
#xgContactPopup .xg-popup__check .wpcf7-form-control,
#xgContactPopup .xg-popup__check .wpcf7-list-item { display: inline; margin: 0; }
#xgContactPopup .xg-popup__check input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; margin: 0; }
#xgContactPopup .xg-popup__check .wpcf7-list-item-label { margin: 0 !important; font-weight: 600; color: var(--xg-pop-navy); }
#xgContactPopup .xg-popup__check::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; box-sizing: border-box;
  border: 1.5px solid var(--xg-pop-border); border-radius: 4px; background: #fff;
  transition: background .15s ease, border-color .15s ease;
}
#xgContactPopup .xg-popup__check::after {
  content: ""; position: absolute; left: 6px; top: 4px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0);
  transition: transform .15s ease;
}
#xgContactPopup .xg-popup__check:hover::before { border-color: var(--xg-pop-faint); }
#xgContactPopup .xg-popup__check:has(input:checked)::before { background: var(--xg-pop-red); border-color: var(--xg-pop-red); }
#xgContactPopup .xg-popup__check:has(input:checked)::after { transform: rotate(45deg) scale(1); }
#xgContactPopup .xg-check__small { display: block; color: var(--xg-pop-muted); font-size: 12px; margin-top: 1px; }

/* Submit: .co primary pill button. Arrow drawn as a background image right after the label text. */
#xgContactPopup .wpcf7-submit {
  display: block; width: 100%; height: 48px; margin: 12px 0 0; padding: 0 20px;
  background-color: #d90040;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 11 L11 3 M11 3 H5 M11 3 V9' stroke='%23fff' stroke-width='1.8' stroke-linecap='square' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: calc(50% + 66px) center; background-size: 14px 14px;
  color: #fff; border: 0; border-radius: 40px; box-shadow: none;
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1;
  cursor: pointer; transition: opacity 0.2s ease;
}
#xgContactPopup .wpcf7-submit:hover { opacity: 0.85; }
#xgContactPopup .wpcf7-submit:disabled { opacity: 0.5; cursor: not-allowed; }
#xgContactPopup .wpcf7-spinner { margin: 8px auto 0; }

/* Privacy line under the form (.co .xg-popup__privacy). */
#xgContactPopup .xg-popup__privacy { font-size: 11px; color: var(--xg-pop-muted); margin: 20px 0 0; line-height: 1.5; border-top: 1px solid var(--xg-pop-border); padding-top: 16px; text-align: center; }
#xgContactPopup .xg-popup__privacy a { color: var(--xg-pop-navy); text-decoration: underline; text-decoration-color: rgba(22, 24, 58, 0.3); text-underline-offset: 2px; }
#xgContactPopup .xg-popup__privacy a:hover { text-decoration-color: var(--xg-pop-navy); }

#xgContactPopup .wpcf7-response-output { font-size: 13px; border-radius: 6px; margin: 0; }
#xgContactPopup .screen-reader-response { position: absolute; left: -9999px; }
#xgContactPopup .apbct_special_field, #xgContactPopup .hidden-fields-container { display: none !important; }

@media (max-width: 640px) {
  #xgContactPopup .xg-row { grid-template-columns: 1fr; gap: 14px; }
}

/* au.25: the homepage theme's CF7 rules use !important on inputs, the submit button and list labels.
   These overrides restore the .co values, scoped to #xgContactPopup. Spacing matches xgrowth.co. */
#xgContactPopup .xg-field input:not([type="checkbox"]):not([type="submit"]):not([type="hidden"]) { padding: 0 14px !important; background-image: none !important; height: 44px !important; font-size: 15px !important; color: var(--xg-pop-navy) !important; }
#xgContactPopup .xg-field input:focus,
#xgContactPopup .xg-field textarea:focus { background-image: none !important; }
#xgContactPopup .xg-field textarea { padding: 12px 14px !important; background-image: none !important; color: var(--xg-pop-navy) !important; }
#xgContactPopup .wpcf7-submit {
  height: 48px !important; padding: 0 20px !important;
  background-color: #d90040 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 11 L11 3 M11 3 H5 M11 3 V9' stroke='%23fff' stroke-width='1.8' stroke-linecap='square' fill='none'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: calc(50% + 66px) center !important; background-size: 14px 14px !important;
  border-radius: 40px !important; font-size: 15px !important; font-weight: 700 !important; color: #fff !important;
  text-transform: none !important; letter-spacing: 0 !important;
}
#xgContactPopup .xg-popup__check .wpcf7-list-item-label { font-size: 13px !important; padding: 0 !important; margin: 0 !important; }
#xgContactPopup .xg-popup__check .wpcf7-list-item { padding: 0 !important; }
#xgContactPopup .wpcf7-spinner { display: none !important; }
#xgContactPopup .wpcf7-response-output { margin: 0 !important; padding: 0 !important; border: 0 !important; }
#xgContactPopup .wpcf7-response-output:empty { display: none; }

/* au.26: pixel match to xgrowth.co (measured): 1px field and checkbox borders, submit label/arrow group centred as on .co. */
#xgContactPopup .xg-field input:not([type="checkbox"]):not([type="submit"]):not([type="hidden"]),
#xgContactPopup .xg-field textarea { border: 1px solid var(--xg-pop-border) !important; border-radius: 6px !important; background: #fff !important; box-shadow: none !important; }
#xgContactPopup .xg-popup__check::before { border-width: 1px !important; }
#xgContactPopup .wpcf7-submit { padding: 0 22px 0 0 !important; background-position: calc(50% + 58px) center !important; }

/* au.29: invalid fields get the .co error state (red border, light red fill). Contact Form 7's general
   error line is hidden because .co shows the per-field messages only. */
#xgContactPopup .xg-field input:not([type="checkbox"]):not([type="submit"]):not([type="hidden"]).wpcf7-not-valid,
#xgContactPopup .xg-field textarea.wpcf7-not-valid { border-color: var(--xg-pop-red) !important; background: rgba(253, 98, 94, 0.04) !important; }
#xgContactPopup form.invalid .wpcf7-response-output { display: none !important; }

/* au.32: the hidden checkbox input is 0x0, so the browser's default focus ring showed as a stray box over
   "Subscribe" after clicking the label. Suppress it on the input and show keyboard focus on the visible box. */
#xgContactPopup .xg-popup__check input[type="checkbox"] { outline: none !important; }
#xgContactPopup .xg-popup__check:has(input:focus-visible)::before { box-shadow: 0 0 0 3px rgba(217, 0, 64, 0.25); }
/* au.33: co-site.css draws a second checkbox (.wpcf7-checkbox .wpcf7-list-item-label::before/::after) on the label
   text itself, so the focus ring showed over "Subscribe". The popup draws its own box on the label, so drop the extra one. */
#xgContactPopup .xg-popup__check .wpcf7-list-item-label::before,
#xgContactPopup .xg-popup__check .wpcf7-list-item-label::after { content: none !important; display: none !important; }
