/* ==========================================================================
   Leenardo.com - Authentication UI & Modal Styles
   ========================================================================== */

/* Header Vocab & Notebook Button */
.btn-header-vocab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: linear-gradient(135deg, #eff6ff 0%, #ede9fe 100%);
  border: 1.5px solid #c7d2fe;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #4338ca;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-header-vocab:hover {
  background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
  border-color: var(--primary, #4f46e5);
  transform: translateY(-1px);
}

.vocab-counter-badge {
  background: var(--primary, #4f46e5);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
}

/* Header User Profile Button & Dropdown */
.btn-header-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: #ffffff;
  border: 1.5px solid var(--slate-300, #cbd5e1);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-700, #334155);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.btn-header-auth:hover {
  background: var(--slate-50, #f8fafc);
  border-color: var(--primary, #4f46e5);
  color: var(--primary, #4f46e5);
  transform: translateY(-1px);
}

.auth-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  padding: 0.5rem;
  min-width: 200px;
  z-index: 10000;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  animation: authDropdownFadeIn 0.15s ease-out;
}

.auth-user-dropdown.show {
  display: flex;
}

@keyframes authDropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-dropdown-header {
  padding: 0.5rem 0.65rem 0.4rem;
  border-bottom: 1px solid var(--slate-100, #f1f5f9);
  margin-bottom: 0.25rem;
}

.auth-dropdown-email {
  font-size: 0.75rem;
  color: var(--slate-500, #64748b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.auth-dropdown-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-900, #0f172a);
}

.auth-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-700, #334155);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.auth-dropdown-item:hover {
  background: var(--slate-100, #f1f5f9);
  color: var(--primary, #4f46e5);
}

.auth-dropdown-item.danger:hover {
  background: #fff1f2;
  color: #e11d48;
}

/* Authentication Modal Overlay */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 99999;
  animation: authOverlayFadeIn 0.2s ease-out;
}

.auth-modal-overlay.show {
  display: flex;
}

@keyframes authOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-modal-box {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  transform: translateY(0);
  transition: transform 0.2s ease;
}

.auth-modal-header {
  padding: 1.5rem 1.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--slate-100, #f1f5f9);
}

.auth-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-900, #0f172a);
  letter-spacing: -0.02em;
}

.auth-modal-close-btn {
  background: var(--slate-100, #f1f5f9);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--slate-500, #64748b);
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-modal-close-btn:hover {
  background: var(--slate-200, #e2e8f0);
  color: var(--slate-900, #0f172a);
}

/* Auth Tabs */
.auth-tabs-nav {
  display: flex;
  background: var(--slate-100, #f1f5f9);
  margin: 1rem 1.75rem 0.5rem;
  padding: 0.3rem;
  border-radius: 12px;
  gap: 0.3rem;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--slate-500, #64748b);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--primary, #4f46e5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Auth Form */
.auth-modal-body {
  padding: 1.25rem 1.75rem 1.75rem;
}

.auth-form-panel {
  display: none;
  flex-direction: column;
  gap: 1.1rem;
}

.auth-form-panel.active {
  display: flex;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-input-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-700, #334155);
}

.auth-input-field {
  padding: 0.65rem 0.95rem;
  border: 1.5px solid var(--slate-300, #cbd5e1);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--slate-800, #1e293b);
  transition: all 0.2s ease;
  outline: none;
}

.auth-input-field:focus {
  border-color: var(--primary, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.auth-submit-btn {
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--primary, #4f46e5) 0%, #7c3aed 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.auth-submit-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-footer-link {
  font-size: 0.8rem;
  color: var(--primary, #4f46e5);
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  display: block;
  margin-top: 0.5rem;
  cursor: pointer;
}

.auth-footer-link:hover {
  text-decoration: underline;
}

/* Alert Notification Messages */
.auth-alert {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  display: none;
  margin-bottom: 0.5rem;
}

.auth-alert.error {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  display: block;
}

.auth-alert.success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  display: block;
}
