/**
 * Authentication Styles
 *
 * Styles for authentication modal, login buttons, and user navigation
 */

/* ===========================
   Authentication Modal
   =========================== */

.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.auth-modal-content {
  background: white;
  border-radius: 10px;
  padding: 2.5rem;
  max-width: 450px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.auth-modal.active .auth-modal-content {
  transform: scale(1);
}

.auth-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.auth-modal-close:hover {
  background-color: #f0f0f0;
  color: #333;
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-modal-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
}

.auth-modal-header p {
  font-size: 1rem;
  color: #666;
  margin: 0;
}

/* ===========================
   Auth Error Message
   =========================== */

.auth-error-message {
  background-color: #fee;
  border: 1px solid #fcc;
  border-radius: 5px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  color: #c33;
  font-size: 0.9rem;
  text-align: center;
}

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

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-button {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border: 1px solid #ddd;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
}

.auth-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

.auth-button i {
  font-size: 1.25rem;
}

/* Google Button */
.google-button {
  background-color: white;
  color: #333;
  border-color: #ddd;
}

.google-button:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #ccc;
}

.google-button i {
  color: #4285F4;
}

/* Facebook Button */
.facebook-button {
  background-color: #1877F2;
  color: white;
  border-color: #1877F2;
}

.facebook-button:hover:not(:disabled) {
  background-color: #166FE5;
  border-color: #166FE5;
}

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

.apple-button:hover:not(:disabled) {
  background-color: #333;
  border-color: #333;
}

/* Loading State */
.auth-button.loading {
  pointer-events: none;
}

/* ===========================
   Modal Footer
   =========================== */

.auth-modal-footer {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.auth-modal-terms {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.auth-modal-terms a {
  color: #FF6B6B;
  text-decoration: none;
}

.auth-modal-terms a:hover {
  text-decoration: underline;
}

/* ===========================
   Success Notification
   =========================== */

.auth-success-notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background-color: #28a745;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.auth-success-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Navigation (User Info)
   =========================== */

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FF6B6B;
}

.nav-user-name {
  font-weight: 600;
  color: #333;
}

.nav-auth-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-login-btn {
  background-color: transparent;
  color: #333;
  border: 2px solid #FF6B6B;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
}

.nav-login-btn:hover {
  background-color: #FF6B6B;
  color: white;
}

.nav-logout-btn {
  background-color: transparent;
  color: #666;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
}

.nav-logout-btn:hover {
  color: #FF6B6B;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
  .auth-modal-content {
    padding: 2rem 1.5rem;
    max-width: 95%;
  }

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

  .auth-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }

  .auth-success-notification {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    text-align: center;
  }

  .nav-user-name {
    display: none; /* Hide name on mobile, show only avatar */
  }

  .nav-user-avatar {
    width: 36px;
    height: 36px;
  }
}

/* ===========================
   Accessibility
   =========================== */

.auth-button:focus,
.nav-login-btn:focus,
.nav-logout-btn:focus,
.auth-modal-close:focus {
  outline: 2px solid #FF6B6B;
  outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
