/* ============================================================
   Authentication Modal Styles
   ============================================================
   Simplified inline modal for Login/Signup
   Mobile-first responsive design
*/

/* ========== Modal Overlay ========== */

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  animation: authFadeIn 0.2s ease-out;
}

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

/* ========== Modal Container ========== */

.auth-modal {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  animation: authSlideUp 0.3s ease-out;
}

@keyframes authSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ========== Close Button ========== */

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
  z-index: 1;
}

.auth-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
  transform: scale(1.05);
}

.auth-modal-close:active {
  transform: scale(0.95);
}

/* ========== Modal Header ========== */

.auth-modal-header {
  padding: 40px 32px 24px;
  text-align: center;
}

.auth-modal-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px;
  line-height: 1.3;
}

.auth-modal-message {
  font-size: 14px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* ========== Tabs ========== */

.auth-modal-tabs {
  display: flex;
  gap: 8px;
  padding: 0 32px;
  border-bottom: 1px solid #e5e5e5;
}

.auth-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.auth-tab:hover {
  color: #333;
}

.auth-tab.active {
  color: #8B5CF6;
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #8B5CF6;
  border-radius: 2px 2px 0 0;
}

/* ========== Modal Body ========== */

.auth-modal-body {
  padding: 24px 32px 32px;
  position: relative;
}

/* ========== Forms ========== */

.auth-form {
  display: none;
  animation: authFormFadeIn 0.2s ease-out;
}

.auth-form.active {
  display: block;
}

@keyframes authFormFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form-group {
  margin-bottom: 16px;
}

.auth-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
}

.auth-form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  font-size: 15px;
  color: #1a1a1a;
  transition: all 0.2s ease;
  background: white;
  box-sizing: border-box;
}

.auth-form-group input:focus {
  outline: none;
  border-color: #8B5CF6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.auth-form-group input::placeholder {
  color: #999;
}

/* ========== Password Input Wrapper ========== */

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

.auth-password-wrapper input {
  width: 100%;
  padding-right: 48px !important;
}

.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: color 0.2s ease;
}

.auth-password-toggle:hover {
  color: #8B5CF6;
}

.auth-password-toggle .eye-icon {
  width: 20px;
  height: 20px;
}

/* ========== Forgot Password Link ========== */

.auth-forgot-password {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: #8B5CF6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-forgot-password:hover {
  color: #7C3AED;
  text-decoration: underline;
}

/* ========== Password Hint ========== */

.auth-password-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #999;
}

/* ========== Error & Success Messages ========== */

.auth-form-error {
  display: none;
  padding: 10px 12px;
  background: #FEE2E2;
  border: 1px solid #FECACA;
  border-radius: 6px;
  color: #DC2626;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.auth-form-error.success {
  background: #D1FAE5;
  border-color: #A7F3D0;
  color: #059669;
}

/* ========== Buttons ========== */

.auth-btn-primary {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.auth-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.auth-btn-primary:active {
  transform: translateY(0);
}

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

.auth-btn-loader svg {
  display: block;
}

/* ========== Divider ========== */

.auth-modal-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: #999;
  font-size: 13px;
}

.auth-modal-divider::before,
.auth-modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}

/* ========== Social Buttons ========== */

.auth-modal-social {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 0;
}

.auth-btn-social {
  width: 100%;
  height: 48px;
  padding: 0 24px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  color: #333;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
}

.auth-btn-social svg {
  position: absolute;
  left: 16px;
  flex-shrink: 0;
}

.auth-btn-social:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Google Button */
.auth-btn-google:hover:not(:disabled) {
  background: #f9f9f9;
  border-color: #4285f4;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-btn-google:active:not(:disabled) {
  transform: translateY(0);
}

/* Apple Button */
.auth-btn-apple {
  background: #000;
  color: white;
  border-color: #000;
}

.auth-btn-apple:hover:not(:disabled) {
  background: #1a1a1a;
}

.auth-btn-apple:active:not(:disabled) {
  background: #333;
}

/* ========== Mobile Responsiveness ========== */

@media (max-width: 480px) {
  .auth-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .auth-modal {
    border-radius: 20px 20px 0 0;
    max-height: 95vh;
  }

  .auth-modal-header {
    padding: 32px 24px 20px;
  }

  .auth-modal-title {
    font-size: 20px;
  }

  .auth-modal-message {
    font-size: 13px;
  }

  .auth-modal-tabs {
    padding: 0 24px;
  }

  .auth-modal-body {
    padding: 20px 24px 24px;
  }

  .auth-modal-divider {
    margin: 16px 0;
  }

  .auth-btn-social {
    height: 44px;
    font-size: 14px;
  }
}

/* ========== Scrollbar Styling ========== */

.auth-modal::-webkit-scrollbar {
  width: 8px;
}

.auth-modal::-webkit-scrollbar-track {
  background: transparent;
}

.auth-modal::-webkit-scrollbar-thumb {
  background: #e5e5e5;
  border-radius: 4px;
}

.auth-modal::-webkit-scrollbar-thumb:hover {
  background: #d5d5d5;
}

/* Dark Mode is intentionally disabled for auth modal - always light */
