/* Guest sign-up: the quick window behind «التحق الآن» and the first-visit Google prompt. */

html.mslp-quick-open { overflow: hidden; }

.mslp-quick {
  position: fixed;
  z-index: 99995;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(10, 25, 47, .6);
  font-family: "IBM Plex Sans Arabic", sans-serif;
  opacity: 0;
  transition: opacity 180ms ease;
}

.mslp-quick[hidden],
.mslp-quick-prompt[hidden] { display: none; }

.mslp-quick.is-open { opacity: 1; }

.mslp-quick__box {
  position: relative;
  width: min(100%, 500px);
  padding: 36px 40px 30px;
  background: #fff;
  border-radius: 22px;
  text-align: center;
  transform: translateY(8px);
  transition: transform 220ms ease;
}

.mslp-quick.is-open .mslp-quick__box { transform: none; }

.mslp-quick__close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #0a192f;
  background: #f4f9ff;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.mslp-quick__close:hover {
  color: #1478dc;
  background: #e8f2fe;
}

.mslp-quick__logo {
  display: block;
  width: 112px !important;
  height: auto !important;
  margin: 0 auto 18px;
}

.mslp-quick__title {
  margin: 0;
  color: #0a192f;
  font-family: inherit;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.45;
}

.mslp-quick__course:empty { margin-block: 0 22px; }

.mslp-quick__course {
  margin: 6px 0 22px;
  color: #1478dc;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.6;
}

.mslp-quick-form { text-align: start; }

.mslp-quick__field { margin-bottom: 16px; }

/* Both fields read from the same side, whatever the language typed. */
.mslp-quick__field input { text-align: right !important; }

.mslp-quick__submit {
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  padding: 0 16px;
  color: #fff;
  background: #1478dc;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.mslp-quick__submit:hover { background: #0f64ba; }

.mslp-quick__error {
  margin: 0 0 12px;
  padding: 9px 12px;
  color: #b42318;
  background: #fef3f2;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
}

.mslp-quick__error[hidden] { display: none; }

.mslp-quick__forgot {
  display: inline-block;
  margin-top: 16px;
  color: #1478dc;
  font-size: 14px;
  font-weight: 600;
}

.mslp-quick__terms,
.mslp-quick__login {
  margin: 12px 0 0;
  color: #42566f;
  font-size: 13.5px;
  line-height: 1.7;
}

.mslp-quick__terms a,
.mslp-quick__login a {
  color: #1478dc;
  font-weight: 600;
}

.mslp-quick .msl-google-auth,
.mslp-quick-prompt .msl-google-auth { margin: 0 0 20px; }

/* First-visit prompt */

.mslp-quick-prompt {
  position: fixed;
  z-index: 99980;
  top: 112px;
  right: 20px;
  width: 280px;
  padding: 14px;
  color: #0a192f;
  background: #fff;
  border: 1px solid #e1edf9;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(10, 25, 47, .12);
  font-family: "IBM Plex Sans Arabic", sans-serif;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.mslp-quick-prompt.is-visible {
  opacity: 1;
  transform: none;
}

/* It sits where «استكشف مسلم» opens: step aside while that menu is open so the pointer can reach it. */
html:has(.mslp-explore.is-open) .mslp-quick-prompt {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.mslp-quick-prompt strong {
  display: block;
  padding-inline-end: 34px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.6;
}

.mslp-quick-prompt > p:not(.mslp-quick__terms) {
  margin: 0 0 10px;
  color: #42566f;
  font-size: 12px;
  line-height: 1.7;
}

.mslp-quick-prompt .msl-google-auth { margin: 0; }
.mslp-quick-prompt .msl-google-auth__divider { display: none; }
.mslp-quick-prompt .mslp-quick__terms { margin-top: 8px; font-size: 11.5px; text-align: center; }

@media (max-width: 600px) {
  .mslp-quick { align-items: end; padding: 0; }

  .mslp-quick__box {
    width: 100%;
    max-height: 94dvh;
    overflow-y: auto;
    padding: 28px 20px 26px;
    border-radius: 22px 22px 0 0;
  }

  .mslp-quick-prompt {
    top: 76px;
    right: 12px;
    width: min(280px, calc(100vw - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .mslp-quick,
  .mslp-quick__box,
  .mslp-quick-prompt { transition: none; }
}
