/* =========================================================
   Everjoy Login Page
   - Scoped styles matching brand + app shell
   - Works even if Tailwind fails to load
========================================================= */

/* Base background (login-only) */
html,
body {
  background: #f7f8fb;
}

/* 1200px max width container to match site */
.ej-wrap {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Card shell (matches vendors/venues cards vibe) */
.ej-card {
  background: #fff;
  border: 1px solid #e6edf7;
  border-radius: 20px;
  box-shadow: 0 20px 56px rgba(6, 44, 92, 0.1);
  padding: 24px;
}

/* Inputs (match hero/search inputs baseline) */
.ej-input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #e6edf7;
  background: #fff;
  padding: 0 12px;
  font: 500 14px/1.2 Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #0f172a;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.ej-input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px #dbeafe;
}

/* Primary button (consistent with header login button) */
.ej-primary-btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-weight: 800;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(2, 34, 62, 0.1);
  transition: filter 0.15s ease, transform 0.02s ease;
}
.ej-primary-btn:hover {
  filter: brightness(1.04);
}
.ej-primary-btn:active {
  transform: translateY(0.5px);
}
.ej-primary-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* Ensure header login button isn’t overridden by page CSS (belt & suspenders) */
#site-header.ej-nav .ej-main .ej-rail > a.ej-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  border: 1px solid #0f172a;
  font-weight: 800;
  text-decoration: none;
}

/* ---------------------------------------------------------
   Login layout (fallback if Tailwind fails)
---------------------------------------------------------- */

/* Center the login shell and keep comfortable vertical space */
.login-page main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 0 32px;
}

/* Keep a comfortable gap between the two cards */
.login-page .login-layout {
  gap: 24px;
}

/* Make the primary button full-width even without Tailwind utilities */
.login-page .login-primary-btn {
  display: block;
  width: 100%;
}

/* “Explore” quick links as a 2-column grid */
.login-page .login-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

/* Softer, pill-style inputs to match app vibe */
.login-page .ej-input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  background: #f5f7ff;
  font: inherit;
}
.login-page .ej-input:focus {
  outline: none;
  border-color: #025fbc;
  background: #e3ecff;
  box-shadow: 0 0 0 1px rgba(2, 95, 188, 0.16);
}

/* ---------------------------------------------------------
   Responsive tweaks
---------------------------------------------------------- */

/* Phones / small tablets */
@media (max-width: 768px) {
  /* Don’t hard-center vertically on tiny screens */
  .login-page main {
    align-items: flex-start;
    padding: 56px 0 24px;
  }

  /* Slightly tighter horizontal padding on small screens */
  .login-page .ej-wrap {
    padding: 0 16px;
  }

  /* Softer cards on mobile */
  .login-page .ej-card {
    padding: 18px 16px;
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(6, 44, 92, 0.1);
  }

  /* Ensure explore links stay in a clean 2-column grid */
  .login-page .login-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Large screens: give the layout more breathing room */
@media (min-width: 1024px) {
  .login-page main {
    padding: 140px 0 100px;
  }

  .login-page .login-layout {
    align-items: flex-start;
  }
}

/* Small tweak to card radius/padding on very small screens */
@media (max-width: 640px) {
  .ej-card {
    border-radius: 16px;
    padding: 18px;
  }
}

/* ---------------------------------------------------------
   Auth overlay & brand progress (used by login.js)
---------------------------------------------------------- */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  place-items: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.1) blur(6px);
}
.auth-overlay[aria-hidden="false"] {
  display: grid;
}

.auth-card {
  width: min(560px, 92vw);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(2, 95, 188, 0.12);
}
.auth-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-title {
  font: 700 18px/1.25 Poppins, system-ui, sans-serif;
  letter-spacing: 0.2px;
  margin: 0;
}
.auth-sub {
  color: #64748b;
  font: 500 13px/1.2 Poppins, system-ui, sans-serif;
  margin: 2px 0 0;
}

/* Brand progress bar (top loader) */
.brand-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #025fbc, #06a2dd);
  transform-origin: 0 0;
  animation: bp 1s ease-in-out infinite alternate;
  z-index: 10060;
  display: none;
}
.brand-progress.is-live {
  display: block;
}

@keyframes bp {
  from {
    transform: scaleX(0.18);
    opacity: 0.7;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* ---------------------------------------------------------
   Misc: mobile tab bar
---------------------------------------------------------- */

/* Hide mobile bottom nav on desktop – only show on tablet/mobile */
@media (min-width: 1024px) {
  #mbTabbar {
    display: none !important;
  }
}
