/* ====== TokenSearch Shared Auth Styles ====== */

/* ---- Sign In Button (logged-out state) ---- */
.ts-login-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(99,102,241,.5);
  background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(99,102,241,.06));
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  font-family: inherit;
}
.ts-login-btn:hover {
  border-color: rgba(139,92,246,.7);
  background: linear-gradient(135deg, rgba(139,92,246,.25), rgba(99,102,241,.1));
  color: #c4b5fd;
}

/* ---- User Avatar Button (logged-in state) ---- */
.ts-user-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(99,102,241,.35);
  background: rgba(99,102,241,.08);
  cursor: pointer;
  transition: all .2s;
  position: relative;
  font-family: inherit;
}
.ts-user-btn:hover {
  border-color: rgba(139,92,246,.5);
  background: rgba(99,102,241,.14);
}
.ts-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(139,92,246,.4);
}
.ts-user-name {
  font-size: 12px;
  font-weight: 600;
  color: #c4b5fd;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ts-user-caret {
  opacity: .4;
  font-size: 8px;
  color: #94a3b8;
}

/* ---- User Dropdown ---- */
.ts-user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(13,16,28,.97);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 10px;
  min-width: 190px;
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  backdrop-filter: blur(14px);
  display: none;
  overflow: hidden;
}
.ts-user-dropdown.open { display: block; }
.ts-user-dropdown-header {
  padding: 12px 14px 8px;
  border-bottom: 1px solid rgba(139,92,246,.12);
}
.ts-user-dropdown-name {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}
.ts-user-dropdown-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}
.ts-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  font-size: 12px;
  color: #94a3b8;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.ts-user-dropdown-item:hover {
  background: rgba(139,92,246,.1);
  color: #e2e8f0;
}
.ts-user-dropdown-divider {
  border: none;
  border-top: 1px solid rgba(139,92,246,.1);
  margin: 4px 0;
}

/* ---- Modal Overlay ---- */
.ts-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  animation: tsOverlayIn .2s ease;
}
@keyframes tsOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Main Auth Modal ---- */
.ts-auth-modal {
  background: linear-gradient(160deg, #0d1022, #111528);
  border: 1px solid rgba(139,92,246,.28);
  border-radius: 20px;
  padding: 36px 30px 28px;
  width: 360px;
  max-width: 92vw;
  box-shadow: 0 32px 100px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.04);
  text-align: center;
  animation: tsModalIn .25s cubic-bezier(.34,1.56,.64,1);
  position: relative;
}
@keyframes tsModalIn {
  from { opacity: 0; transform: scale(.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.ts-auth-modal-close-x {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #475569;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color .15s;
}
.ts-auth-modal-close-x:hover { color: #94a3b8; }
.ts-auth-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
  margin: 0 auto 16px;
  display: block;
  filter: drop-shadow(0 0 16px rgba(99,102,241,.4));
}
.ts-auth-title {
  font-size: 20px;
  font-weight: 800;
  color: #e2e8f0;
  margin: 0 0 7px;
  letter-spacing: -.01em;
}
.ts-auth-subtitle {
  font-size: 12.5px;
  color: #64748b;
  margin: 0 0 16px;
  line-height: 1.5;
}
.ts-auth-optional-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.25);
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 22px;
}

/* ---- OAuth Buttons ---- */
.ts-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 10px;
  background: rgba(255,255,255,.03);
  font-family: inherit;
  text-align: center;
}
.ts-oauth-btn:last-of-type { margin-bottom: 0; }
.ts-oauth-google {
  border-color: rgba(255,255,255,.18);
  color: #e2e8f0;
}
.ts-oauth-google:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.35);
}
.ts-oauth-github {
  border-color: rgba(255,255,255,.18);
  color: #e2e8f0;
}
.ts-oauth-github:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.35);
}
.ts-oauth-twitter {
  border-color: rgba(255,255,255,.18);
  color: #e2e8f0;
}
.ts-oauth-twitter:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.35);
}
.ts-oauth-btn-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  color: #374151;
  font-size: 11px;
}
.ts-oauth-btn-divider::before,
.ts-oauth-btn-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.07);
}

/* ---- Auth Footer ---- */
.ts-auth-footer-text {
  font-size: 10.5px;
  color: #374151;
  margin: 20px 0 0;
  line-height: 1.5;
}
.ts-auth-footer-text a {
  color: #6366f1;
  text-decoration: none;
}
.ts-auth-footer-text a:hover { text-decoration: underline; }
.ts-auth-skip {
  display: block;
  margin: 12px auto 0;
  background: none;
  border: none;
  color: #475569;
  font-size: 11.5px;
  cursor: pointer;
  font-family: inherit;
  transition: color .15s;
}
.ts-auth-skip:hover { color: #94a3b8; }

/* ---- Favorites Lock Dialog ---- */
.ts-fav-dialog {
  background: linear-gradient(160deg, #0d1022, #111528);
  border: 1px solid rgba(139,92,246,.28);
  border-radius: 16px;
  padding: 28px 24px 22px;
  width: 300px;
  max-width: 90vw;
  box-shadow: 0 24px 80px rgba(0,0,0,.8);
  text-align: center;
  animation: tsModalIn .25s cubic-bezier(.34,1.56,.64,1);
}
.ts-fav-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(251,191,36,.4));
}
.ts-fav-dialog h3 {
  font-size: 16px;
  font-weight: 800;
  color: #e2e8f0;
  margin: 0 0 8px;
}
.ts-fav-dialog p {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 18px;
  line-height: 1.5;
}
.ts-fav-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 10px;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(99,102,241,.35);
}
.ts-fav-signin-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 4px 20px rgba(99,102,241,.5);
}

/* ---- Favorites locked state ---- */
body.ts-favs-locked .fav-btn,
body.ts-favs-locked .m-card-fav {
  cursor: not-allowed !important;
  opacity: .35 !important;
  filter: grayscale(.6);
}
