.ld-ranker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ld-vote-count {
  font-size: 14px;
  font-weight: 800;
  color: #6c6c6c;
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: -0.42px;
  line-height: 22px;
  text-align: center;
  left: 50%;
  transform: translateX(-50%);
}

.ld-vote:hover {
  background: #d8d8d8;
  transform: scale(1.05);
}

.ld-vote:active {
  transform: scale(0.95);
}

.ld-vote-count {
  font-size: 14px;
  font-weight: 800;
  color: #6c6c6c;
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: -0.42px;
  line-height: 22px;
  text-align: center;
  left: 50%;
  transform: translateX(-50%);
}

/* Keep the small up/down counts neutral (override previous coloring) */
.ld-vote-wrapper.voted-up .ld-vote-count,
.ld-ranker.up .ld-vote-count,
.ld-vote-wrapper.voted-down .ld-vote-count,
.ld-ranker.down .ld-vote-count {
  color: #6c6c6c;
}

/* Upvote active state */
.ld-ranker.up .ld-up {
  background: #9febe2 !important;
  color: #161616 !important;
}

/* Downvote active state */
.ld-ranker.down .ld-down {
  background: #ffafb4 !important;
  color: #161616 !important;
}

/* For archive display - vertical layout with count below */
.ld-archive-votes .ld-ranker {
  flex-direction: row;
  gap: 10px;
}

.ld-archive-votes .ld-ranker > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.ld-archive-votes .ld-vote {
  position: static;
}

.ld-archive-votes .ld-vote-count {
  position: static;
  transform: none;
}

/* All Deals Grid Layout */
.ld-all-deals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin: 30px 0;
}

@media (max-width: 1200px) {
  .ld-all-deals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .ld-all-deals-grid {
    grid-template-columns: 1fr;
  }
}

.ld-deal-card {
  background: #f7f7f7;
  border: 1px solid #ececec;
  padding: 15px 20px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* Mobile: column layout with vote section below */
@media (max-width: 768px) {
  .ld-deal-card {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    padding: 15px 20px;
  }

  .ld-deal-card .ld-deal-separator {
    display: none;
  }
}

.ld-deal-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .ld-deal-card-header {
    justify-content: flex-start;
  }
}

.ld-deal-logo {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 0.75px solid #e6e6e6;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ld-deal-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.ld-deal-title {
  margin: 0;
  font-weight: 700;
  line-height: 24px;
  text-transform: capitalize;
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #161616;
  font-size: 26px;
  letter-spacing: -0.26px;
}

.ld-deal-title a {
  color: #161616 !important;
  text-decoration: none;
}

.ld-deal-title a:hover {
  color: #000 !important;
}

/* Archive title link styles */
.ld-archive-title a {
  color: #161616 !important;
  text-decoration: none;
}

.ld-archive-title a:hover {
  color: #000 !important;
}

.ld-deal-separator {
  width: 100%;
  height: 1px;
  background: #e0e0e0;
  margin: 5px 0 15px 0;
}

.ld-deal-vote-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 768px) {
  .ld-deal-vote-section {
    flex-shrink: 0;
    width: auto;
  }
}

/* Grid-specific ranker styles */
.ld-ranker-grid {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

@media (max-width: 768px) {
  .ld-ranker-grid {
    width: auto;
  }
}

.ld-ranker-grid .ld-vote-btn {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  background: #ececec;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: #161616;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  font-weight: 700;
}

.ld-ranker-grid .ld-vote-btn:hover {
  background: #d8d8d8;
  transform: scale(1.05);
}

.ld-ranker-grid .ld-vote-btn:active {
  transform: scale(0.95);
}

.ld-ranker-grid .ld-vote-icon {
  font-size: 18px;
  line-height: 1;
  display: block;
}

.ld-vote-bar {
  flex: 1;
  min-width: 140px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

@media (max-width: 768px) {
  .ld-vote-bar {
    min-width: 120px;
  }
}

.ld-vote-bar.neutral {
  background: #ececec;
}

.ld-vote-bar.medium {
  background: #ffafb4;
}

.ld-vote-bar.high {
  background: #9febe2;
}

/* User vote colors for vote bar (overrides popularity colors) */
.ld-vote-bar.voted-up {
  background: #9febe2 !important;
}

.ld-vote-bar.voted-down {
  background: #ffafb4 !important;
}

.ld-vote-total {
  font-size: 18px;
  font-weight: 800;
  line-height: 24.75px;
  letter-spacing: -0.18px;
  color: #161616;
  text-align: center;
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

/* Active vote states for grid */
.ld-ranker-grid.up .ld-up {
  background: #9febe2;
  color: #161616;
}

.ld-ranker-grid.down .ld-down {
  background: #ffafb4;
  color: #161616;
}

/* Pagination */
.ld-pagination {
  margin: 40px 0;
  text-align: center;
}

.ld-pagination .page-numbers {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  transition: all 0.2s ease;
}

.ld-pagination .page-numbers:hover {
  background: #e0e0e0;
}

.ld-pagination .page-numbers.current {
  background: #161616;
  color: #fff;
  border-color: #161616;
}

/* Single Deal Vote Shortcode */
.ld-single-vote-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
  gap: 20px;
}

@media (max-width: 768px) {
  .ld-single-vote-wrapper {
    flex-direction: column;
  }
}

.ld-ranker-single {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 500px;
  /* width: 100%; */
}

.ld-ranker-single .ld-vote-btn {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  background: #ececec;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: #161616;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  font-weight: 700;
}

.ld-ranker-single .ld-vote-btn:hover {
  background: #d8d8d8;
  transform: scale(1.05);
}

.ld-ranker-single .ld-vote-icon {
  font-size: 18px;
  line-height: 1;
}

.ld-ranker-single .ld-vote-bar {
  flex: 1;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.ld-ranker-single .ld-vote-bar.neutral {
  background: #ececec;
}

.ld-ranker-single .ld-vote-bar.medium {
  background: #ffafb4;
}

.ld-ranker-single .ld-vote-bar.high {
  background: #9febe2;
}

.ld-ranker-single .ld-vote-bar.voted-up {
  background: #9febe2 !important;
}

.ld-ranker-single .ld-vote-bar.voted-down {
  background: #ffafb4 !important;
}

.ld-ranker-single .ld-vote-total {
  font-size: 18px;
  font-weight: 800;
  line-height: 24.75px;
  letter-spacing: -0.18px;
  color: #161616;
  text-align: center;
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

/* Active vote states for single */
.ld-ranker-single.up .ld-up {
  background: #9febe2;
  color: #161616;
}

.ld-ranker-single.down .ld-down {
  background: #ffafb4;
  color: #161616;
}

/* Responsive for single vote */
@media (max-width: 768px) {
  .ld-ranker-single {
    max-width: 100%;
  }
}

/* Vote bar container with tooltip */
.ld-vote-bar-container {
  position: relative;
  flex: 1;
}

/* Tooltip styles */
.ld-vote-tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: #ececec;
  padding: 5px;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  pointer-events: none;
  z-index: 10;
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.33px;
  color: #3a3a3a;
  text-align: center;
}

.ld-vote-tooltip-separator {
  font-weight: 300;
  margin: 0 4px;
}

.ld-tooltip-arrow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9.5px solid transparent;
  border-right: 9.5px solid transparent;
  border-top: 9px solid #ececec;
}

.ld-vote-bar-container:hover .ld-vote-tooltip {
  opacity: 1;
  visibility: visible;
  margin-bottom: -8px;
}

/* Deal requested text */
.ld-deal-requested {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-width: 0.5px 0px 0.3px 0px;
  border-style: solid;
  border-color: #5f5a7c;
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 27px;
  letter-spacing: 0;
  color: #e3e3e3;
  margin-top: 12px;
  margin-bottom: 12px;
  width: 100%;
}

.ld-deal-requested-icon {
  flex-shrink: 0;
  width: 30px;
  height: 19px;
}

.ld-requested-count {
  font-weight: 700;
}

/* Desktop: show full text, hide mobile text */
.ld-requested-text-desktop {
  display: inline;
}

.ld-requested-text-mobile {
  display: none;
}

@media (max-width: 1024px) {
  .ld-deal-requested {
    justify-content: center;
  }
}

/* Mobile: show short text, hide desktop text */
@media (max-width: 767px) {
  .ld-requested-text-desktop {
    display: none;
  }

  .ld-requested-text-mobile {
    display: inline;
  }

  .ld-deal-requested {
    font-size: 14px;
    padding: 8px 12px;
    line-height: 20px;
  }

  .ld-deal-requested-icon {
    width: 24px;
    height: 15px;
  }
}
