/* =========================================================
   Zomniverse Learn — Private Auth Gate
   Isolated MariaDB login gateway
========================================================= */

#learn-md-content > .learn-private-gate,
#learn-md-content > .learn-private-gate * {
  box-sizing: border-box;
}

#learn-md-content > .learn-private-gate {
  --zom-gate-bg-0: #050816;
  --zom-gate-bg-1: #0b1228;
  --zom-gate-text: #f5f7ff;
  --zom-gate-soft: rgba(232, 238, 255, 0.78);
  --zom-gate-muted: rgba(232, 238, 255, 0.58);
  --zom-gate-cyan: rgba(135, 226, 218, 0.92);
  --zom-gate-blue: #8eb8ff;
  --zom-gate-violet: #a58cff;

  min-height: min(64vh, 680px);
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3.5rem);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif !important;

  color: var(--zom-gate-text) !important;
}

/* Hard isolation from Learn manuscript typography */
#learn-md-content > .learn-private-gate p,
#learn-md-content > .learn-private-gate div,
#learn-md-content > .learn-private-gate span,
#learn-md-content > .learn-private-gate button {
  font-family: inherit !important;
  color: inherit;
  border: 0;
}

#learn-md-content > .learn-private-gate .learn-private-gate__shell {
  width: min(720px, 100%);
  position: relative;
  isolation: isolate;
  overflow: hidden;

  display: grid;
  grid-template-columns: 64px 1fr;
  gap: clamp(1rem, 3vw, 1.45rem);

  padding: clamp(1.35rem, 4vw, 2.25rem);
  border-radius: 30px;
  border: 1px solid rgba(150, 180, 255, 0.24);

  background:
    radial-gradient(circle at 13% 12%, rgba(142, 111, 255, 0.26), transparent 34%),
    radial-gradient(circle at 92% 0%, rgba(99, 184, 255, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(13, 20, 42, 0.985), rgba(5, 9, 21, 0.98));

  box-shadow:
    0 30px 90px rgba(4, 8, 20, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#learn-md-content > .learn-private-gate .learn-private-gate__orb {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;

  background:
    radial-gradient(circle at 35% 24%, rgba(185, 214, 255, 0.48), transparent 40%),
    linear-gradient(145deg, rgba(74, 108, 210, 0.48), rgba(34, 48, 102, 0.64));

  color: #a9ccff !important;

  box-shadow:
    0 18px 44px rgba(38, 56, 128, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

#learn-md-content > .learn-private-gate .learn-private-gate__orb i {
  font-size: 1.35rem;
  line-height: 1;
  color: #a9ccff !important;
}

#learn-md-content > .learn-private-gate .learn-private-gate__content {
  min-width: 0;
}

#learn-md-content > .learn-private-gate .learn-private-gate__kicker {
  margin: 0 0 0.5rem !important;
  padding: 0 !important;

  font-size: 0.72rem !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;

  color: var(--zom-gate-cyan) !important;
}

#learn-md-content > .learn-private-gate .learn-private-gate__title {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;

  max-width: 12ch;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif !important;

  font-size: clamp(2rem, 4.8vw, 3.6rem) !important;
  font-weight: 850 !important;
  line-height: 0.98 !important;
  letter-spacing: -0.055em !important;

  color: #ffffff !important;
  text-wrap: balance;
}

#learn-md-content > .learn-private-gate .learn-private-gate__text {
  max-width: 48ch;
  margin: 1rem 0 1.45rem !important;
  padding: 0 !important;
  border: 0 !important;

  font-size: 1rem !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
  letter-spacing: normal !important;

  color: var(--zom-gate-soft) !important;
}

#learn-md-content > .learn-private-gate .learn-private-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

#learn-md-content > .learn-private-gate .learn-private-gate__button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;

  margin: 0 !important;
  border: 0 !important;
  border-radius: 16px;
  padding: 0 1.2rem;

  background: linear-gradient(135deg, var(--zom-gate-blue), var(--zom-gate-violet));
  color: #061022 !important;

  font-family: inherit !important;
  font-size: 0.98rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -0.01em !important;
  text-decoration: none !important;
  white-space: nowrap;

  cursor: pointer;
  appearance: none;

  box-shadow:
    0 18px 38px rgba(92, 119, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);

  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

#learn-md-content > .learn-private-gate .learn-private-gate__button:hover {
  transform: translateY(-1px);
  filter: brightness(1.045);
  box-shadow:
    0 22px 46px rgba(92, 119, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

#learn-md-content > .learn-private-gate .learn-private-gate__button-arrow {
  color: #061022 !important;
  font-size: 1.1em;
  line-height: 1;
}

#learn-md-content > .learn-private-gate .learn-private-gate__button--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(232, 238, 255, 0.9) !important;
  border: 1px solid rgba(180, 205, 255, 0.18) !important;
  box-shadow: none;
}

#learn-md-content > .learn-private-gate .learn-private-gate__button--secondary[hidden],
#learn-md-content > .learn-private-gate [data-zom-auth-logout][hidden] {
  display: none !important;
}

#learn-md-content > .learn-private-gate .learn-private-gate__error {
  margin: 0 0 1rem !important;
  padding: 0 !important;
  border: 0 !important;

  color: #ffb4b4 !important;
  font-size: 0.92rem !important;
  font-weight: 750 !important;
  line-height: 1.4 !important;
}

#learn-md-content > .learn-private-gate .learn-private-gate__note {
  margin: 0.95rem 0 0 !important;
  padding: 0 !important;
  border: 0 !important;

  max-width: 48ch;

  font-size: 0.84rem !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  letter-spacing: normal !important;

  color: var(--zom-gate-muted) !important;
}

@media (max-width: 720px) {
  #learn-md-content > .learn-private-gate {
    align-items: start;
    padding: 1.25rem;
  }

  #learn-md-content > .learn-private-gate .learn-private-gate__shell {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  #learn-md-content > .learn-private-gate .learn-private-gate__orb {
    width: 56px;
    height: 56px;
    border-radius: 19px;
  }

  #learn-md-content > .learn-private-gate .learn-private-gate__title {
    max-width: 10ch;
    font-size: clamp(2rem, 11vw, 3rem) !important;
  }

  #learn-md-content > .learn-private-gate .learn-private-gate__actions {
    flex-direction: column;
    align-items: stretch;
  }

  #learn-md-content > .learn-private-gate .learn-private-gate__button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #learn-md-content > .learn-private-gate .learn-private-gate__button {
    transition: none;
  }

  #learn-md-content > .learn-private-gate .learn-private-gate__button:hover {
    transform: none;
  }
}