/* Upvote Button Styles */
.directorist-listing-card {
  position: relative;
}
.ai-upvote-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}
.ai-thumbs-up {
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}
.ai-thumbs-up.clicked {
  animation: aiThumbLift 0.4s ease;
  transform-origin: bottom center;
}
@keyframes aiThumbLift {
  50% { transform: rotate(-45deg) translateY(-8px); }
}
/* This now styles the vote count on the leaderboard card as well */
.ai-vote-count {
  font-weight: 600;
  font-size: 0.95rem;
  color: #522e9b !important; /* Your purple color */
}
.ai-thumbs-up.active {
  color: #522e9b; /* Your purple color */
  transform: scale(1.1) rotate(-10deg);
}

/* LEADERBOARD CARD STYLES
==================================================================== */

.ai-top-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.ai-tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.ai-tool-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-8px);
}

/* Card Header Styles */
.ai-tool-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background-color: #f8f9fa;
  text-decoration: none !important;
  border-bottom: none !important;
}
.ai-tool-card-header:hover h4 {
  color: #522e9b;
}
.ai-tool-card-logo,
.ai-tool-card-logo-placeholder {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}
.ai-tool-card-header h4 {
  font-size: 1.1rem;
  color: #222;
  margin: 0;
  transition: color 0.2s ease;
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card Content (Excerpt & Category) */
.ai-tool-card-content {
  padding: 16px 20px;
  flex-grow: 1;
}
.ai-tool-card-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* MOVED: Category is now styled within the content area */
.ai-tool-card-category, .ai-tool-card-category:hover {
  display: inline-block; /* Allows margin-top to work */
  font-size: 0.8rem;
  color: #555 !important;
  background-color: #f0f0f0;
  padding: 4px 10px;
  border-radius: 15px;
  text-decoration: none !important;
  border-bottom: none !important;
  transition: background-color 0.2s ease;
  margin-top: 12px; /* Adds space above the category tag */
}
.ai-tool-card-category:hover {
  background-color: #e0e0e0;
  color: #000 !important;
}

/* UPDATED: Card Footer now pushes the vote button to the right */
.ai-tool-card-footer {
  display: flex;
  justify-content: flex-end; /* Pushes content to the right */
  align-items: center;
  padding: 8px 20px; /* Adjusted padding for a tighter look */
  border-top: 1px solid #f0f0f0;
}

/*
  The .ai-upvote-wrapper styles are already defined at the top
  and will now apply to the button inside the footer perfectly.
  The .ai-vote-count color is also now handled globally.
*/