/* Menú de acciones de un mensaje (pulsación larga): hoja inferior. Lógica en js/message-menu.js. */

/* En pantallas táctiles la pulsación larga abre el menú: sin selección de texto ni menú nativo del navegador sobre los mensajes. */
@media (pointer: coarse) {
  .line-container .name,
  .line-container .text,
  .line-container .rich-body {
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
    -webkit-touch-callout: none;
  }
}

/* Mensaje sobre el que está abierto el menú, y mensaje al que se está respondiendo */
.line-container.menu-open .line { background-color: #2c2850; }
.line-container.active .line { box-shadow: inset 0 0 0 1px #6752E0; }

#msg-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 160ms;
  touch-action: none;
}
#msg-menu-backdrop.show { opacity: 1; }

#msg-menu {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1001;
  box-sizing: border-box;
  max-width: 520px;
  margin: 0 auto;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: #1e1e1e;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 170ms ease-out;
}
#msg-menu.show { transform: none; }

.mm-head {
  margin-bottom: 4px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid #2e2e2e;
}
.mm-who {
  font-size: 13px;
  font-weight: 600;
  color: #a9a9c4;
}
.mm-text {
  overflow: hidden;
  font-size: 14px;
  color: #c9c9d6;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mm-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 12px;
  background: none;
  border: 0;
  border-radius: 10px;
  color: #F0F1FF;
  font: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}
.mm-item:active { background: #2a2a2a; }
.mm-icon {
  width: 22px;
  text-align: center;
  opacity: 0.85;
}
.mm-item.danger { color: #ef6a5b; }
.mm-item.confirming { color: #e8c040; font-weight: 600; }
