/* Consultation popup — MNP brand (unique vs reference teal modal) */

:root {
  --mph-consult-radius: 20px;
}

.mph-consult {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mph-consult[hidden] {
  display: none !important;
}

.mph-consult.is-open {
  display: flex;
}

.mph-consult__overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 20, 47, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mph-consult__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: auto;
  background: #fff;
  border-radius: var(--mph-consult-radius);
  box-shadow:
    0 24px 60px rgba(52, 66, 118, 0.22),
    0 0 0 1px rgba(92, 168, 255, 0.12);
  overflow: hidden;
  animation: mphConsultIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Phone country list must escape dialog clip */
.mph-consult__dialog:has(.mph-phone.is-open),
.mph-consult__dialog:has(.mph-phone__list:not([hidden])) {
  overflow: visible;
}

@keyframes mphConsultIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mph-consult__head {
  padding: 28px 28px 20px;
  background: linear-gradient(135deg, #344276 0%, #283152 55%, #344276 100%);
  color: #fff;
  border-radius: var(--mph-consult-radius) var(--mph-consult-radius) 0 0;
}

.mph-consult__eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(126, 192, 255, 0.95);
}

.mph-consult__head h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.mph-consult__head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.mph-consult__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mph-consult__close:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: rotate(90deg);
}

.mph-consult__body {
  padding: 22px 24px 26px;
  overflow: visible;
}

.mph-consult-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
}

/* Select Service — hidden sitewide (homepage + LP + all pages) */
.mph-consult-form__field:has(#mph_consult_service),
.mph-consult-form__field:has(select[name="mph_service"]) {
  display: none !important;
}

.mph-consult-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mph-consult-form__field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #344276;
}

.mph-consult-form__req {
  color: #5ca8ff;
}

.mph-consult-form__opt {
  font-weight: 500;
  color: #5f6472;
}

.mph-consult-form__field input[type="text"],
.mph-consult-form__field input[type="email"],
.mph-consult-form__field textarea,
.mph-consult-form__field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(52, 66, 118, 0.16);
  border-radius: 10px;
  font-size: 15px;
  color: #10142f;
  background: #fafbfd;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mph-consult-form__field input:focus,
.mph-consult-form__field textarea:focus,
.mph-consult-form__field select:focus {
  outline: none;
  border-color: #5ca8ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(92, 168, 255, 0.2);
}

.mph-consult-form__field textarea {
  min-height: 110px;
  resize: vertical;
}

.mph-consult-form__select-wrap {
  position: relative;
}

.mph-consult-form__select-wrap select {
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.mph-consult-form__select-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 12px;
  color: #344276;
  opacity: 0.65;
}

.mph-consult-form .mph-field__error {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: #c82333;
}

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

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

.mph-consult-form__phone .mph-phone {
  position: relative;
  border: 1px solid rgba(52, 66, 118, 0.16);
  border-radius: 10px;
  background: #fafbfd;
  overflow: visible;
}

.mph-consult-form__phone .mph-field {
  overflow: visible;
}

.mph-consult-form__phone .mph-phone.is-open {
  z-index: 30;
}

.mph-consult-form__phone .mph-phone__list {
  z-index: 40;
}

.mph-consult-form__phone .mph-phone:focus-within {
  border-color: #5ca8ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(92, 168, 255, 0.2);
}

.mph-consult-form__phone .mph-phone__input {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 12px 14px 12px 12px !important;
}

.mph-consult-form__phone .mph-phone__country {
  min-height: 46px;
}

.mph-consult-form__recaptcha {
  min-height: 78px;
}

.mph-consult-form__recaptcha-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: #c82333;
}

.mph-consult-form__recaptcha-error[hidden] {
  display: none;
}

.mph-consult-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding: 14px 24px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #344276 0%, #2b3865 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(52, 66, 118, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mph-consult-form__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(52, 66, 118, 0.34);
  background: linear-gradient(135deg, #3d4f8a 0%, #344276 100%);
}

.mph-consult-form__submit:active {
  transform: translateY(0);
}

.mph-consult-form__submit i {
  font-size: 13px;
}

body.mph-consult-open {
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .mph-consult-form__row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mph-consult__body {
    padding: 18px 18px 22px;
  }

  .mph-consult__head {
    padding: 24px 20px 18px;
  }
}
