/* =========================
   Serveasily Login Modal ONLY
   ========================= */

.ex-authModal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}
.ex-authModal.is-open{ display:block; }

.ex-authModal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.ex-authModal__panel{
  position: relative;
  width: min(420px, 92vw);
  margin: 10vh auto;
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

.ex-authModal__close{
  position: absolute;
  top: 8px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.ex-authTitle{
  margin: 6px 0 2px;
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}
.ex-authSub{
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.35;
}

.ex-authLabel{
  display: block;
  font-size: 12px;
  color: #374151;
  margin: 0 0 6px;
  font-weight: 700;
}

.ex-authField{
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.ex-authPrefix{
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  padding-right: 10px;
  border-right: 1px solid #e5e7eb;
}

.ex-authInput{
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 12px;
  outline: none;
  font-size: 14px;
  color: #111827;
  background: #fff;
}

.ex-authField .ex-authInput{
  border: 0;
  padding: 0;
  border-radius: 0;
}

.ex-authBtn{
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  border: 0;
  font-weight: 800;
  margin-top: 12px;
}
.ex-authBtn:disabled{ opacity: .65; cursor: not-allowed; }

.ex-authBtn--primary{
  background: #111827;
  color: #fff;
}
.ex-authBtn--ghost{
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #e5e7eb;
}

.ex-authDivider{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}
.ex-authDivider::before,
.ex-authDivider::after{
  content:"";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}
.ex-authDivider span{
  font-size: 12px;
  color: #6b7280;
  font-weight: 800;
}

/* Google button */
.ex-googleBtn{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dadce0;
  color: #3c4043;
  font-weight: 800;
  cursor: pointer;
}

.ex-googleBtn__icon{
  width: 18px;
  height: 18px;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg");
}

.ex-authMsg{
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: #ef4444;
  min-height: 16px;
}

/* Mobile */
@media (max-width: 480px){
  .ex-authModal__panel{ margin: 12vh auto; padding: 16px; }
}
/* =========================
   MOBILE LOGIN MODAL (Bottom Sheet)
   Works with your existing classes:
   .ex-authModal, .ex-authModal__panel, etc.
   ========================= */

@media (max-width: 768px) {

  /* Modal covers full screen */
  .ex-authModal {
    display: none;
  }
  .ex-authModal.is-open {
    display: block;
  }

  /* Stronger blur-like backdrop */
  .ex-authModal__backdrop{
    background: rgba(0,0,0,.62);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  /* Bottom-sheet panel */
  .ex-authModal__panel{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    max-width: 100%;
    margin: 0;

    border-radius: 18px 18px 0 0;
    padding: 16px 16px 14px;

    /* keep it visible above mobile browser UI */
    max-height: 82vh;
    overflow: auto;

    /* smooth slide-up */
    transform: translateY(12px);
    animation: exSheetUp .18s ease-out forwards;
  }

  @keyframes exSheetUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
  }

  /* Add small drag handle */
  .ex-authModal__panel::before{
    content:"";
    display:block;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    margin: 0 auto 10px;
  }

  /* Close button more tappable on mobile */
  .ex-authModal__close{
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 24px;
  }

  .ex-authTitle{
    font-size: 18px;
    line-height: 1.2;
    margin-top: 2px;
  }

  .ex-authSub{
    font-size: 12.5px;
    margin-bottom: 12px;
  }

  .ex-authLabel{
    font-size: 12px;
    margin-bottom: 6px;
  }

  /* Phone field container (prefix + input) */
  .ex-authField{
    padding: 10px 12px;
    border-radius: 12px;
  }

  .ex-authPrefix{
    font-size: 13px;
    font-weight: 800;
  }

  .ex-authInput{
    font-size: 15px; /* slightly larger for mobile */
    padding: 12px 12px;
    border-radius: 12px;
  }

  /* OTP input bigger + spaced */
  #exOtpInput{
    letter-spacing: 2px;
    font-weight: 800;
    text-align: center;
    font-size: 18px;
    height: 48px;
  }

  /* Buttons stacked, large, thumb-friendly */
  .ex-authBtn{
    height: 48px;
    border-radius: 12px;
    font-size: 15px;
    margin-top: 10px;
  }

  .ex-authBtn--primary{
    box-shadow: 0 10px 24px rgba(17,24,39,.18);
  }

  .ex-authBtn--ghost{
    background: #f9fafb;
  }

  /* Divider spacing */
  .ex-authDivider{
    margin: 12px 0;
  }

  /* Google button */
  .ex-googleBtn{
    height: 48px;
    border-radius: 12px;
    font-size: 14px;
  }

  .ex-googleBtn__icon{
    width: 18px;
    height: 18px;
  }

  /* Error text spacing */
  .ex-authMsg{
    margin-top: 10px;
    font-size: 12px;
  }

  /* Improve tap areas */
  .ex-authStep button,
  .ex-authStep input{
    -webkit-tap-highlight-color: transparent;
  }

  /* Prevent iOS zooming on focus: keep >=16px where needed */
  .ex-authInput,
  #exPhoneInput{
    font-size: 16px;
  }

  /* Make OTP step feel like a sheet page */
  .ex-authStep{
    padding-bottom: 6px;
  }

  /* If keyboard opens, keep content visible */
  .ex-authModal__panel{
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 380px) {
  .ex-authModal__panel{
    max-height: 88vh;
    padding: 14px 14px 12px;
  }
  .ex-authTitle{ font-size: 17px; }
  #exOtpInput{ font-size: 17px; }
}
@media (max-width: 768px) {

  /* Lift the login sheet a bit so Google button is visible */
  .ex-authModal__panel{
    bottom: 56px;           /* 👈 move sheet upward */
    max-height: calc(82vh - 56px);
  }

}
/* Complete profile step inside auth modal */
#exAuthStepProfile .ex-authInput{
  width: 100%;
}
#exAuthStepProfile .ex-authLabel{
  display:block;
  margin-top: 10px;
}
