
.chat-input {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-top: 1px solid #ddd;
  background: #fafafa;
}

.chat-input-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.chat-input input[type="text"] {
  flex: 1;
  border-radius: 20px;
  border: 1px solid #ccc;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
}

.chat-input input[type="text"]:focus {
  border-color: #4a90e2;
}

.chat-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}

.chat-btn-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #4a90e2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* cuando estás grabando audio, cambiamos color y icono ya lo cambiamos en JS */
.chat-recording .chat-btn-send {
  background: #e53935;
}


/*

.msg {
  display: flex;
  margin: 4px 8px;
}

.msg--out {
  justify-content: flex-end;
}

.msg-bubble {
  max-width: 75%;
  border-radius: 14px;
  padding: 6px;
  background: #dcf8c6; 
}

.msg-image {
  max-width: 220px;
  max-height: 220px;
  border-radius: 12px;
  display: block;
}

.msg-audio {
  width: 220px;
}

*/
.chat-media-preview {
  padding: 4px 10px;
  background: #050b15;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-media-thumb {
  max-height: 60px;
  max-width: 80px;
  border-radius: 8px;
  border: 1px solid #1f2933;
}


.msg-audio {
  background: #0f766e; /* verde/teal */
  border-radius: 16px;
  padding: 4px 8px;
}

.msg-audio--read {
  background: #1d4ed8; /* azul */
}













/* BOTÓN DE GRABAR – COMO LO TENÍAS */
.chat-btn-audio {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #35b6e9; /* normal */
  color: #0e0d0d;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* ✅ GRABANDO: verde + pulse animation */
.chat-recording .chat-btn-audio {
  background: #18f197 !important;
  animation: pulse-recording 1.5s infinite;
}

/* Animación de pulse cuando está grabando */
@keyframes pulse-recording {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(24, 241, 151, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(24, 241, 151, 0.1);
  }
}

/* Indicador de "Grabando..." */
.audio-recording-label {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 16px;
  background: #18f197;
  color: #0e0d0d;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
  align-items: center;
  z-index: 999;
  animation: slideUp 0.3s ease;
}

.audio-recording-label.show {
  display: flex;
}

/* Puntito que parpadea */
.audio-recording-label::before {
  content: '●';
  display: inline-block;
  animation: blink 0.8s infinite;
  color: #0e0d0d;
}

@keyframes blink {
  0%, 49%, 100% {
    opacity: 1;
  }
  50%, 99% {
    opacity: 0;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Spinner para audio enviándose */
.audio-sending-spinner {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: #0e0d0d;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
  align-items: center;
  z-index: 999;
}

.audio-sending-spinner.show {
  display: flex;
}

.spinner-mini {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top: 2px solid #0e0d0d;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============ MENSAJE DE AUDIO ============ */

/* La burbuja del mensaje de audio:
   casi sin padding extra, solo un borde finito */
.msg.msg-audio {
  padding: 4px 6px;        /* probá 2px si querés aún menos */
}

/* El body del audio NO agrega más relleno ni fondo */
.msg.msg-audio .msg-body {
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
}

/* El player ocupa el ancho de la burbuja */
.msg-audio-player {
  width: 220px;
  max-width: 100%;
  display: block;
  height: 32px;
}

/* Panel transparente para que no haya “pastilla” blanca gigante */
.msg-audio-player::-webkit-media-controls-panel {
  background-color: #35b6e9;
}
/* Flecha de play oscura/negra en WebKit (Chrome, Android, Edge, Safari) */
.msg-audio-player::-webkit-media-controls-play-button {
  filter: invert(1) grayscale(1) brightness(0.3);
}

/* Opcional:
   si en tema claro querés la flecha más oscura,
   descomentá esto: */
/*
body.theme-light .msg-audio-player::-webkit-media-controls-play-button,
body.theme-light .msg-audio-player::-webkit-media-controls-volume-slider {
  filter: invert(1);
}
*/










.media-lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(0,0,0,.92);
}

.media-lightbox.open{ display:flex; }

.media-lightbox .mlb-inner{
  position: relative;
  max-width: 96vw;
  max-height: 92vh;
}

.media-lightbox .mlb-img,
.media-lightbox .mlb-video{
  display:block;
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
}

.media-lightbox .mlb-close{
  position:absolute;
  top:-10px;
  right:-10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-size: 22px;
  line-height: 36px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  transition: background 0.2s;
  z-index: 100;
}

.media-lightbox .mlb-close:hover{
  background: rgba(0,0,0,0.8);
}

.media-lightbox .mlb-download{
  position:absolute;
  top:-10px;
  right:40px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  line-height: 36px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  transition: background 0.2s;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-lightbox .mlb-download:hover{
  background: rgba(0,0,0,0.8);
}






.msg-pending {
  opacity: 0.7;
}

.media-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.media-pending .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #00e0ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}



.msg-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.msg-menu-item .icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.85;
}

.msg-menu-item:hover .icon {
  opacity: 1;
}

.msg-menu-item.danger {
  color: #e53935;
}
