/* ============================================================
   THINK! VENTURES -- Auth UI Styles
   Modal, form, nav auth button styles
   ============================================================ */

/* ── Auth Modal Overlay ─────────────────────────────── */
#tv-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 15, 26, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#tv-auth-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Auth Modal Card ────────────────────────────────── */
.tv-auth-modal {
  position: relative;
  width: 90%;
  max-width: 420px;
  background: linear-gradient(145deg, rgba(13, 79, 79, 0.25), rgba(7, 15, 26, 0.95));
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(16, 185, 129, 0.08);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#tv-auth-overlay.active .tv-auth-modal {
  transform: translateY(0) scale(1);
}

.tv-auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.tv-auth-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ── Auth Header ────────────────────────────────────── */
.tv-auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.tv-auth-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
  background: linear-gradient(135deg, #10B981, #F5A623);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tv-auth-header p {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* ── Auth Error ─────────────────────────────────────── */
.tv-auth-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #f87171;
}

.tv-auth-error.shake {
  animation: authShake 0.4s ease;
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

/* ── Auth Form ──────────────────────────────────────── */
.tv-auth-field {
  margin-bottom: 1rem;
}

.tv-auth-field label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tv-auth-field input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.tv-auth-field input:focus {
  outline: none;
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.06);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.tv-auth-field input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* ── Submit Button ──────────────────────────────────── */
.tv-auth-submit {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #10B981, #0D9668);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tv-auth-submit:hover {
  background: linear-gradient(135deg, #0D9668, #10B981);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.tv-auth-submit:active {
  transform: translateY(0);
}

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

/* ── Spinner ────────────────────────────────────────── */
.tv-auth-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.6s linear infinite;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

/* ── Toggle Link ────────────────────────────────────── */
.tv-auth-toggle {
  text-align: center;
  margin-top: 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.tv-auth-toggle button {
  background: none;
  border: none;
  color: #10B981;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-left: 0.25rem;
  transition: color 0.2s ease;
}

.tv-auth-toggle button:hover {
  color: #F5A623;
}

/* ── Google Sign-In Button ─────────────────────────── */
.tv-auth-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tv-auth-google:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.tv-auth-google svg {
  flex-shrink: 0;
}

/* ── Divider ───────────────────────────────────────── */
.tv-auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
}

.tv-auth-divider::before,
.tv-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.tv-auth-divider span {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ── Nav Auth Elements ──────────────────────────────── */
#tv-nav-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.tv-nav-user {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.tv-nav-auth-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: linear-gradient(135deg, #10B981, #0D9668);
  border: none;
  color: #fff;
}

.tv-nav-auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tv-nav-signout {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.tv-nav-signout:hover {
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  box-shadow: none;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 480px) {
  .tv-auth-modal {
    padding: 2rem 1.5rem;
    width: 95%;
  }

  .tv-auth-header h2 {
    font-size: 1.5rem;
  }

  .tv-nav-user {
    display: none;
  }
}
