/**
 * Authentication Styles
 * Login modal and authentication UI
 */

/* Auth Container in Header */
.auth-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Login Button - matches original header style */
.auth-login-btn {
  background: none;
  color: #00555F;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-login-btn:hover {
  background-color: rgba(0, 85, 95, 0.05);
}

/* Logout Button - subtle red style */
.auth-logout-btn {
  background: none;
  color: #dc3545;
  border: 1px solid #dc3545;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-logout-btn:hover {
  background-color: rgba(220, 53, 69, 0.05);
}

/* User info display */
.auth-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-user-email {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: bold;
  color: #00555F;
}

.auth-user-email i {
  font-size: 16px;
  color: #00555F;
}

/* Login Modal Overlay */
.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

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

/* Login Modal Content */
.login-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 420px;
  animation: slideUp 0.3s ease;
}

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

/* Modal Header */
.login-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid #e0e0e0;
}

.login-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.login-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.login-modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

/* Modal Body */
.login-modal-body {
  padding: 28px;
}

/* Login Form */
#loginForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  display: flex;
  align-items: center;
  gap: 6px;
}

.login-form-group label i {
  color: #007bff;
  font-size: 14px;
}

.login-form-group input {
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.login-form-group input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

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

/* Login Error */
.login-error {
  display: none;
  padding: 12px 14px;
  background: #fff3f3;
  border: 1px solid #ffcccb;
  border-radius: 6px;
  color: #d32f2f;
  font-size: 14px;
  font-weight: 500;
}

.login-error:not(:empty) {
  display: block;
}

/* Submit Button */
.login-submit-btn {
  padding: 14px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.login-submit-btn:hover:not(:disabled) {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
}

.login-submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.login-submit-btn i.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .auth-login-btn,
  .auth-logout-btn {
    font-size: 13px;
    padding: 6px 12px;
  }

  .auth-user-email {
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .login-modal-content {
    max-width: 90%;
    margin: 20px;
  }

  .login-modal-header {
    padding: 20px;
  }

  .login-modal-header h2 {
    font-size: 20px;
  }

  .login-modal-body {
    padding: 20px;
  }

  /* Mobile menu styling for auth buttons */
  .auth-container {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 15px;
  }

  .auth-login-btn,
  .auth-logout-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
  }

  .auth-user-info {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .auth-user-email {
    font-size: 14px;
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .auth-login-btn,
  .auth-logout-btn {
    font-size: 13px;
    padding: 10px;
  }
}
