/* Auth Modal Styles */

/* Modal Overlay */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Fix for existing JavaScript that adds 'active' class to the modal element */
#sign-popup.active,
#register-popup.active,
#registerModal.active,
.auth-modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Fix for register modal that uses inline style display: flex */
#registerModal[style*="display: flex"],
#registerModal[style*="display:flex"] {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Modal Container */
.auth-modal-container-wide {
  position: relative;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

.auth-modal-container {
  position: relative;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

/* Modal Animation */
@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Wide */
.auth-modal-wide {
  position: relative;
  width: 100%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

/* Modal Content Wide */
.auth-modal-content-wide {
  display: flex;
  min-height: 500px;
}

/* Close Button */
.auth-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  z-index: 10;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

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

/* Left Section */
.auth-left-section {
  flex: 1;
  background: #d2d2d2;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}

.auth-illustration {
  margin-bottom: 30px;
}

.auth-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
}

.auth-benefits li i {
  margin-right: 10px;
  color: #4caf50;
  font-size: 16px;
}

/* Right Section */
.auth-modal-right {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Form Styles */
.auth-step-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-step-header h4 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.auth-step-header p {
  color: #666;
  font-size: 14px;
}

.auth-input-group {
  margin-bottom: 20px;
  position: relative;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  background-color: #fff;
}

.auth-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-input.error {
  border-color: #e74c3c;
}

.auth-continue-btn {
  width: 100%;
  padding: 12px;
  background: #e84848;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.auth-continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

/* Back Button */
.auth-back-btn {
  background: none;
  border: none;
  color: #667eea;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  transition: color 0.3s ease;
}

.auth-back-btn:hover {
  color: #5a6fd8;
}

.auth-back-btn svg {
  margin-right: 5px;
}

/* Links */
.auth-forgot-link {
  text-align: center;
  margin: 15px 0;
}

.auth-forgot-password {
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.auth-forgot-password:hover {
  color: #5a6fd8;
  text-decoration: underline;
}

.auth-signup-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}

.auth-signup-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.auth-signup-link a:hover {
  text-decoration: underline;
}

/* Terms */
.auth-terms {
  font-size: 12px;
  color: #999;
  text-align: center;
  margin-top: 20px;
  line-height: 1.4;
}

.auth-terms a {
  color: #667eea;
  text-decoration: none;
}

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

/* Email Display */
.auth-email-display {
  background-color: #f8f9fa;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

/* Message Styles */
.auth-message {
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}

.auth-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.auth-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-modal-container-wide,
  .auth-modal-container {
    width: 95%;
    margin: 20px;
  }

  .auth-modal-content-wide {
    flex-direction: column;
    min-height: auto;
  }

  .auth-left-section {
    padding: 30px 20px;
    min-height: 200px;
  }

  .auth-modal-right {
    padding: 30px 20px;
  }

  .auth-step-header h4 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .auth-modal-container-wide,
  .auth-modal-container {
    width: 100%;
    margin: 10px;
    border-radius: 8px;
  }

  .auth-left-section {
    padding: 20px 15px;
  }

  .auth-modal-right {
    padding: 20px 15px;
  }
}

/* Body modal open state */
body.modal-open {
  overflow: hidden;
}

/* Additional styles for register modal */
.auth-modal-content-new {
  padding: 40px;
  max-width: 500px;
  margin: 0 auto;
}

.auth-close-btn-new {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.auth-close-btn-new:hover {
  background-color: #f5f5f5;
}

.auth-header-new {
  text-align: center;
  margin-bottom: 30px;
}

.auth-title-new {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.auth-subtitle-new {
  color: #666;
  font-size: 14px;
}

.auth-row-two-col {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.auth-row-two-col .auth-input-group {
  flex: 1;
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .auth-row-two-col {
    flex-direction: column;
    gap: 0;
  }

  .auth-row-two-col .auth-input-group {
    margin-bottom: 20px;
  }
}

/* Missing styles for register modal */
.auth-input-new {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  background-color: #fff;
  box-sizing: border-box;
}

.auth-input-new:focus {
  outline: none;
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-input-new.error {
  border-color: #e74c3c;
}

.auth-submit-btn-new {
  width: 100%;
  padding: 12px;
  background: #e84848;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.auth-submit-btn-new:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px #e84848;
}

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

.auth-checkbox-group {
  margin-bottom: 20px;
}

.auth-checkbox-label {
  display: flex;
  align-items: flex-start;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  cursor: pointer;
}

.auth-checkbox {
  margin-right: 8px;
  margin-top: 2px;
  flex-shrink: 0;
}

.auth-terms-link {
  color: #667eea;
  text-decoration: none;
  margin-left: 4px;
}

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

.auth-footer-new {
  text-align: center;
  margin-top: 20px;
}

.auth-login-link {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.auth-login-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.auth-login-link a:hover {
  text-decoration: underline;
}

/* Password strength indicator styles */
.password-strength-container {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e1e5e9;
}

.password-requirements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.requirement {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #666;
}

.req-icon {
  margin-right: 6px;
  font-size: 10px;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #e74c3c;
  color: white;
  font-weight: bold;
}

.requirement.valid .req-icon {
  background-color: #4caf50;
  content: "✓";
}

.requirement.valid {
  color: #4caf50;
}

@media (max-width: 480px) {
  .password-requirements {
    grid-template-columns: 1fr;
  }
}

/* Missing styles for login modal */
.auth-right-section {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-form-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-form-header h3 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

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

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  background: white;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

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

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

.auth-facebook-btn:hover {
  border-color: #1877f2;
  background-color: #f0f4ff;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 20px 0;
  color: #666;
  font-size: 14px;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e1e5e9;
  z-index: 1;
}

.auth-divider span {
  background: white;
  padding: 0 15px;
  position: relative;
  z-index: 2;
}

.auth-back-section {
  margin-bottom: 20px;
}

.auth-error-message {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

.login-step {
  width: 100%;
}

.auth-left-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.auth-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auth-benefit-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: rgb(3, 3, 3);
}

.auth-benefit-item svg {
  margin-right: 10px;
  flex-shrink: 0;
}

.auth-benefit-item span {
  line-height: 1.4;
}

/* Responsive adjustments for login modal */
@media (max-width: 768px) {
  .auth-right-section {
    padding: 30px 20px;
  }

  .auth-form-header h3 {
    font-size: 20px;
  }

  .auth-social-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .auth-right-section {
    padding: 20px 15px;
  }

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