/* ===============================================================
   JT Auth Modal — Clean Superio/Minimal Mist Theme (v4)
   Balanced layout • Soft animation • Blue accent scheme
   =============================================================== */

:root {
  --mm-bg: #0b1220;
  --mm-ink: #e5e7eb;
  --mm-sub: #9ca3af;
  --mm-line: #e5e7eb33;
  --mm-accent: #60a5fa;      /* Main Superio blue */
  --mm-accent-hover: #4c94ef;
  --mm-link: #93c5fd;
}

/* ====================== Animation ====================== */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.animate-fadeIn {
  animation: fadeIn 0.3s ease-out;
}

/* ====================== Overlay & Modal ====================== */
#jt-auth-overlay {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(5px);
  transition: opacity 0.3s ease;
}
#jt-auth-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
#jt-auth-modal {
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform-origin: top center;
}
#jt-auth-modal.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}
#jt-auth-modal:not(.hidden) > div {
  animation: fadeIn 0.25s ease-out;
}

/* ====================== Modal Base ====================== */
#jt-auth-modal .rounded-2xl {
  border-radius: 16px;
}
#jt-auth-modal .shadow-xl {
  box-shadow: 0 10px 35px rgba(0,0,0,0.35);
}

/* ====================== Header ====================== */
#jt-auth-modal .jt-auth-close {
  line-height: 0;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  transition: all 0.25s ease;
}
#jt-auth-modal .jt-auth-close:hover {
  background: var(--mm-accent);
  color: #fff;
  border-color: var(--mm-accent);
}

/* ====================== Tabs ====================== */
#jt-auth-modal .jt-auth-tab {
  border-bottom: 2px solid transparent;
  color: #6b7280;
  transition: all 0.2s ease;
}
#jt-auth-modal .jt-auth-tab[aria-selected="true"] {
  color: #0b1220;
  border-bottom-color: var(--mm-accent);
  font-weight: 600;
}

/* ====================== Inputs ====================== */
#jt-auth-modal input[type="email"],
#jt-auth-modal input[type="password"],
#jt-auth-modal select {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.25;
  background-color: #f9fafb;
  transition: all 0.2s ease;
}
#jt-auth-modal input:focus,
#jt-auth-modal select:focus {
  outline: 2px solid var(--mm-accent);
  outline-offset: 1px;
  border-color: var(--mm-accent);
}

/* ====================== Primary Button ====================== */
#jt-auth-modal .jt-btn-primary {
  background-color: #0d6efd !important;
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.25s ease;
}
#jt-auth-modal .jt-btn-primary:hover {
  background-color: #0b5ed7 !important;
  box-shadow: 0 4px 16px -4px rgba(13,110,253,0.4);
  transform: translateY(-1px);
}
#jt-auth-modal .jt-btn-primary:focus-visible {
  outline: 2px solid var(--mm-link);
  outline-offset: 2px;
}

/* ====================== Social Login (fixed alignment) ====================== */
#jt-auth-modal .jt-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-weight: 500;
  transition: all 0.25s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
#jt-auth-modal .jt-oauth:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  border-color: #dbeafe;
}
#jt-auth-modal .jt-oauth > span:first-child {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
}
#jt-auth-modal .jt-oauth > span:first-child img {
  width: 20px;
  height: 20px;
  display: block;
}
#jt-auth-modal .jt-oauth span:last-child {
  font-size: 0.95rem;
}

/* Social container spacing */
#jt-auth-modal .p-5 > .space-y-2 > * + * {
  margin-top: 8px;
}

/* Divider */
#jt-auth-modal .p-5 .h-px {
  background: #e5e7eb;
  opacity: 0.8;
}

/* ====================== Text & Links ====================== */
#jt-auth-modal small,
#jt-auth-modal .text-xs {
  color: #6b7280;
}
#jt-auth-modal a {
  color: var(--mm-link);
}
#jt-auth-modal a:hover {
  color: var(--mm-accent-hover);
  text-decoration: underline;
}

/* ====================== Error & Success Messages ====================== */
#jt-auth-modal .jt-auth-error {
  margin-top: 4px;
  color: #dc2626;
}
#jt-auth-modal .jt-auth-error.text-green-700 {
  color: #15803d !important;
}

/* ====================== Captcha + Scrollbar ====================== */
#jt-auth-modal .jt-captcha {
  margin: 8px 0;
}
#jt-auth-modal ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
#jt-auth-modal ::-webkit-scrollbar-thumb {
  background: #93c5fd;
  border-radius: 3px;
}
/* ====================== Scroll & Layout Fix for Register Form ====================== */
#jt-auth-modal .overflow-y-auto,
#jt-auth-modal .jt-auth-body {
  max-height: 85vh;
  overflow-y: auto;
  padding-right: 4px; /* tiny space to avoid hiding scrollbar */
  scroll-behavior: smooth;
}

/* Custom scrollbar styling */
#jt-auth-modal .jt-auth-body::-webkit-scrollbar {
  width: 6px;
}
#jt-auth-modal .jt-auth-body::-webkit-scrollbar-thumb {
  background: #a5b4fc;
  border-radius: 3px;
}
#jt-auth-modal .jt-auth-body::-webkit-scrollbar-thumb:hover {
  background: #93c5fd;
}


/* ====================== Dark Mode ====================== */
@media (prefers-color-scheme: dark) {
  #jt-auth-modal .bg-white {
    background-color: #1e1e2f !important;
    color: #f3f4f6 !important;
  }

  #jt-auth-modal input,
  #jt-auth-modal select {
    background-color: #111827;
    border-color: #374151;
    color: #e5e7eb;
  }

  #jt-auth-modal .jt-oauth {
    background-color: #111827;
    border-color: #374151;
    color: #e5e7eb;
  }
  #jt-auth-modal .jt-oauth:hover {
    background-color: #1f2937;
    border-color: #4b5563;
  }

  #jt-auth-modal .jt-btn-primary {
    background-color: #60a5fa !important;
  }
  #jt-auth-modal .jt-btn-primary:hover {
    background-color: #4c94ef !important;
  }

  #jt-auth-modal .jt-auth-tab {
    color: #9ca3af;
  }
  #jt-auth-modal .jt-auth-tab[aria-selected="true"] {
    color: #fff;
    border-bottom-color: var(--mm-link);
  }
}
