/* =====================================================================
   DM Reaction Details: Bottom Sheet Breakdown
   ===================================================================== */

dm-reaction-details {
  position: absolute;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;                    /* Aligns panel to bottom */
  overflow: hidden; 
  width: 92%;
  max-width: 440px;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
}

.reaction-details-overlay {
  position: absolute;
  inset: 0;
  background-color: transparent;
  z-index: 1;
}

/* Bottom Sheet Panel */
.reaction-details-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  background: #ffffff;
  border-radius: 20px 20px 14px 14px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-subtle, #edebe6);
  max-height: 70%;
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  animation: slideUpDetails 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.reaction-details-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle, #edebe6);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  color: var(--text-main, #16181b);
}

.close-details-btn {
  background: #f7f6f2;
  border: 1px solid var(--border-subtle, #edebe6);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted, #656f77);
  transition: all 0.15s ease;
}

.close-details-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

/* Participant List */
.participant-list {
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

.participant-list li {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle, #edebe6);
  font-size: 0.95rem;
  color: var(--text-main, #16181b);
}

.participant-list li:last-child {
  border-bottom: none;
}

/* Current User Row */
.participant-list li.is-me {
  background: rgba(79, 70, 229, 0.05);
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.participant-list li.is-me:hover {
  background: rgba(79, 70, 229, 0.09);
}

.emoji-badge {
  margin-left: auto;
  font-size: 1.25rem;
}

/* Animations */
@keyframes slideUpDetails {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* Exit state for JS trigger */
dm-reaction-details.is-closing .reaction-details-panel {
  transform: translateY(100%);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

dm-reaction-details.is-closing .reaction-details-overlay {
  opacity: 0;
  transition: opacity 0.2s ease;
}