/* Authentication Modal Styles */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.auth-modal-content {
  background: white;
  border-radius: 16px;
  padding: 0;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalSlideIn 0.3s ease-out;
}

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

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid #e5e7eb;
}

.auth-modal-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 600;
}

.auth-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.password-label-container {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.auth-btn-full-width {
    width: 100%;
    margin-top: 1rem;
}

.forgot-password-link {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    color: #1d4ed8;
    text-decoration: none;
    font-size: 0.875rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.auth-tabs {
    position: relative;
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.auth-modal-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    z-index: 10;
}

.auth-modal-close:hover {
    color: #374151;
}

/* Password Match Indicator */
.password-match-indicator {
    margin: 0.5rem 0;
}

.match-text {
    font-size: 12px;
    font-weight: 500;
}

.match-text.match {
    color: #10b981;
}

.match-text.no-match {
    color: #ef4444;
}

.auth-btn-google {
  width: 100%;
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.auth-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.auth-modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

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

.auth-modal-body p {
  margin: 0 0 20px 0;
  color: #6b7280;
  text-align: center;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  color: #6b7280;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
}

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

/* Tab Content */
.auth-tab-content {
  display: none;
}

.auth-tab-content.active {
  display: block;
}

/* Auth Sections */
.auth-section {
  margin-bottom: 20px;
}

.auth-section h4 {
  margin: 0 0 12px 0;
  color: #1f2937;
  font-size: 1rem;
  font-weight: 600;
}

/* Auth Divider */
.auth-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e5e7eb;
}

.auth-divider span {
  background: white;
  padding: 0 16px;
  color: #6b7280;
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

/* Form Groups */
.form-group {
  margin-bottom: 16px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ca3af;
  font-style: italic;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
}

.form-group textarea::placeholder {
  line-height: 1.5;
}

/* Primary Auth Button */
.auth-btn-primary {
  background: #84cc16;
  color: white;
  border: none;
  width: 100%;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 1.1rem;
}

.auth-btn-primary:hover {
  background: #65a30d;
}

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

/* Form Footer */
.form-footer {
  margin-top: 16px;
  text-align: center;
}

.auth-link {
  background: none;
  border: none;
  color: #60a5fa;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0;
}

.auth-link:hover {
  color: #3b82f6;
}

/* Inline Messages */
.inline-error,
.inline-success {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

.inline-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.inline-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}

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

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  color: #374151;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.auth-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-1px);
}

.auth-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.auth-btn-google {
  border-color: #4285f4;
  color: #4285f4;
}

.auth-btn-google:hover {
  background: #4285f4;
  color: white;
  border-color: #4285f4;
}

/* Override: primary auth button must look like Create VisitPrep CTA */
.auth-btn.auth-btn-primary {
  background: #84cc16;
  color: white;
  border: none;
}

.auth-btn.auth-btn-primary:hover {
  background: #65a30d;
}

.auth-btn-outline {
  border-color: #60a5fa;
  color: #60a5fa;
}

.auth-btn-outline:hover {
  background: #60a5fa;
  color: white;
  border-color: #60a5fa;
}



/* User Menu Styles */
.user-menu {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid #e5e7eb;
  min-width: 250px;
  animation: menuSlideIn 0.2s ease-out;
  position: absolute;
  z-index: 1000;
}

/* LinkedIn-style user menu */
.user-menu.linkedin-style {
  min-width: 280px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #d1d5db;
}

.user-menu-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.user-menu-details {
  flex: 1;
}

.user-menu-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 1rem;
  margin-bottom: 2px;
}

.user-menu-email {
  color: #6b7280;
  font-size: 0.875rem;
}

.menu-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  padding: 12px 16px;
  color: #374151;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  border-radius: 4px;
}

.menu-action-btn:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.menu-action-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

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

.user-menu-content {
  padding: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.user-name {
  font-weight: 600;
  color: #6b7280;
  font-size: 0.95rem;
}

.user-email {
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 2px;
}

.user-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-menu-actions button {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.user-menu-actions button:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* Auth Error Styles */
.auth-error {
  animation: errorSlideIn 0.3s ease-out;
}

@keyframes errorSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Password Field with Toggle */
.password-field {
  position: relative;
}

.password-field input {
  padding-right: 48px; /* Make room for the toggle button */
}

.password-toggle {
  position: absolute !important;
  right: 12px !important;
  /* Vertical centering that is resilient to varying input heights */
  top: 0 !important;
  bottom: 0 !important;
  margin: auto 0 !important;
  background: none !important;
  border: none !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  padding: 0 !important;
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.password-toggle:hover {
  background: #f3f4f6;
  color: #374151;
}

.password-toggle:focus {
  outline: none;
  background: #f3f4f6;
  color: #374151;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
  flex-shrink: 0;
}

/* Ensure all password inputs reserve space and have consistent height */
.password-field input[type="password"],
.password-field input[type="text"] {
  padding-right: 48px !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
}

/* Additional specific rules for profile page password toggles */
.profile-section .password-toggle,
#security-section .password-toggle {
  position: absolute !important;
  right: 12px !important;
  top: 0 !important;
  bottom: 0 !important;
  margin: auto 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Responsive Design */
@media (max-width: 480px) {
  .auth-modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .auth-modal-header {
    padding: 20px 20px 0 20px;
  }
  
  .auth-modal-body {
    padding: 20px;
  }
  
  .auth-btn {
    padding: 14px 16px;
    font-size: 1rem;
  }
} 