/* Auth-specific styles (login / register) - restored to affect all auth pages equally */

/* Page background and layout for auth pages */
body.auth-page-bg {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0b2540 0%, #12293b 45%, #1b3a55 100%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 36px 16px;
  box-sizing: border-box;
}

/* System title placed outside the card, centered */
.system-title {
  text-align: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 36px;
  letter-spacing: 0.6px;
  margin-bottom: 18px;
  text-transform: none; /* use "ParkEase" case by default */
}

/* CARD: explicit scoping so auth card width is consistent across pages.
   Using body.auth-page-bg .auth-card gives higher specificity than
   a plain .auth-card and reduces chance of being overridden. */
body.auth-page-bg .auth-card {
  margin: 0 auto;
  width: 100%;
  max-width: 420px; /* base max width for small-to-medium viewports */
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(11, 122, 99, 0.12);
  border: 1px solid rgba(2,6,23,0.06);
  box-sizing: border-box;
}

/* Keep login / other auth pages unchanged on large screens (no global widening here). */

/* Header bar holding tabs (keeps them aligned at top) */
.auth-card-header {
  background: #e9edf0; /* light gray bar */
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tab list */
.auth-tabs {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 6px;
  border-radius: 8px;
}

/* Each tab button / link */
.auth-tab,
.auth-link {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  background: transparent;
  padding: 10px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  color: #0b1720; /* dark text for inactive */
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 160ms ease;
  box-shadow: none;
}

/* Active / selected tab - pill style */
.auth-tab.active {
  background: #06a676; /* vivid green */
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(6, 166, 118, 0.18);
  transform: translateY(-4px); /* slight raised look */
}

/* make inactive link sit vertically aligned */
.auth-tabs .auth-link {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Body area inside card */
.auth-body {
  padding: 20px 22px;
  box-sizing: border-box;
}

/* Small brand title inside card (image removed) */
.brand-title {
  font-weight: 700;
  color: #0b7a63;
  font-size: 1rem;
}

/* Form controls (override Bootstrap where needed) */
.auth-input { border-radius: 6px; }
.form-control.auth-input {
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid #e6eef2;
  box-shadow: none;
  width: 100%;
  box-sizing: border-box;
}

/* Primary action button for auth forms */
.auth-submit {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(180deg,#a6e6cf,#8fd7bd);
  color: #fff;
  font-weight: 800;
  border: none;
  margin-top: 12px;
  transition: all 0.3s ease;
}

/* Disabled state - faded button when fields are empty (use current colors) */
.auth-submit.disabled-state {
  background: linear-gradient(180deg, #a6e6cf, #8fd7bd);
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Enabled state - bright vibrant button when fields are filled */
.auth-submit.enabled-state {
  background: linear-gradient(180deg, #00d68f, #00b378);
  opacity: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 214, 143, 0.4);
}

.auth-submit.enabled-state:hover {
  background: linear-gradient(180deg, #00f5a0, #00c985);
  box-shadow: 0 8px 24px rgba(0, 214, 143, 0.5);
  transform: translateY(-2px);
}

.auth-submit.disabled-state:hover {
  background: linear-gradient(180deg, #a6e6cf, #8fd7bd);
  transform: none;
  box-shadow: none;
  opacity: 0.5;
}

/* Or separator */
.auth-or {
  position: relative;
  margin: 18px 0;
  text-align: center;
  color: #9aa7b2;
  font-size: 14px;
}

/* Footer inside auth card */
.auth-card-footer {
  margin-top: 12px;
  font-size: 0.95rem;
  padding-bottom: 18px;
}

/* Back button inside auth (visible, touch-friendly) */
.auth-back-btn {
  border-radius: 10px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #0f1724;
  background: #fff;
  border: 1px solid rgba(2,6,23,0.06);
  box-shadow: 0 6px 16px rgba(2,6,23,0.06);
  text-decoration: none;
}
.auth-back-btn:hover { text-decoration: none; background:#f1f5f9; }

/* Auth: responsive adjustments - same card width on small screens */
@media (max-width: 520px) {
  body.auth-page-bg .auth-card {
    margin: 12px;
    max-width: 360px; /* slightly smaller on very small viewports to fit nicely */
  }
  .auth-tab, .auth-link { padding: 8px 14px; font-size: 14px; }
  .system-title { font-size: 28px; margin-bottom: 12px; }
  .auth-submit { padding: 11px; }
}

/* Keep these helper classes here so auth pages still have them */
.hidden { display:none !important; }
.center { display:flex; align-items:center; justify-content:center; }
.text-muted-small { color:#64748b; font-size:0.85rem; }

/* ------------------------------------------------------------------
   Password toggle: position the eye icon vertically centered inside
   the password input area and reserve input padding so text doesn't
   overlap the icon.
   The markup uses: <div class="mb-3 position-relative"> around the input.
   ------------------------------------------------------------------ */

/* ensure the container is positioned (should already be .position-relative) */
.mb-3.position-relative { position: relative; }

/* make the toggle sit vertically centered inside the input on the right */
.mb-3.position-relative .password-toggle {
  position: absolute;
  top: 70%;
  right: 10px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  /* increase hit area on touch devices without affecting visuals */
  min-width: 34px;
  min-height: 34px;
  border-radius: 6px;
}

/* prevent the icon from covering the input text; only for password inputs */
.mb-3.position-relative input[type="password"].auth-input,
.mb-3.position-relative input[type="text"].auth-input#password {
  padding-right: 48px; /* adjust if you change icon size / padding */
}

/* Slight hover/focus affordances */
.mb-3.position-relative .password-toggle:focus,
.mb-3.position-relative .password-toggle:hover {
  background: rgba(6, 166, 118, 0.06);
  outline: none;
}

/* smaller devices: reduce right padding a bit to fit */
@media (max-width: 420px) {
  .mb-3.position-relative input[type="password"].auth-input {
    padding-right: 44px;
  }
}
/* === LOADING OVERLAY: PARKEASE word spinner === */
#loadingOverlay.loading-overlay {
  display: none;
  position: fixed;
  z-index: 1200;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* Centered word container */
#loadingOverlay .loader-word {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(240,72,217,0.12), rgba(255,214,0,0.06));
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  -webkit-font-smoothing: antialiased;
}

/* Letters styling */
#loadingOverlay .loader-word span {
  display: inline-block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  color: #ffffff;
  font-size: 44px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 2px;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  opacity: 0.95;
  text-shadow: 0 4px 18px rgba(0,0,0,0.25);
  -webkit-text-stroke: 0px rgba(0,0,0,0.12);
  animation: letter-spin 1.2s cubic-bezier(.2,.9,.2,1) infinite;
}

/* Slightly smaller on small screens */
@media (max-width: 420px) {
  #loadingOverlay .loader-word span {
    font-size: 32px;
  }
}

/* Stagger each letter to create spinning wave */
#loadingOverlay .loader-word span:nth-child(1) { animation-delay: 0s; }
#loadingOverlay .loader-word span:nth-child(2) { animation-delay: 0.08s; }
#loadingOverlay .loader-word span:nth-child(3) { animation-delay: 0.16s; }
#loadingOverlay .loader-word span:nth-child(4) { animation-delay: 0.24s; }
#loadingOverlay .loader-word span:nth-child(5) { animation-delay: 0.32s; }
#loadingOverlay .loader-word span:nth-child(6) { animation-delay: 0.40s; }
#loadingOverlay .loader-word span:nth-child(7) { animation-delay: 0.48s; }
#loadingOverlay .loader-word span:nth-child(8) { animation-delay: 0.56s; }

/* Spinning & scaling animation */
@keyframes letter-spin {
  0% {
    transform: rotateX(0deg) translateY(0) scale(1);
    opacity: 0.6;
  }
  35% {
    transform: rotateX(180deg) translateY(-6px) scale(1.15);
    opacity: 1;
  }
  70% {
    transform: rotateX(360deg) translateY(0) scale(1);
    opacity: 0.9;
  }
  100% {
    transform: rotateX(360deg) translateY(0) scale(1);
    opacity: 0.6;
  }
}

/* utility class to show overlay */
#loadingOverlay.visible {
  display: flex !important;
  align-items: center;
  justify-content: center;
  
}
