/* Login/Register Popup Modal Styles */
#elephu-login-modal {
  display: none;
}

#elephu-login-modal.active {
  display: flex;
}

#elephu-login-modal .bg-white {
  box-shadow: 0 8px 32px rgb(0 0 0 / 18%);
}

#elephu-login-modal .elephu-login-tab {
  flex: 1;
  padding: 0.75rem 0;
  background: none;
  border: none;
  font-weight: 600;
  color: #1a264d;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

#elephu-login-modal .elephu-login-tab.active {
  color: #58e0ee;
  border-bottom: 2px solid #58e0ee;
}

#elephu-login-modal .elephu-auth-form {
  display: block;
}

#elephu-login-modal .elephu-auth-form.hidden {
  display: none;
}

#elephu-login-modal input[type="email"],
#elephu-login-modal input[type="password"],
#elephu-login-modal input[type="text"] {
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  width: 100%;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

#elephu-login-modal .btn-primary {
  background: linear-gradient(90deg, #f9d423 0%, #ff4e50 100%);
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

#elephu-login-modal .btn-primary:hover {
  background: linear-gradient(90deg, #ff4e50 0%, #f9d423 100%);
}

#elephu-login-modal .elephu-social-login {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  background: #fff;
  color: #333;
  margin: 0 0.25rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#elephu-login-modal .elephu-social-login.facebook {
  color: #1877f3;
  border-color: #1877f3;
}

#elephu-login-modal .elephu-social-login.google {
  color: #ea4335;
  border-color: #ea4335;
}

#elephu-login-modal .elephu-social-login:hover {
  background: #f3f4f6;
}

#elephu-login-modal .text-primary {
  color: #58e0ee;
}

/* Mobile Responsive Styles */
@media (max-width: 767px) {
  #elephu-login-modal .bg-white {
    width: 95% !important;
    max-width: 95% !important;
    margin: 1rem !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  #elephu-login-modal .md\\:block {
    display: none !important;
  }

  #elephu-login-modal .md\\:w-1\/2 {
    width: 100% !important;
  }

  #elephu-login-modal .p-8 {
    padding: 1.5rem !important;
  }

  #elephu-login-modal .elephu-login-tab {
    font-size: 0.875rem !important;
    padding: 0.5rem 0 !important;
  }

  #elephu-login-modal input[type="email"],
  #elephu-login-modal input[type="password"],
  #elephu-login-modal input[type="text"] {
    font-size: 0.875rem !important;
    padding: 0.625rem 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }

  #elephu-login-modal .btn-primary {
    font-size: 0.875rem !important;
    padding: 0.625rem 0.75rem !important;
  }

  #elephu-login-modal .elephu-social-login {
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
    margin: 0.25rem !important;
    width: calc(50% - 0.5rem) !important;
    justify-content: center !important;
  }

  #elephu-login-modal .flex.justify-center.space-x-2 {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  #elephu-login-modal .flex.justify-center.space-x-2 > * {
    margin: 0 !important;
  }

  #elephu-login-modal .text-sm {
    font-size: 0.75rem !important;
  }

  #elephu-login-modal .mb-6 {
    margin-bottom: 1.5rem !important;
  }

  #elephu-login-modal .mb-4 {
    margin-bottom: 1rem !important;
  }

  #elephu-login-modal .mb-2 {
    margin-bottom: 0.5rem !important;
  }

  #elephu-login-modal .flex.justify-between.items-center {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  #elephu-login-modal .flex.justify-between.items-center label {
    margin-bottom: 0.5rem !important;
  }

  #elephu-login-modal .flex.justify-between.items-center a {
    align-self: flex-end !important;
  }

  /* Hide fallback Google button on mobile when official button is present */
  #elephu-login-modal .elephu-social-login.google.hidden {
    display: none !important;
  }

  /* Ensure Google button container is properly sized */
  #elephu-login-modal #elephu-google-btn,
  #elephu-login-modal #elephu-google-btn-register {
    width: 100% !important;
    margin: 0.25rem 0 !important;
  }

  /* Make Google button responsive */
  #elephu-login-modal #elephu-google-btn > div,
  #elephu-login-modal #elephu-google-btn-register > div {
    width: 100% !important;
  }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
  #elephu-login-modal .bg-white {
    width: 98% !important;
    margin: 0.5rem !important;
    padding: 1rem !important;
  }

  #elephu-login-modal .p-8 {
    padding: 1rem !important;
  }

  #elephu-login-modal .elephu-login-tab {
    font-size: 0.8rem !important;
    padding: 0.4rem 0 !important;
  }

  #elephu-login-modal input[type="email"],
  #elephu-login-modal input[type="password"],
  #elephu-login-modal input[type="text"] {
    font-size: 0.8rem !important;
    padding: 0.5rem 0.625rem !important;
  }

  #elephu-login-modal .btn-primary {
    font-size: 0.8rem !important;
    padding: 0.5rem 0.625rem !important;
  }

  #elephu-login-modal .elephu-social-login {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.5rem !important;
    width: 100% !important;
    margin: 0.25rem 0 !important;
  }

  #elephu-login-modal .text-sm {
    font-size: 0.7rem !important;
  }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
  #elephu-login-modal .bg-white {
    max-height: 85vh !important;
  }

  #elephu-login-modal .p-8 {
    padding: 1rem !important;
  }

  #elephu-login-modal .mb-6 {
    margin-bottom: 1rem !important;
  }

  #elephu-login-modal .mb-4 {
    margin-bottom: 0.75rem !important;
  }
}