/* ===============================
   MH SUB Auth – Field Refinement
   Aligns with MH tokens + screenshot spec
   =============================== */

.mh-sub-auth{
  --field-bg: rgba(255,255,255,0.02);
  --field-border: rgba(255,255,255,0.08);
  --field-border-focus: rgba(193,18,58,0.45);
  --field-glow: rgba(193,18,58,0.25);
}

/* Container */
.mh-sub-auth .mh-sub__card--hero,
.mh-sub-auth .mh-sub-auth__card{
  max-width: 560px;
  margin: 0 auto;
  border-radius: 26px;
  padding: 20px 18px 18px;
}

/* Field group */
.mh-sub-auth__field,
.mh-sub-auth .mh-field{
  margin-bottom: 18px;
}

/* Labels */
.mh-sub-auth__label,
.mh-sub-auth label{
  display:block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mh-txt-300);
}

/* Inputs */
.mh-sub-auth__input,
.mh-sub-auth input[type="text"],
.mh-sub-auth input[type="email"],
.mh-sub-auth input[type="password"],
.mh-sub-auth input[type="date"]{
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border-radius: 18px;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  color: var(--mh-txt-100);
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.mh-sub-auth input::placeholder{
  color: var(--mh-txt-400);
}

.mh-sub-auth__input:focus,
.mh-sub-auth input:focus{
  border-color: var(--field-border-focus);
  box-shadow: 0 0 0 1px var(--field-border-focus), 0 0 18px var(--field-glow);
  background: rgba(255,255,255,0.03);
}

/* Password */
.mh-sub-auth__pw{
  position: relative;
  display:flex;
  align-items:center;
}

.mh-sub-auth__pw .mh-sub-auth__input{
  padding-right: 118px; /* icons space */
}

.mh-sub-auth__pw .mh-sub-auth__iconbtn{
  position:absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--mh-txt-400);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.mh-sub-auth__pw .mh-sub-auth__iconbtn:hover{
  color: var(--mh-txt-100);
}

.mh-sub-auth__pw .mh-sub-auth__iconbtn[data-mhosl-generate]{
  right: 58px;
}
.mh-sub-auth__pw .mh-sub-auth__iconbtn[data-mhosl-toggle],
.mh-sub-auth__pw .mh-sub-auth__iconbtn[data-mhosl-toggle-pass]{
  right: 12px;
}

.mh-sub-auth__pw .mh-sub-auth__divider{
  position:absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.15);
}

/* Checkbox */
.mh-sub-auth__check{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 16px;
  color: var(--mh-txt-200);
  font-size: 14px;
}
.mh-sub-auth__check input{
  appearance:none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.20);
  position: relative;
}
.mh-sub-auth__check input:checked{
  background: var(--mh-accent-500);
  border-color: var(--mh-accent-500);
}
.mh-sub-auth__check input:checked::after{
  content: "✓";
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:#fff;
  font-size: 14px;
}

/* Strength meter */
.mh-sub-auth__meter{
  margin-top: 10px;
}
.mh-sub-auth__meterbar{
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow:hidden;
}
.mh-sub-auth__meterbar span{
  display:block;
  height:100%;
  width:0%;
  background: var(--mh-accent-500);
  transition: width 160ms ease;
}
.mh-sub-auth__metertext{
  margin-top: 6px;
  font-size: 12px;
  color: var(--mh-txt-300);
}

/* Alerts */
.mh-sub-auth__alert{
  max-width: 560px;
  margin: 0 auto 12px;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.20);
  color: var(--mh-txt-200);
}
.mh-sub-auth__alert--error{
  border-color: rgba(255,50,50,0.25);
  background: rgba(255,50,50,0.08);
}
.mh-sub-auth__alert--success{
  border-color: rgba(80,220,120,0.25);
  background: rgba(80,220,120,0.08);
}
.mh-sub-auth__alert--notice{
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

/* CTA */
.mh-sub-auth .mh-sub__btn--primary{
  height: 56px;
  border-radius: 999px;
  font-weight: 700;
}


/* ===============================
   Override theme/Elementor button defaults inside auth
   =============================== */
.mh-sub-auth button,
.mh-sub-auth input[type="submit"]{
  background: transparent;
  border: none;
  box-shadow: none;
  text-transform: none;
}

/* Field error state */
.mh-sub-auth__input.is-error{
  border-color: rgba(255,50,50,0.35) !important;
  box-shadow: 0 0 0 1px rgba(255,50,50,0.35), 0 0 18px rgba(255,50,50,0.14) !important;
}
.mh-sub-auth__errorline{
  margin-top: 8px;
  color: rgba(255,160,160,0.95);
  font-size: 12px;
}

/* CTA – spec compliant */
.mh-sub-auth .mh-sub__btn--primary.mh-auth-cta{
  height: 52px;
  border-radius: 16px;
  width: 100%;
  font-weight: 650;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, var(--mh-accent-500), var(--mh-accent-600));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.06);
  transition: opacity .35s ease-out, filter .35s ease-out, box-shadow .35s ease-out;
  box-shadow: 0 10px 30px rgba(193,18,58,0.25);
}
.mh-sub-auth .mh-sub__btn--primary.mh-auth-cta:hover{
  filter: brightness(0.98);
  box-shadow: 0 12px 36px rgba(193,18,58,0.30);
}
.mh-sub-auth .mh-sub__btn--primary.mh-auth-cta:active{
  filter: brightness(0.95);
}
.mh-sub-auth .mh-sub__btn--primary.mh-auth-cta:disabled,
.mh-sub-auth .mh-sub__btn--primary.mh-auth-cta[aria-disabled="true"]{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.45);
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
}
.mh-sub-auth .mh-auth-cta__spinner{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: rgba(255,255,255,0.90);
  animation: mhspin 0.9s linear infinite;
  margin-left: 10px;
}
@keyframes mhspin{ to { transform: rotate(360deg);} }

/* Steps gating */
.mh-sub-auth__step[aria-hidden="true"]{
  display:none !important;
}


/* Wizard step visibility (Elementor-safe) */
.mh-sub-auth form .mh-sub-auth__step{ display:none !important; }
.mh-sub-auth form .mh-sub-auth__step.is-active{ display:block !important; }
.mh-sub-auth form .mh-sub-auth__step[aria-hidden="true"]{ display:none !important; }
.mh-sub-auth form .mh-sub-auth__step[aria-hidden="false"]{ display:block !important; }

/* Honeypot must be visually hidden */
.mh-sub-auth .mhosl-hp{
  position:absolute !important;
  left:-9999px !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
}

/* Nav buttons in wizard */
.mh-sub-auth__actions{
  display:flex;
  gap:12px;
}
.mh-sub-auth__navbtn{
  height:44px;
  border-radius:14px;
  padding:10px 14px;
}
.mh-sub-auth__actions .mh-sub__btn--ghost{
  background: rgba(255,255,255,0.03) !important;
}
.mh-sub-auth__actions .mh-sub__btn--ghost:disabled,
.mh-sub-auth__actions .mh-sub__btn--ghost[aria-disabled="true"]{
  opacity: 0.55;
  cursor: not-allowed;
}


/* Auth card width (desktop) */
@media (min-width: 768px){
  .mh-sub-auth__card{
    min-width: 550px;
  }
}


/* Verify screen helpers */
.mh-sub-auth__panel{
  margin-top: 10px;
}

.mh-sub-auth__email{
  margin: 6px 0 14px;
  font-size: 15px;
  color: var(--mh-txt-100);
}

.mh-sub-auth__steps{
  margin: 0 0 12px 18px;
  padding: 0;
  color: var(--mh-txt-200);
  font-size: 14px;
}
.mh-sub-auth__steps li{ margin: 6px 0; }

.mh-sub-auth__note{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--mh-txt-200);
  font-size: 13px;
}
.mh-sub-auth__note--info{
  border-color: rgba(193,18,58,0.25);
}

.mh-sub-auth__micro{
  margin: 10px 0 0;
  color: var(--mh-txt-300);
  font-size: 13px;
  line-height: 1.4;
}

.mh-sub-auth__details{
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
}
.mh-sub-auth__summary{
  cursor: pointer;
  color: var(--mh-txt-150);
  font-weight: 600;
}


/* Footer helper link (Login/Register cross-link) */
.mh-sub-auth__footer{
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--mh-txt-300);
  line-height: 1.35;
}

.mh-sub-auth__footer a{
  color: var(--mh-txt-100);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.28);
  padding-bottom: 1px;
  margin-left: 6px;
  transition: border-color .15s ease, opacity .15s ease;
}

.mh-sub-auth__footer a:visited{
  color: var(--mh-txt-100);
}

.mh-sub-auth__footer a:hover{
  border-bottom-color: var(--mh-accent-500);
}

.mh-sub-auth__footer a:focus-visible{
  outline: 2px solid var(--mh-accent-500);
  outline-offset: 3px;
  border-radius: 8px;
}

.mh-sub-auth__footer a:active{
  opacity: .85;
}

/* Auth card sizing – align with Registration Flow card density */
.mh-sub-auth__card.mh-sub__card{
  padding: 28px 24px;
  border-radius: 34px;
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
}
