.chat-emote {
  height: 1.5em;
  vertical-align: middle;
  margin: 0 0.1em;
}

.top-emotes-section {
  margin-top: 1rem;
}

.top-emotes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.emote-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 0.4rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.emote-item:hover {
  border-color: var(--accent-green);
  background: rgba(46, 204, 113, 0.18);
}

.emote-item img {
  height: 36px;
  width: 36px;
  object-fit: contain;
}

.emote-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.75rem;
  max-height: min(70vh, 900px);
  overflow-y: auto;
}

.emote-ranking-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.emote-ranking-row:hover {
  border-color: var(--accent-green);
  background: rgba(46, 204, 113, 0.16);
}

.emote-ranking-row img {
  height: 28px;
  width: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.emotes-link-btn {
  width: 100%;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-lime);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.emotes-link-btn:hover {
  border-color: var(--accent-green);
  background: rgba(46, 204, 113, 0.22);
}

.emotes-link-btn.secondary {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: transparent;
}

.emote-expand {
  margin-top: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.15);
}

.emote-expand summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--accent-lime);
  font-weight: 500;
  list-style: none;
  user-select: none;
}

.emote-expand summary::-webkit-details-marker {
  display: none;
}

.emote-expand summary::before {
  content: '▸ ';
  color: var(--text-muted);
}

.emote-expand[open] summary::before {
  content: '▾ ';
}

.unused-emotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.unused-emotes-grid .emote-item {
  padding: 0.45rem 0.3rem;
}

.unused-emotes-grid .emote-item img {
  height: 28px;
  width: 28px;
}

.unused-emotes-grid .emote-name {
  font-size: 0.7rem;
}

.compare-emotes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.compare-emote {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 44px;
  padding: 0.3rem 0.25rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(46, 204, 113, 0.08);
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.compare-emote:hover {
  border-color: var(--accent-green);
  background: rgba(46, 204, 113, 0.16);
}

.compare-emote img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.compare-emote .emote-count {
  font-size: 0.75rem;
}

.pareto-strip {
  height: 10px;
  border-radius: 999px;
  background: rgba(46, 204, 113, 0.15);
  overflow: hidden;
  margin: 0.75rem 0 0.35rem;
}

.pareto-strip-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-lime));
  border-radius: 999px;
}

.section-note-emotes {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.section-note-emotes img {
  height: 28px;
  width: auto;
  vertical-align: middle;
}

.emote-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.emote-detail-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* Emote Position Stacked Bar */

.emote-position-bar-container {
  margin-top: 0.75rem;
}

.emote-position-label {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.emote-position-label.esquerdista {
  background: rgba(192, 57, 43, 0.25);
  color: #e74c3c;
  border: 1px solid rgba(192, 57, 43, 0.4);
}

.emote-position-label.centrao {
  background: rgba(107, 143, 113, 0.25);
  color: #8fbf96;
  border: 1px solid rgba(107, 143, 113, 0.4);
}

.emote-position-label.direitista {
  background: rgba(41, 128, 185, 0.25);
  color: #5dade2;
  border: 1px solid rgba(41, 128, 185, 0.4);
}

.emotes-ranking-details {
  margin-top: 1rem;
}

.emotes-ranking-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--accent-lime);
  font-size: 0.9rem;
}

.emotes-ranking-details > summary::-webkit-details-marker {
  display: none;
}

.emotes-ranking-details[open] > summary {
  border-radius: 8px 8px 0 0;
  border-bottom-color: transparent;
}

.emotes-ranking-details .emotes-ranking-body {
  border: 1px solid var(--border-color);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.12);
}
