/* ==========================================================
   Auth UI Styles -- Nav user menu + Sign-in modal
   ========================================================== */

/* === Nav Auth Item === */
.nav-auth {
  margin-left: 2rem;
  position: relative;
  display: flex;
  align-items: center;
}

/* === Sign In Button === */
.nav-signin-btn {
  background: transparent;
  border: 1px solid var(--border-color, rgba(255,255,255,0.1));
  color: var(--body-text, #E2E0ED);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-family: var(--body-font, 'Instrument Sans', sans-serif);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-signin-btn:hover {
  border-color: var(--primary-accent, #A78BFA);
  color: var(--primary-accent, #A78BFA);
}

/* === User Avatar Button === */
.nav-user-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-accent, #A78BFA);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display-font, 'Sora', sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  transition: box-shadow 0.2s ease;
}

.nav-user-btn:hover .nav-user-avatar {
  box-shadow: 0 0 0 2px var(--bg-color, #0D0B24), 0 0 0 4px var(--primary-accent, #A78BFA);
}

/* === User Dropdown === */
.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-elevated, #16133A);
  border: 1px solid var(--border-color, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 0.75rem;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.nav-user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.nav-user-name {
  color: var(--body-text, #E2E0ED);
  font-weight: 500;
  font-size: 0.875rem;
}

.nav-user-tier {
  background: var(--primary-accent, #A78BFA);
  color: #fff;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-user-logout {
  background: none;
  border: none;
  color: var(--text-secondary, #9B97B8);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.25rem 0;
  width: 100%;
  text-align: left;
  font-family: var(--body-font, 'Instrument Sans', sans-serif);
  transition: color 0.15s ease;
}

.nav-user-logout:hover {
  color: var(--body-text, #E2E0ED);
}

/* === Sign In Modal === */
.hb-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: hb-auth-fadein 0.15s ease;
}

@keyframes hb-auth-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hb-auth-modal {
  background: var(--bg-elevated, #16133A);
  border: 1px solid var(--border-color, rgba(255,255,255,0.1));
  border-radius: 12px;
  padding: 2rem;
  max-width: 380px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hb-auth-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-secondary, #9B97B8);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.hb-auth-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--body-text, #E2E0ED);
}

.hb-auth-title {
  font-family: var(--display-font, 'Sora', sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--body-text, #E2E0ED);
  margin-bottom: 0.5rem;
}

.hb-auth-subtitle {
  color: var(--text-secondary, #9B97B8);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.hb-auth-providers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hb-auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: var(--body-font, 'Instrument Sans', sans-serif);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.hb-auth-google {
  background: #fff;
  color: #333;
  border-color: #ddd;
}

.hb-auth-google:hover {
  background: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hb-auth-github {
  background: #24292e;
  color: #fff;
  border-color: #444;
}

.hb-auth-github:hover {
  background: #2f363d;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hb-auth-footer {
  color: var(--text-muted, #6B6889);
  font-size: 0.75rem;
  text-align: center;
  margin-top: 1.25rem;
  margin-bottom: 0;
}

/* === Legacy License Claim Banner === */
.hb-claim-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  max-width: 480px;
  width: calc(100% - 2rem);
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  font-family: var(--body-font, "Instrument Sans", sans-serif);
}

.hb-claim-inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.hb-claim-content {
  flex: 1;
}

.hb-claim-title {
  color: #E2E0ED;
  font-size: 0.95rem;
  font-weight: 700;
}

.hb-claim-desc {
  color: #9B97B8;
  font-size: 0.85rem;
  margin: 0.25rem 0 0.75rem;
}

.hb-claim-actions {
  display: flex;
  gap: 0.5rem;
}

.hb-claim-link-btn {
  background: #A78BFA;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.hb-claim-dismiss-btn {
  background: transparent;
  color: #9B97B8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

.hb-claim-close-btn {
  background: none;
  border: none;
  color: #9B97B8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* === Upgrade Banner Actions === */
.upgrade-banner-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* === Avatar Image === */
.nav-user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-user-btn:hover .nav-user-avatar-img {
  box-shadow: 0 0 0 2px var(--bg-color, #0D0B24), 0 0 0 4px var(--primary-accent, #A78BFA);
}

/* === Account Link === */
.nav-user-link {
  display: block;
  color: var(--text-secondary, #9B97B8);
  font-size: 0.875rem;
  padding: 0.25rem 0;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-user-link:hover {
  color: var(--body-text, #E2E0ED);
}

/* === Mobile === */
@media (max-width: 768px) {
  .nav-auth {
    margin-left: 0;
    margin-top: 1rem;
  }

  .nav-user-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0.5rem 0;
    background: transparent;
    min-width: auto;
  }
}
