/* Itinerary item reaction buttons (thumbs up/down) */

.reaction-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem 0.5rem 0.55rem;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  color: #9ca3af;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Thumbs up: always teal-tinted */
.reaction-btn-up {
  color: var(--primary, #0d9488);
  border-color: rgba(13, 148, 136, 0.25);
}

.reaction-btn-up:hover {
  background: var(--teal-50, #f0fdfa);
  border-color: var(--teal-400, #2dd4bf);
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.18);
  transform: translateY(-1px) scale(1.04);
}

/* Thumbs down: always red-tinted */
.reaction-btn-down {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}

.reaction-btn-down:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.15);
  transform: translateY(-1px) scale(1.04);
}

.reaction-btn:active {
  transform: translateY(0) scale(0.98);
}

.reaction-icon {
  font-size: 1.05rem;
  transition: transform 0.18s ease;
}

.reaction-btn:hover .reaction-icon {
  transform: scale(1.15);
}

/* Active: thumbs up — vivid teal */
.reaction-btn-up.reaction-btn-active {
  background: var(--teal-50, #f0fdfa);
  border-color: var(--primary, #0d9488);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.22);
}

.reaction-btn-up.reaction-btn-active .reaction-icon {
  filter: drop-shadow(0 1px 3px rgba(13, 148, 136, 0.4));
}

/* Active: thumbs down — vivid red */
.reaction-btn-down.reaction-btn-active {
  background: #fef2f2;
  border-color: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.reaction-btn-down.reaction-btn-active .reaction-icon {
  filter: drop-shadow(0 1px 3px rgba(239, 68, 68, 0.4));
}

.reaction-count {
  font-weight: 700;
  font-size: 0.875rem;
  cursor: default;
}

/* Avatar stack */
.reaction-avatars {
  display: inline-flex;
  align-items: center;
  margin-left: 0.1rem;
}

.reaction-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  object-fit: cover;
  margin-left: -5px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.reaction-avatar:first-child {
  margin-left: 0;
}

.reaction-avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-400, #2dd4bf);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0;
}

.reaction-btn-down .reaction-avatar-initials {
  background: #ef4444;
}

/* Wrap needed to anchor the tooltip */
.reaction-btn-wrap {
  position: relative;
  display: inline-flex;
}

.reaction-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 120px;
  max-width: 180px;
}

.reaction-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(20, 20, 20, 0.92);
}

.reaction-btn-wrap:hover .reaction-tooltip {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .reaction-btn {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }

  .reaction-icon {
    font-size: 0.85rem;
  }

  .reaction-avatar {
    width: 16px;
    height: 16px;
  }
}
