/* MathU login modal — sign-in overlay with Society / Corporate portal tabs */

.mathu-portal-link {
  cursor: pointer;
  color: rgba(247, 245, 239, 0.82);
  transition: color 180ms ease, transform 180ms ease;
}

.mathu-portal-link:hover {
  color: #fff;
  transform: translateY(-1px);
}

/* Grouped auth actions (AdvLearn + Sign in) in one pill container */
.mathu-auth-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Space between the AdvLearn pill and the MathU Sign in pill */
.mathu-auth-group--advlearn {
  margin-right: 14px;
}

.mathu-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  background: transparent;
  color: rgba(247, 245, 239, 0.85);
  font: inherit;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.mathu-auth-btn:hover {
  background: rgba(143, 109, 255, 0.28);
  color: #fff;
  transform: translateY(-1px);
}

.mathu-login {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mathu-login[hidden] {
  display: none;
}

.mathu-login__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 5, 0.72);
  backdrop-filter: blur(6px);
}

.mathu-login__panel {
  position: relative;
  width: min(100%, 420px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 34px 30px 30px;
  background: rgba(10, 11, 17, 0.92);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  color: #f7f5ef;
  animation: mathu-login-in 220ms ease;
}

@keyframes mathu-login-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.mathu-login__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(247, 245, 239, 0.6);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.mathu-login__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mathu-login__eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #ffbf3c;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mathu-login__title {
  margin: 0 0 22px;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.05;
}

.mathu-login__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.mathu-login__tab {
  border: none;
  border-radius: 999px;
  padding: 10px 12px;
  background: transparent;
  color: rgba(247, 245, 239, 0.62);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.mathu-login__tab.is-active {
  background: rgba(143, 109, 255, 0.28);
  color: #fff;
}

.mathu-login__hint {
  margin: 0 0 20px;
  color: rgba(247, 245, 239, 0.6);
  font-size: 13px;
}

.mathu-login__field {
  display: block;
  margin-bottom: 14px;
}

.mathu-login__field span {
  display: block;
  margin-bottom: 6px;
  color: rgba(247, 245, 239, 0.7);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.mathu-login__field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(5, 6, 10, 0.8);
  color: #f7f5ef;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.mathu-login__field input:focus {
  outline: none;
  border-color: rgba(143, 109, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(143, 109, 255, 0.18);
}

.mathu-login__submit {
  width: 100%;
  margin-top: 8px;
  padding: 13px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(120deg, #8f6dff, #ffbf3c);
  color: #0b0b12;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.mathu-login__submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* AdvLearn SSO button — distinct from the gradient submit */
.mathu-sso-btn.mathu-login__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #1b1b22;
}

.mathu-sso-btn.mathu-login__submit:hover {
  filter: none;
  background: #f0f0f3;
}

.mathu-login__sso-note {
  margin: 14px 0 0;
  color: rgba(247, 245, 239, 0.5);
  font-size: 12px;
  text-align: center;
}
