/* Hero lead form — icons + international phone (scoped to .hero-form) */

.mph-hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.hero-form,
.hero-form .mph-lead-form--enhanced {
  overflow: visible;
}

.hero-form.mph-hero-piece {
  overflow: visible;
}

.hero-form .mph-lead-form--enhanced {
  gap: 12px;
  position: relative;
}

.hero-form .mph-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-form .mph-field__control {
  position: relative;
  display: block;
}

.hero-form .mph-field__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  color: #344276;
  opacity: 0.72;
  pointer-events: none;
}

.hero-form .mph-field__icon--top {
  top: 16px;
  transform: none;
}

.hero-form .mph-field__control input,
.hero-form .mph-field__control textarea {
  width: 100%;
  padding-left: 44px;
}

.hero-form .mph-field__control--textarea textarea {
  padding-top: 14px;
  min-height: 120px;
}

.hero-form .mph-field.is-invalid .mph-field__control input,
.hero-form .mph-field.is-invalid .mph-phone__input,
.mph-lead-form--enhanced .mph-field.is-invalid .mph-phone__input {
  box-shadow: inset 0 0 0 2px rgba(185, 28, 28, 0.55);
}

.hero-form .mph-field__error {
  margin: 0;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  color: #7f1d1d;
}

.hero-form .mph-field__error:not([hidden]) {
  display: block;
}

.mph-lead-form--enhanced .mph-field--phone {
  position: relative;
  z-index: 2;
}

.mph-lead-form--enhanced .mph-field--phone.is-dropdown-open {
  z-index: 300;
}

/* Phone row */
.mph-lead-form--enhanced .mph-phone {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border-radius: 10px;
  overflow: visible;
}

.mph-lead-form--enhanced .mph-phone__country {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 12px;
  min-height: 48px;
  border: none;
  border-right: 1px solid rgba(52, 66, 118, 0.12);
  border-radius: 10px 0 0 10px;
  background: #f4f8fc;
  color: #344276;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mph-lead-form--enhanced .mph-phone__country:hover,
.mph-lead-form--enhanced .mph-phone__country[aria-expanded="true"] {
  background: #e8f2fa;
}

.mph-lead-form--enhanced .mph-phone__flag {
  font-size: 18px;
  line-height: 1;
}

.mph-lead-form--enhanced .mph-phone__caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #344276;
  opacity: 0.65;
}

.mph-lead-form--enhanced .mph-phone__input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  border-radius: 0 10px 10px 0;
  padding: 14px 14px 14px 12px !important;
  font-size: 15px;
  outline: none;
}

.mph-lead-form--enhanced .mph-phone.is-open {
  z-index: 301;
}

.mph-lead-form--enhanced .mph-phone__list {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 302;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: min(220px, 42vh);
  overflow-y: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(16, 20, 47, 0.22);
  border: 1px solid rgba(52, 66, 118, 0.14);
}

/* Default: open below; JS adds --above when no room underneath */
.mph-lead-form--enhanced .mph-phone__list--below {
  top: calc(100% + 6px);
  bottom: auto;
}

.mph-lead-form--enhanced .mph-phone__list--above {
  bottom: calc(100% + 6px);
  top: auto;
}

.mph-lead-form--enhanced .mph-phone__list[hidden] {
  display: none;
}

.mph-lead-form--enhanced .mph-phone__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #344276;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.mph-lead-form--enhanced .mph-phone__option:hover,
.mph-lead-form--enhanced .mph-phone__option.is-active {
  background: #eef4fc;
}

.mph-lead-form--enhanced .mph-phone__option-flag {
  font-size: 18px;
  line-height: 1;
}

.mph-lead-form--enhanced .mph-phone__option-name {
  flex: 1;
}

.mph-lead-form--enhanced .mph-phone__option-dial {
  font-weight: 600;
  opacity: 0.75;
}

/* LP landing — same icons + phone as homepage hero */
.lp-form.mph-lead-form--enhanced {
  overflow: visible;
  position: relative;
}

.lp-form-card .lp-form.mph-lead-form--enhanced,
.lp-help__card .lp-form.mph-lead-form--enhanced {
  overflow: visible;
}

.lp-form.mph-lead-form--enhanced .mph-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lp-form.mph-lead-form--enhanced .mph-field__control {
  position: relative;
  display: block;
}

.lp-form.mph-lead-form--enhanced .mph-field__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  color: #344276;
  opacity: 0.72;
  pointer-events: none;
}

.lp-form.mph-lead-form--enhanced .mph-field__control input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1px solid #c5cedd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #1a1f36;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lp-form.mph-lead-form--enhanced .mph-field__control input::placeholder {
  color: #9aa3b5;
}

.lp-form.mph-lead-form--enhanced .mph-field__control input:focus {
  outline: none;
  border-color: #344276;
  box-shadow: 0 0 0 3px rgba(52, 66, 118, 0.12);
}

.lp-form.mph-lead-form--enhanced .mph-phone {
  border: 1px solid #c5cedd;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lp-form.mph-lead-form--enhanced .mph-phone:focus-within {
  border-color: #344276;
  box-shadow: 0 0 0 3px rgba(52, 66, 118, 0.12);
}

.lp-form.mph-lead-form--enhanced .mph-phone__country {
  min-height: 46px;
  border-radius: 8px 0 0 8px;
}

.lp-form.mph-lead-form--enhanced .mph-phone__input {
  border-radius: 0 8px 8px 0;
}

.lp-form.mph-lead-form--enhanced .mph-field.is-invalid .mph-field__control input,
.lp-form.mph-lead-form--enhanced .mph-field.is-invalid .mph-phone {
  border-color: #c82333;
  box-shadow: 0 0 0 3px rgba(200, 35, 51, 0.15);
}

.lp-form.mph-lead-form--enhanced .mph-field__error {
  margin: 0;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  color: #c82333;
}

.lp-form.mph-lead-form--enhanced .mph-field__error:not([hidden]) {
  display: block;
}
