/* 
  URBAN PROJECT - Authentication Pages Stylesheet
*/

.auth-page-viewport {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}

.auth-page-viewport::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 245, 255, 0.08) 0%, transparent 70%);
  top: 10%;
  left: 10%;
}

.auth-page-viewport::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 0, 127, 0.08) 0%, transparent 70%);
  bottom: 10%;
  right: 10%;
}

.auth-card-container {
  width: 100%;
  max-width: 450px;
  position: relative;
  z-index: 10;
}

.auth-glass-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.auth-logo-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.auth-logo-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.auth-logo-header p {
  font-size: 0.9rem;
  color: var(--text-gray);
}

/* Authentication Tabs */
.auth-tabs-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(7, 17, 31, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  padding: 4px;
}

.auth-tab-btn {
  padding: 10px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-gray);
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.auth-tab-btn:hover {
  color: var(--text-white);
}

.auth-tab-btn.active {
  background: var(--bg-tertiary);
  color: var(--accent-cyan);
  text-shadow: var(--glow-blue);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Auth Forms */
.auth-forms-switchable {
  position: relative;
  width: 100%;
}

.auth-form-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.4s forwards;
}

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

.auth-input-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-input-group label {
  font-size: 0.85rem;
  color: var(--text-gray);
  font-weight: 600;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrapper i {
  position: absolute;
  left: 15px;
  color: var(--text-muted);
  font-size: 1rem;
}

.auth-input-wrapper .password-toggle-eye {
  position: absolute;
  right: 15px;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
}
.auth-input-wrapper .password-toggle-eye:hover {
  color: var(--accent-cyan);
}

.auth-text-input {
  width: 100%;
  padding: 12px 15px 12px 42px;
  background: rgba(7, 17, 31, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.auth-text-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.15);
}

/* Actions details row */
.auth-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.auth-remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-gray);
  cursor: pointer;
}

.auth-forgot-link {
  color: var(--accent-cyan);
}
.auth-forgot-link:hover {
  text-decoration: underline;
  text-shadow: var(--glow-blue);
}

.btn-auth-submit {
  width: 100%;
  padding: 12px;
}

.auth-social-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 10px 0;
}

.auth-social-divider::before, .auth-social-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-social-divider:not(:empty)::before { margin-right: 10px; }
.auth-social-divider:not(:empty)::after { margin-left: 10px; }

.auth-social-buttons {
  display: flex;
  gap: 15px;
}

.btn-social-auth {
  flex-grow: 1;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-social-auth:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================
   ANIMATIONS & TRANSITIONS
   ========================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   FUTURISTIC CAPTCHA STYLING
   ========================================== */
.auth-captcha-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 5px;
}

.captcha-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* Styled text CAPTCHA box (replaces canvas) */
.captcha-display-box {
  flex-shrink: 0;
  min-width: 130px;
  height: 46px;
  background: #07111f;
  border: 1px solid rgba(0, 245, 255, 0.25);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #00f5ff;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.6);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5), 0 0 8px rgba(0, 245, 255, 0.08);
  transition: opacity 0.2s ease, transform 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.captcha-answer-input {
  flex: 1;
  min-width: 0;
  padding: 12px 15px !important;
  font-size: 1rem !important;
  letter-spacing: 1px;
}

.btn-captcha-refresh {
  flex-shrink: 0;
  background: rgba(7, 17, 31, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-gray);
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.btn-captcha-refresh:hover,
.btn-captcha-refresh:active {
  background: rgba(0, 245, 255, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  text-shadow: var(--glow-blue);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.15);
}

/* ==========================================
   MOBILE RESPONSIVE — AUTH PAGE
   ========================================== */
@media (max-width: 768px) {
  .auth-glass-card {
    padding: 28px 20px;
    gap: 20px;
  }

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

  /* Prevent iOS auto-zoom on input focus (needs 16px min) */
  .auth-text-input,
  .captcha-answer-input {
    font-size: 16px !important;
  }

  /* Larger tap targets */
  .auth-tab-btn {
    padding: 12px 10px;
    min-height: 44px;
  }

  .btn-auth-submit {
    padding: 14px;
    font-size: 1rem;
    min-height: 50px;
  }

  .btn-social-auth {
    padding: 13px 10px;
    min-height: 48px;
  }
}

@media (max-width: 480px) {
  .auth-page-viewport {
    padding: 30px 12px;
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
  }

  .auth-glass-card {
    padding: 22px 16px;
    gap: 18px;
  }

  .auth-logo-header h2 {
    font-size: 1.35rem;
  }

  /* CAPTCHA: allow wrap on very small phones */
  .captcha-container {
    gap: 8px;
  }

  .captcha-display-box {
    min-width: 110px;
    font-size: 1rem;
    letter-spacing: 1.5px;
    height: 44px;
  }

  .captcha-answer-input {
    font-size: 16px !important;
  }

  .btn-captcha-refresh {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .auth-social-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .btn-social-auth {
    width: 100%;
  }

  .auth-options-row {
    flex-wrap: wrap;
    gap: 10px;
  }
}
