html.mav-pop-open,
html.mav-pop-open body {
  overflow: hidden !important;
}

.mav-pop,
.mav-pop * {
  box-sizing: border-box;
}

.mav-pop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mav-pop__overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 39, 0.58);
  backdrop-filter: blur(4px);
}

.mav-pop__card {
  position: relative;
  width: min(820px, 100%);
  max-height: calc(100vh - 28px);
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.98);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(8, 34, 77, 0.26);
}

.mav-pop__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  color: #334155;
  font-size: 23px;
  line-height: 28px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}

.mav-pop__close:hover {
  background: #f8fafc;
  transform: scale(1.04);
}

.mav-pop__media {
  min-height: 100%;
  background: linear-gradient(145deg, #eef5fb 0%, #ffffff 100%);
  overflow: hidden;
}

.mav-pop__media img {
  width: 100%;
  height: 100%;
  min-height: 452px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.mav-pop__body {
  padding: 26px 28px 22px;
  overflow-y: auto;
}

.mav-pop__logo {
  width: 132px;
  max-height: 44px;
  object-fit: contain;
  object-position: left center;
  display: block;
  margin-bottom: 14px;
}

.mav-pop__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eff6ff;
  color: #0b3b79;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mav-pop__body h2 {
  margin: 0 0 7px;
  color: #0b244d;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.mav-pop__text {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.55;
}

.mav-pop__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.mav-pop__full {
  grid-column: 1 / -1;
}

.mav-pop label {
  display: block;
  margin: 0;
}

.mav-pop label span {
  display: block;
  margin: 0 0 5px;
  color: #334155;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
}

.mav-pop input,
.mav-pop select {
  width: 100%;
  min-height: 43px;
  border: 1px solid #d9e2ee;
  border-radius: 11px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 13.5px;
  outline: none;
  padding: 10px 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.mav-pop select {
  appearance: auto;
}

.mav-pop input::placeholder {
  color: #94a3b8;
}

.mav-pop input:focus,
.mav-pop select:focus {
  border-color: #0d4e9b;
  box-shadow: 0 0 0 3px rgba(13, 78, 155, 0.12);
  background: #ffffff;
}

.mav-pop__hp {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.mav-pop-error {
  margin: 11px 0 0;
  border: 1px solid #fecaca;
  border-radius: 11px;
  background: #fef2f2;
  color: #b91c1c;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 600;
}

.mav-pop__submit {
  width: 100%;
  min-height: 45px;
  margin-top: 13px;
  border: 0;
  border-radius: 12px;
  background: #082b62;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 26px rgba(8, 43, 98, 0.18);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.mav-pop__submit:hover:not(:disabled) {
  background: #0b3b79;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(8, 43, 98, 0.22);
}

.mav-pop__submit:disabled {
  opacity: .72;
  cursor: wait;
}

.mav-pop__note {
  margin: 9px 0 0;
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.45;
  text-align: center;
}

.mav-pop__success {
  margin-top: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: #f0fdf4;
  color: #14532d;
  padding: 18px;
  text-align: center;
}

.mav-pop__success strong,
.mav-pop__success span {
  display: block;
}

.mav-pop__success strong {
  font-size: 21px;
  margin-bottom: 6px;
}

.mav-pop__success span {
  color: #166534;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .mav-pop {
    align-items: center;
    padding: 10px;
  }

  .mav-pop__overlay {
    background: rgba(7, 18, 39, 0.54);
    backdrop-filter: blur(3px);
  }

  .mav-pop__card {
    width: min(100%, 380px);
    grid-template-columns: 1fr;
    max-height: calc(100vh - 18px);
    border-radius: 18px;
  }

  /* Mobile: hide counselling image. Keep only Mavericks logo for cleaner look. */
  .mav-pop__media {
    display: none !important;
  }

  .mav-pop__body {
    padding: 18px 14px 14px;
    overflow-y: auto;
  }

  .mav-pop__logo {
    width: 112px;
    max-height: 38px;
    margin: 0 auto 8px;
  }

  .mav-pop__eyebrow {
    font-size: 9.5px;
    padding: 3px 8px;
    margin-bottom: 6px;
  }

  .mav-pop__body h2 {
    font-size: 18.5px;
    line-height: 1.18;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
  }

  .mav-pop__text {
    font-size: 11.8px;
    line-height: 1.45;
    margin-bottom: 9px;
  }

  .mav-pop__grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .mav-pop label span {
    margin-bottom: 3px;
    font-size: 11px;
  }

  .mav-pop input,
  .mav-pop select {
    min-height: 36px;
    border-radius: 9px;
    font-size: 12.2px;
    padding: 7px 10px;
  }

  .mav-pop-error {
    margin-top: 8px;
    padding: 7px 9px;
    font-size: 11.5px;
  }

  .mav-pop__submit {
    min-height: 38px;
    margin-top: 9px;
    border-radius: 10px;
    font-size: 12.8px;
  }

  .mav-pop__note {
    margin-top: 6px;
    font-size: 10.5px;
  }

  .mav-pop__close {
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 24px;
  }
}

@media (max-width: 380px), (max-height: 690px) {
  .mav-pop__card {
    width: min(100%, 370px);
  }

  .mav-pop__media {
    display: none !important;
  }

  .mav-pop__body {
    padding: 15px 12px 12px;
  }

  .mav-pop__logo {
    width: 104px;
    margin: 0 auto 6px;
  }

  .mav-pop__eyebrow,
  .mav-pop__note {
    display: none;
  }

  .mav-pop__body h2 {
    font-size: 17px;
  }

  .mav-pop__text {
    font-size: 11.3px;
    margin-bottom: 7px;
  }

  .mav-pop input,
  .mav-pop select {
    min-height: 34px;
  }
}

/* v151: clean submit loader + smooth popup animation */
.mav-pop__overlay {
  animation: mavPopOverlayIn .18s ease-out both;
}

.mav-pop__card {
  animation: mavPopCardIn .24s cubic-bezier(.2,.75,.25,1) both;
}

@keyframes mavPopOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mavPopCardIn {
  from { opacity: 0; transform: translateY(14px) scale(.982); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mav-pop__loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 11px 0 0;
  border: 1px solid #dbeafe;
  border-radius: 13px;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  color: #0b244d;
  padding: 10px 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.mav-pop__loading[hidden] {
  display: none !important;
}

.mav-pop__loading strong,
.mav-pop__loading small {
  display: block;
}

.mav-pop__loading strong {
  margin: 0 0 2px;
  font-size: 12.5px;
  line-height: 1.25;
  font-weight: 800;
  color: #0b244d;
}

.mav-pop__loading small {
  font-size: 11.3px;
  line-height: 1.35;
  font-weight: 600;
  color: #53657f;
}

.mav-pop__loader,
.mav-pop-btn-spinner {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(13, 78, 155, .18);
  border-top-color: #0b3b79;
  animation: mavPopSpin .75s linear infinite;
}

.mav-pop-btn-spinner {
  width: 15px;
  height: 15px;
  border-color: rgba(255,255,255,.28);
  border-top-color: #fff;
}

@keyframes mavPopSpin {
  to { transform: rotate(360deg); }
}

.mav-pop__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mav-pop-btn-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.mav-pop--success-redirect .mav-pop__loading {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f7fff9 0%, #ecfdf5 100%);
}

.mav-pop--success-redirect .mav-pop__loader {
  border-color: rgba(22, 163, 74, .2);
  border-top-color: #16a34a;
}

.mav-pop--success-redirect .mav-pop__submit {
  background: #0f6b39;
  box-shadow: 0 12px 26px rgba(15, 107, 57, .18);
}

.mav-pop__form.is-submitting input,
.mav-pop__form.is-submitting select {
  pointer-events: none;
}

@media (max-width: 760px) {
  .mav-pop__loading {
    gap: 8px;
    margin-top: 8px;
    border-radius: 10px;
    padding: 8px 9px;
  }
  .mav-pop__loading strong { font-size: 11.6px; }
  .mav-pop__loading small { font-size: 10.5px; }
  .mav-pop__loader { width: 16px; height: 16px; }
}

/* v156: compact desktop popup for short laptop screens.
   Keeps the full lead form accessible without changing CRM/form fields. */
.mav-pop {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mav-pop__card,
.mav-pop__body,
.mav-pop__media {
  min-height: 0;
}

.mav-pop__card {
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
}

.mav-pop__body {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.mav-pop__media img {
  min-height: 0;
}

/* Standard small-laptop viewports: preserve desktop two-column design,
   but reduce vertical spacing so the submit button remains visible. */
@media (min-width: 761px) and (max-height: 820px) {
  .mav-pop {
    padding: 10px;
  }

  .mav-pop__card {
    width: min(780px, 100%);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    grid-template-columns: 0.8fr 1.2fr;
    border-radius: 18px;
  }

  .mav-pop__body {
    padding: 17px 20px 14px;
  }

  .mav-pop__logo {
    width: 108px;
    max-height: 36px;
    margin-bottom: 7px;
  }

  .mav-pop__eyebrow {
    margin-bottom: 5px;
    padding: 4px 9px;
    font-size: 9.5px;
  }

  .mav-pop__body h2 {
    margin-bottom: 4px;
    font-size: 21px;
    line-height: 1.14;
  }

  .mav-pop__text {
    margin-bottom: 9px;
    font-size: 12px;
    line-height: 1.4;
  }

  .mav-pop__grid {
    gap: 7px 9px;
  }

  .mav-pop label span {
    margin-bottom: 3px;
    font-size: 10.5px;
  }

  .mav-pop input,
  .mav-pop select {
    min-height: 36px;
    border-radius: 9px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .mav-pop-error,
  .mav-pop__loading {
    margin-top: 7px;
  }

  .mav-pop__submit {
    min-height: 39px;
    margin-top: 8px;
    border-radius: 10px;
    font-size: 12.8px;
  }

  .mav-pop__note {
    margin-top: 5px;
    font-size: 10px;
  }
}

/* Very short desktop browser windows: switch to a compact single-panel
   form. The counselling image is decorative, so hiding it avoids cropping. */
@media (min-width: 761px) and (max-height: 680px) {
  .mav-pop__card {
    width: min(500px, 100%);
    grid-template-columns: 1fr;
  }

  .mav-pop__media {
    display: none !important;
  }

  .mav-pop__body {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 14px 18px 12px;
  }

  .mav-pop__logo {
    width: 98px;
    margin-bottom: 5px;
  }

  .mav-pop__eyebrow,
  .mav-pop__note {
    display: none;
  }

  .mav-pop__body h2 {
    font-size: 19px;
  }

  .mav-pop__text {
    margin-bottom: 7px;
    font-size: 11.5px;
  }
}
