
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 20px 12px;
  background: #0b1424;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
}

.app {
  width: 100%;
  max-width: 480px;
  margin: 20px auto;
  padding: 24px;
  background: #172438;
  border: 1px solid #293c53;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* ENCABEZADO */

.vizlo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #087ca3;
  font-size: 23px;
  font-weight: bold;
}

h1 {
  font-size: 25px;
  margin: 0;
  letter-spacing: 2px;
}

/* INDICADOR SUPERIOR */

.connection-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.check-icon {
  width: 19px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
}

.online {
  color: #38d996;
}

.offline {
  color: #94a3b8;
}

/* TITULOS */

.page-title {
  text-align: center;
  padding: 22px 0 15px;
}

h2 {
  margin: 0 0 10px;
  font-size: 23px;
  color: #8ecbff;
}

.page-title p {
  margin: 0;
  color: #aebed0;
  font-size: 14px;
}

h3 {
  font-size: 17px;
  margin: 16px 0;
}

/* FORMULARIOS */

label {
  display: block;
  font-size: 13px;
  margin-bottom: 7px;
  color: #becbda;
}

input {
  width: 100%;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid #40516b;
  border-radius: 10px;
  background: #24364e;
  color: white;
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: #38a9d9;
}

input::placeholder {
  color: #aebed0;
}

button {
  padding: 13px 16px;
  border: 0;
  border-radius: 10px;
  background: #087ca3;
  color: white;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

button:hover {
  background: #0795c4;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#loginBtn {
  width: 100%;
}

/* CHAT */

.chat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.private-label {
  color: #a9bad0;
  font-size: 11px;
}

#messages {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  padding: 14px;
  margin-bottom: 15px;
  background: #0d192b;
  border-radius: 12px;
}

/* MENSAJES */

.message {
  max-width: 85%;
  padding: 11px 13px;
  margin-bottom: 12px;
  border-radius: 14px;
  overflow-wrap: anywhere;
}

.message.mine {
  align-self: flex-end;
  background: #087ca3;
  border-bottom-right-radius: 4px;
}

.message.other {
  align-self: flex-start;
  background: #293c53;
  border-bottom-left-radius: 4px;
}

.message-author {
  font-size: 11px;
  font-weight: bold;
  color: #a7dcff;
  margin-bottom: 5px;
}

.message-text {
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.message-time {
  display: block;
  margin-top: 6px;
  color: #c4d0dd;
  font-size: 10px;
  text-align: right;
}

.empty-chat {
  color: #aebed0;
  text-align: center;
  margin: auto;
}

/* ENVIO DE MENSAJES */

.message-form {
  display: flex;
  gap: 9px;
  align-items: stretch;
}

#messageInput {
  flex: 1;
  min-width: 0;
  margin: 0;
}

#sendBtn {
  flex-shrink: 0;
}

/* CERRAR SESION */

#logoutBtn {
  display: block;
  width: 100%;
  margin-top: 15px;
  background: #40516b;
}

/* ESTADO */

#status {
  min-height: 18px;
  color: #aebed0;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 18px;
}

/* WIFI INFERIOR */

.realtime-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* OCULTAR ELEMENTOS */

[hidden] {
  display: none !important;
}

/* VERSION CELULAR */

@media (max-width: 420px) {
  body {
    padding: 10px;
  }

  .app {
    margin: 0 auto;
    padding: 16px;
  }

  h1 {
    font-size: 22px;
  }

  .connection-badge {
    font-size: 11px;
  }

  .message {
    max-width: 92%;
  }
}

/* =================================
   VIZLO - PERFIL DEL VECINO
   ================================= */

.profile-section {
  padding: 20px;
  margin-top: 20px;
  background: #1d2e45;
  border: 1px solid #344860;
  border-radius: 16px;
}

.profile-section h3 {
  color: #8ecbff;
  text-align: center;
  font-size: 21px;
  margin-bottom: 12px;
}

.profile-section p {
  color: #aebed0;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.profile-section label {
  display: block;
  color: #becbda;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-section input {
  width: 100%;
  padding: 14px;
  margin-bottom: 18px;
  background: #24364e;
  border: 1px solid #40516b;
  border-radius: 10px;
  color: white;
  font-size: 16px;
}

.profile-section input:focus {
  border-color: #38a9d9;
  outline: none;
}

#saveProfileBtn {
  width: 100%;
  background: #087ca3;
  color: white;
  padding: 15px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

#saveProfileBtn:hover {
  background: #0795c4;
}

#saveProfileBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* VIZLO - Botón de adjuntos */

.attach-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
  flex-shrink: 0;

  background: #163b65;
  color: #ffffff;

  font-size: 28px;
  font-weight: 400;

  border-radius: 50%;
  cursor: pointer;
  user-select: none;

  transition: background 0.2s;
}

.attach-button:hover {
  background: #24588e;
}

.attach-button:active {
  transform: scale(0.96);
}

/* VIZLO - MENU DE ADJUNTOS */

.attachments-container {
  position: relative;
  flex-shrink: 0;
}

.attach-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: #163b65;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
}

.attach-button:hover {
  background: #24588e;
}

.attachments-menu {
  position: absolute;
  bottom: 54px;
  left: 0;
  width: 245px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  background: #223953;
  border: 1px solid #38516b;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  z-index: 100;
}

.attachments-menu[hidden] {
  display: none !important;
}

.attachments-menu button {
  display: block;
  width: 100%;
  padding: 14px 12px;
  background: transparent;
  color: white;
  border: none;
  border-radius: 8px;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.attachments-menu button:hover {
  background: #355674;
}

/* Adaptacion para pantallas pequeñas */
@media (max-width: 480px) {
  .attachments-menu {
    width: 220px;
  }

  .attachments-menu button {
    min-height: 48px;
    font-size: 14px;
  }
}

/* ======================================
   VIZLO - CHAT RESPONSIVE
   Fotos, videos y documentos
   Android / iOS / Computadora
   ====================================== */

/* Evitar que los mensajes se salgan
   de la pantalla */
#messages .message {
  max-width: min(85%, 440px);
  min-width: 0;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

/* Fotografías */
#messages .message img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 340px;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  margin-top: 8px;
  cursor: pointer;
}

/* Videos */
#messages .message video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 340px;
  height: auto;
  border-radius: 12px;
  margin-top: 8px;
  background: #000;
}

/* Documentos */
#messages .message a {
  display: inline-block;
  max-width: 100%;
  padding: 10px 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: inherit;
}

/* Adaptación a celulares */
@media (max-width: 600px) {

  #messages .message {
    max-width: 88%;
  }

  #messages .message img,
  #messages .message video {
    max-height: 260px;
  }

  /* Evitar zoom automático del iPhone
     al tocar el campo de mensajes */
  #messageInput {
    font-size: 16px;
    min-width: 0;
  }

  /* Mantener visible el menú + */
  .attachments-menu {
    max-width: calc(100vw - 32px);
  }

  /* Mejorar la interacción táctil */
  .attach-button,
  .attachments-menu button {
    touch-action: manipulation;
  }
}

/* =====================================
   VIZLO - VISOR DE FOTOS
   PANTALLA COMPLETA
   Android / iOS / Computadora
   ===================================== */

.image-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;

  background: rgba(0, 0, 0, 0.96);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));

  box-sizing: border-box;
  z-index: 9999;
}

.image-viewer[hidden] {
  display: none !important;
}

/* Fotografía ampliada */
#imageViewerPhoto {
  display: block;
  max-width: 100%;
  max-height: 90%;
  max-height: 85dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

/* Botón para cerrar */
.image-viewer-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));

  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.16);
  color: white;

  border: none;
  border-radius: 50%;

  font-size: 24px;
  cursor: pointer;
  z-index: 10000;
  touch-action: manipulation;
}

/* Efecto al pasar el cursor */
.image-viewer-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Adaptación para celulares */
@media (max-width: 600px) {
  .image-viewer {
    padding-left: 10px;
    padding-right: 10px;
  }

  #imageViewerPhoto {
    max-height: 80dvh;
  }
}
list

/* VIZLO - Asegurar que la X sea pulsable */

.image-viewer-close {
  position: fixed !important;
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));
  z-index: 10001 !important;
  pointer-events: auto !important;
  cursor: pointer;
}

#imageViewerPhoto {
  pointer-events: auto;
}

/* =====================================
   VIZLO - VISOR DE VIDEOS
   Android / iOS / Computadora
   ===================================== */

/* Video dentro del visor */
#imageViewerVideo {
  display: block;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  max-height: 85dvh;
  height: auto;
  object-fit: contain;
  background: #000;
  border-radius: 10px;
}

/* Ocultar el video cuando no está activo */
#imageViewerVideo[hidden] {
  display: none !important;
}

/* Ocultar la foto cuando corresponde */
#imageViewerPhoto[hidden] {
  display: none !important;
}

/* Adaptación para celulares */
@media (max-width: 600px) {
  #imageViewerVideo {
    max-width: 100%;
    max-height: 80dvh;
    border-radius: 6px;
  }
}

/* VIZLO - Botón para ampliar videos */

.video-expand-button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #163b65;
  color: white;
  font-size: 14px;
  cursor: pointer;
  touch-action: manipulation;
}

.video-expand-button:hover {
  background: #24588e;
}

/* VIZLO - BOTON DE DESCARGA */

.media-download-button {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  right: calc(72px + env(safe-area-inset-right));

  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.16);
  color: white;

  border: none;
  border-radius: 50%;

  font-size: 22px;
  cursor: pointer;

  z-index: 10001;
  touch-action: manipulation;
}

.media-download-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* VIZLO - DOCUMENTOS ADJUNTOS */

.document-attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-top: 8px;
}

.document-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  color: inherit;
  text-decoration: underline;
}

.document-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  width: 40px;
  height: 40px;

  background: #163b65;
  color: white;
  border: none;
  border-radius: 10px;

  font-size: 20px;
  cursor: pointer;
  touch-action: manipulation;
}

.document-download-button:hover {
  background: #24588e;
}

/* =====================================
   VIZLO - TAMAÑOS DEL CHAT
   ===================================== */

/* Texto principal de los mensajes */
#messages .message-text {
  font-size: 16px !important;
  line-height: 1.5;
  font-weight: 400;
}

/* Nombre de quien envía el mensaje */
#messages .message-author {
  font-size: 13px !important;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Botón Responder: pequeño y discreto */
#messages .reply-message-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  padding: 2px 5px;
  margin-top: 4px;

  font-size: 10px !important;
  font-weight: 400;
  line-height: 1.2;

  color: #aebfd0;
  background: transparent;
  border: none;
  border-radius: 4px;

  cursor: pointer;
  touch-action: manipulation;
}

/* Efecto al pasar el cursor */
#messages .reply-message-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Hora del mensaje */
#messages .message-time {
  font-size: 10px !important;
}

/* VIZLO - VISTA PREVIA DE RESPUESTA */

.reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #263e56;
  border-left: 3px solid #75c7ff;
  border-radius: 10px;
}

.reply-preview[hidden] {
  display: none !important;
}

.reply-preview-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#replyAuthor {
  color: #8cccff;
  font-size: 12px;
}

#replyText {
  color: #d3dfeb;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#cancelReplyBtn {
  background: transparent;
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
}

/* VIZLO - MENSAJES RESPONDIDOS */

#messages .reply-quote {
  display: flex;
  flex-direction: column;
  gap: 4px;

  padding: 8px 10px;
  margin: 6px 0 10px;

  border-left: 3px solid #8ccfff;
  border-radius: 6px;

  background: rgba(0, 0, 0, 0.18);

  font-size: 12px;
  cursor: default;
  overflow: hidden;
}

#messages .reply-quote strong {
  color: #9bddff;
  font-size: 12px;
  font-weight: 600;
}

#messages .reply-quote span {
  color: #e5f4ff;
  font-size: 12px;
  line-height: 1.4;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* VIZLO - NAVEGACIÓN ENTRE RESPUESTAS */

#messages .reply-quote {
  cursor: pointer;
}

#messages .reply-quote:hover {
  background: rgba(140, 207, 255, 0.14);
}

#messages .mensaje-resaltado {
  outline: 2px solid #8ccfff;
  outline-offset: 3px;
  transition: outline-color 0.3s;
  border-radius: 10px;
}

/* VIZLO - MENSAJES ELIMINADOS */

#messages .message-deleted .message-text {
  font-style: italic;
  color: #b6c5d6;
  opacity: 0.85;
}

#messages .message-deleted {
  opacity: 0.8;
}

#messages .message-deleted .reply-message-button {
  display: none;
}

/* VIZLO - MENU CONTEXTUAL */

.message-context-menu {
  position: fixed;
  z-index: 20000;
  width: 190px;
  padding: 7px;
  background: #263e56;
  border: 1px solid #3a5875;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,.35);
}

.message-context-menu[hidden] {
  display: none !important;
}

.message-context-menu button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: white;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.message-context-menu button:hover {
  background: #365776;
}

#deleteMessageBtn {
  color: #ff9a9a;
}

#deleteMessageBtn[hidden] {
  display: none !important;
}

/* Facilitar pulsaciones largas en celulares */
#messages .message {
  -webkit-touch-callout: none;
}

/* Ocultar correctamente las opciones del menú */

.message-context-menu button[hidden] {
  display: none !important;
}

/* VIZLO - MENU CONTEXTUAL INTERACTIVO */

#messageContextMenu {
  pointer-events: auto !important;
}

#messageContextMenu button {
  pointer-events: auto !important;
  position: relative;
  z-index: 1;
}

/* VIZLO - CORREGIR SCROLL DEL CHAT */

#messages {
  height: 420px !important;
  min-height: 0 !important;
  max-height: 420px !important;

  overflow-y: auto !important;
  overflow-x: hidden !important;

  display: flex;
  flex-direction: column;

  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;
  scrollbar-color: #52718f #0d192b;
}

/* Barra de desplazamiento en Chrome y Safari */

#messages::-webkit-scrollbar {
  width: 8px;
}

#messages::-webkit-scrollbar-track {
  background: #0d192b;
}

#messages::-webkit-scrollbar-thumb {
  background: #52718f;
  border-radius: 8px;
}

/* VIZLO - DESPLAZAMIENTO ESTABLE */

#messages {
  overflow-anchor: none !important;
  scroll-behavior: auto !important;
  touch-action: pan-y;
}

/* VIZLO - BOTON DE ARCHIVOS */

.shared-files-access {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #203b56;
  border: 1px solid #3a5c7a;
  border-radius: 10px;
  color: #d9edff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.shared-files-access:hover {
  background: #2c5274;
}

/* VIZLO - BOTON COMPACTO DE ARCHIVOS */

#openSharedFilesBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: auto;
  min-height: 0;
  padding: 7px 11px;
  margin: 2px 0 12px;

  background: #203b56;
  border: 1px solid #3a5c7a;
  border-radius: 8px;

  color: #d9edff;
  font-size: 12px;
  font-weight: 500;
}

#openSharedFilesBtn:hover {
  background: #2c5274;
}

/* VIZLO - TITULO Y BOTON EN VERTICAL */

.chat-heading {
  flex-wrap: wrap;
}

#openSharedFilesBtn {
  display: flex;
  width: fit-content;
  flex: 0 0 auto;
  margin: 0 0 12px;
}

/* Si el botón está dentro del encabezado,
   forzar que ocupe una nueva fila */

.chat-heading #openSharedFilesBtn {
  margin-top: 8px;
}
.chat-heading #openSharedFilesBtn {
  order: 2;
}

/* VIZLO - ENCABEZADO COMPACTO DEL CHAT */

.chat-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  row-gap: 0;
  column-gap: 8px;
  margin-bottom: 8px;
}

.chat-heading h3 {
  margin: 0;
}

.chat-heading #openSharedFilesBtn {
  flex: 0 0 100%;
  order: 3;
  width: fit-content;
  max-width: max-content;
  margin: 6px 0 0;
  padding: 7px 11px;
  font-size: 12px;
}

/* Acercar el chat al encabezado */

#messages {
  margin-top: 0;
}

/* VIZLO - PANTALLA DE ARCHIVOS */

.shared-files-panel {
  margin: 10px 0;
  padding: 14px;
  background: #14253a;
  border: 1px solid #35506b;
  border-radius: 14px;
}

.shared-files-panel[hidden] {
  display: none !important;
}

.shared-files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.shared-files-header h3 {
  margin: 0;
  font-size: 16px;
  color: #d9edff;
}

#closeSharedFilesBtn {
  padding: 6px 10px;
  background: #30465e;
  font-size: 16px;
}

.shared-files-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
}

.shared-tab {
  flex: 1;
  padding: 10px 5px;
  border-radius: 8px;
  background: #263e56;
  color: #bfd3e5;
  font-size: 12px;
}

.shared-tab.active {
  background: #087ca3;
  color: white;
}

.shared-files-content {
  min-height: 160px;
  max-height: 380px;
  overflow-y: auto;
  padding: 12px;
  background: #0d192b;
  border-radius: 10px;
  color: #aebed0;
  font-size: 13px;
}

/* VIZLO - ARCHIVOS A TODO EL ANCHO */

#sharedFilesPanel {
  width: 100%;
  flex: 0 0 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 8px 0 12px;
  order: 4;
}

/* Ocultar Grupo vecinal mientras se ven archivos */

.chat-heading:has(#sharedFilesPanel:not([hidden]))
.private-label {
  display: none;
}

/* Encabezado en dos filas */

.chat-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  justify-content: space-between;
}

.chat-heading #sharedFilesPanel {
  align-self: stretch;
}

/* VIZLO - GALERIA MULTIMEDIA */

.vizlo-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.vizlo-media-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #253d55;
  cursor: pointer;
}

.vizlo-media-item img,
.vizlo-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vizlo-video-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* VIZLO - ENLACES COMPARTIDOS */

.vizlo-links-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.vizlo-link-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #203b56;
  border-radius: 10px;
  text-decoration: none;
  color: #ffffff;
}

.vizlo-link-item:hover {
  background: #2c5274;
}

.vizlo-link-item > span {
  font-size: 22px;
}

.vizlo-link-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.vizlo-link-info strong {
  font-size: 13px;
  color: #d9edff;
}

.vizlo-link-info small {
  font-size: 11px;
  color: #b3c9dc;
  overflow-wrap: anywhere;
}

/* VIZLO - DOCUMENTOS COMPARTIDOS */

.vizlo-docs-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.vizlo-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #203b56;
  border-radius: 10px;
}

.vizlo-doc-icon {
  font-size: 25px;
  flex-shrink: 0;
}

.vizlo-doc-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vizlo-doc-info strong {
  color: #d9edff;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.vizlo-doc-info small {
  color: #b3c9dc;
  font-size: 11px;
}

.vizlo-doc-download {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 9px;
  background: #087ca3;
  color: white;
  font-size: 20px;
}

/* VIZLO - BUSCADOR DE ARCHIVOS */

.shared-files-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 11px;
  margin: 0 0 12px;
  background: #203b56;
  border: 1px solid #35506b;
  border-radius: 10px;
  box-sizing: border-box;
}

.shared-files-search span {
  flex-shrink: 0;
  font-size: 16px;
}

#sharedFilesSearchInput {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 11px 0;
  border: none;
  outline: none;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
}

#sharedFilesSearchInput::placeholder {
  color: #aebed0;
}

#sharedFilesSearchInput:focus {
  border: none;
  box-shadow: none;
}

/* VIZLO - FILTRO DE ARCHIVOS */

.vizlo-media-item[hidden],
.vizlo-link-item[hidden],
.vizlo-doc-item[hidden],
#sharedFilesNoSearchResults[hidden] {
  display: none !important;
}

#sharedFilesNoSearchResults {
  text-align: center;
  color: #aebed0;
  font-size: 13px;
  padding: 15px 0;
}

/* VIZLO - ARCHIVOS AGRUPADOS POR FECHA */

.vizlo-date-group {
  margin-bottom: 18px;
}

.vizlo-date-title {
  margin: 0 0 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid #35506b;
  color: #8ccfff;
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}

.vizlo-date-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.vizlo-date-group .vizlo-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

/* =====================================
   VIZLO - IR AL MENSAJE ORIGINAL
   ===================================== */

.vizlo-ir-mensaje {
  border: 0;
  border-radius: 7px;
  padding: 7px 9px;
  background: #087ca3;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.vizlo-ir-mensaje:hover {
  background: #0a99c8;
}

/* Multimedia */

.vizlo-media-item {
  position: relative;
}

.vizlo-media-item .vizlo-ir-mensaje {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  width: calc(100% - 8px);
  padding: 5px 2px;
  font-size: 9px;
  z-index: 2;
  background: rgba(0, 71, 103, 0.92);
}

/* Enlaces */

.vizlo-link-item {
  flex-wrap: wrap;
}

.vizlo-link-item .vizlo-ir-mensaje {
  margin-left: auto;
}

.vizlo-enlace-externo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.vizlo-enlace-externo:hover {
  text-decoration: underline;
}

/* Documentos */

.vizlo-doc-acciones {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.vizlo-doc-acciones .vizlo-ir-mensaje {
  font-size: 10px;
}

/* Pantallas chicas */

@media (max-width: 400px) {
  .vizlo-doc-acciones .vizlo-ir-mensaje {
    white-space: normal;
    text-align: center;
    max-width: 95px;
  }
}

/* VIZLO - HISTORIAL DE ARCHIVOS */

.vizlo-cargar-mas-archivos {
  display: block;
  width: 100%;
  margin: 16px 0 4px;
  padding: 12px;
  border: 1px solid #355b7b;
  border-radius: 10px;
  background: #203b56;
  color: #d9edff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.vizlo-cargar-mas-archivos:hover {
  background: #2c5274;
}

.vizlo-cargar-mas-archivos:active {
  background: #087ca3;
}

/* =====================================
   VIZLO - MENSAJES ANTERIORES
   ===================================== */

.vizlo-load-older {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;

  border: 1px solid #355b7b;
  border-radius: 9px;

  background: #203b56;
  color: #d9edff;

  font-size: 12px;
  font-weight: 600;

  text-align: center;
  cursor: pointer;
}

.vizlo-load-older:hover {
  background: #2c5274;
}

.vizlo-load-older:disabled {
  opacity: 0.6;
  cursor: wait;
}

.vizlo-load-older[hidden] {
  display: none !important;
}

/* VIZLO - VISIBILIDAD DEL HISTORIAL */

#loadOlderMessagesBtn:not([hidden]) {
  display: block !important;
  position: relative;
  z-index: 5;
  width: 100%;
}

/* ======================================
   VIZLO - LUPA Y TRES PUNTITOS
   ====================================== */

.chat-heading #openSharedFilesBtn {
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: calc(100% - 105px);
  order: 3;
  margin: 6px 0 0;
}

#vizloChatTools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  order: 3;
  flex: 0 0 auto;
  margin: 6px 0 0 auto;
}

#vizloSearchMessagesBtn,
#vizloGroupOptionsBtn {
  width: 35px;
  height: 35px;
  padding: 0;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 23px;
  cursor: pointer;
}

#vizloSearchMessagesBtn:hover,
#vizloGroupOptionsBtn:hover {
  background: #304e70;
  border-radius: 8px;
}

/* MENU DE TRES PUNTITOS */

.vizlo-group-menu {
  position: absolute;
  top: 40px;
  right: 0;
  min-width: 160px;
  padding: 6px;
  background: #203b56;
  border: 1px solid #426582;
  border-radius: 10px;
  box-shadow: 0 6px 20px #0006;
  z-index: 100;
}

.vizlo-group-menu[hidden] {
  display: none !important;
}

.vizlo-group-menu button {
  width: 100%;
  padding: 11px;
  text-align: left;
  background: transparent;
  color: white;
  font-size: 13px;
  border: none;
  cursor: pointer;
}

/* VENTANAS */

.vizlo-modal-panel {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  padding: 20px 16px;
  box-sizing: border-box;
  background: #14253a;
  color: #ffffff;
  z-index: 6000;
  overflow-y: auto;
}

.vizlo-modal-panel[hidden] {
  display: none !important;
}

.vizlo-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.vizlo-modal-header h3 {
  margin: 0;
  font-size: 19px;
}

.vizlo-modal-header button {
  background: transparent;
  border: 0;
  color: white;
  font-size: 22px;
  cursor: pointer;
}

/* BUSQUEDA */

.vizlo-message-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #203b56;
  border: 1px solid #436481;
  border-radius: 12px;
  padding: 4px 12px;
}

.vizlo-message-search-box input {
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 14px;
}

.vizlo-message-search-box input::placeholder {
  color: #aebed0;
}

.vizlo-modal-results {
  margin-top: 20px;
}

.vizlo-search-result {
  display: block;
  width: 100%;
  padding: 13px 10px;
  margin-bottom: 8px;
  text-align: left;
  background: #203b56;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.vizlo-search-result strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.vizlo-search-result small {
  display: block;
  margin-top: 7px;
  color: #aebed0;
}

/* INFORMACION DEL GRUPO */

.vizlo-group-profile {
  text-align: center;
  padding: 20px 0 25px;
  border-bottom: 1px solid #35506b;
}

.vizlo-group-avatar {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #304f70;
  font-size: 38px;
}

.vizlo-group-profile h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.vizlo-group-profile p {
  margin: 0;
  color: #aebed0;
  font-size: 13px;
}

.vizlo-group-members-title {
  margin: 24px 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: #8ccfff;
}

.vizlo-member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  background: #203b56;
  border-radius: 10px;
}

.vizlo-member-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #087ca3;
  color: white;
  font-weight: 600;
}

.vizlo-member-name {
  color: white;
  font-size: 14px;
}

/* VIZLO - ENCABEZADO DE INFO DEL GRUPO */

.vizlo-group-community {
  margin: 5px 0 14px !important;
  color: #d9edff !important;
  font-size: 15px !important;
  font-weight: 500;
}

#vizloGroupInfoName {
  margin-bottom: 0;
}

/* VIZLO - EVITAR SALTOS AL INICIAR EL CHAT */

#messages.vizlo-inicializando {
  visibility: hidden !important;
}

/* El contenedor conserva su tamaño
   mientras se posicionan los mensajes */

#messages {
  overflow-anchor: none;
}

/* VIZLO - POSICION INICIAL DEL CHAT */

#messages {
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
}

#messages.vizlo-inicializando {
  visibility: hidden !important;
  scroll-behavior: auto !important;
}

/* VIZLO - RESTAURAR SCROLL ESTABLE */

#messages {
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
  visibility: visible !important;
}

/* VIZLO - INICIO DEL CHAT SIN SALTOS */

#messages {
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
}

#messages.vizlo-inicializando {
  visibility: hidden !important;
}

/* ==========================================
   VIZLO - BARRA SUPERIOR DEL CHAT
   ========================================== */

/* Título arriba, herramientas debajo */

.chat-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  align-content: flex-start;
  gap: 7px 0;
}

/* Archivos a la izquierda */

.chat-heading #openSharedFilesBtn {
  order: 3;
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 48% !important;
  margin: 0 !important;
  padding: 8px 9px;
  font-size: 11px;
  box-sizing: border-box;
  white-space: nowrap;
}

/* Herramientas a la derecha */

#vizloChatTools {
  order: 3;
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0 0 0 6px;
  padding: 0;
  position: relative;
}

/* Botón rojo central */

#vizloSOSButton.vizlo-sos-compacto {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: none;
  height: 38px;
  padding: 0 7px;
  margin: 0;
  align-items: center;
  justify-content: center;
  background: #c73543;
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

/* Lupa y tres puntitos */

#vizloSearchMessagesBtn,
#vizloGroupOptionsBtn {
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  width: 27px;
  min-width: 27px;
  height: 38px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: white;
  font-size: 21px;
}

/* Panel SOS: oculto al iniciar */

#vizloSOSPanel[hidden] {
  display: none !important;
}

#vizloSOSPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 300;
  width: min(320px, 85vw);
  box-sizing: border-box;
  padding: 14px;
  background: #203b56;
  border: 1px solid #426582;
  border-radius: 12px;
  box-shadow: 0 8px 25px #0008;
  color: white;
}

/* Títulos y acciones del panel */

.vizlo-sos-popup-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.vizlo-sos-popup-label {
  font-size: 13px;
  color: #ffd8db;
  margin-bottom: 8px;
}

#vizloSOSAlerts {
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 12px;
  font-size: 12px;
}

#vizloSOSCrearBtn {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 9px;
  background: #c73543;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

#vizloSOSStatus {
  margin: 8px 0 0;
  font-size: 12px;
  color: #ffd8db;
}

/* Ajustes de pantallas pequeñas */

@media (max-width: 430px) {
  .chat-heading #openSharedFilesBtn {
    max-width: 46% !important;
    padding: 7px 6px;
    font-size: 10px;
  }

  #vizloChatTools {
    gap: 3px;
  }

  #vizloSOSButton.vizlo-sos-compacto {
    font-size: 10px;
    padding: 0 4px;
  }

  #vizloSearchMessagesBtn,
  #vizloGroupOptionsBtn {
    flex-basis: 24px;
    min-width: 24px;
    width: 24px;
  }
}

/* ==========================================
   VIZLO - BARRA DEL CHAT CORREGIDA
   ========================================== */

/* Título y Grupo vecinal en una fila */

.chat-heading {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

/* Barra completamente independiente */

#vizloBarraChat {
  display: grid !important;
  grid-template-columns:
    minmax(0, 1.2fr)
    minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 12px;
  box-sizing: border-box;
}

/* Botón de archivos */

#vizloBarraChat #openSharedFilesBtn {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 10px 8px !important;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  text-align: center;
}

/* Grupo de SOS, lupa y menú */

#vizloBarraChat #vizloChatTools {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex: none !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
}

/* SOS rojo: ocupa todo el espacio central */

#vizloBarraChat #vizloSOSButton {
  display: flex !important;
  flex: 1 1 0 !important;
  align-items: center;
  justify-content: center;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 5px !important;
  border: none !important;
  border-radius: 9px !important;
  background: #c73543 !important;
  color: white !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

/* Lupa y tres puntitos */

#vizloBarraChat #vizloSearchMessagesBtn,
#vizloBarraChat #vizloGroupOptionsBtn {
  display: grid !important;
  place-items: center;
  flex: 0 0 28px !important;
  width: 28px !important;
  min-width: 28px !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  font-size: 21px;
}

/* Paneles superpuestos, fuera del flujo */

#vizloBarraChat #vizloSOSPanel,
#vizloBarraChat #vizloGroupMenu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  z-index: 300;
  box-sizing: border-box;
  margin: 0 !important;
}

/* Ocultos mientras no se abren */

#vizloSOSPanel[hidden],
#vizloGroupMenu[hidden],
#sharedFilesPanel[hidden] {
  display: none !important;
}

/* Archivos desplegados a todo el ancho */

#sharedFilesPanel {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  margin: 0 0 12px !important;
}

/* Pantallas pequeñas */

@media (max-width: 430px) {
  #vizloBarraChat {
    grid-template-columns:
      minmax(0, 1.15fr)
      minmax(0, 1fr);
    gap: 5px;
  }

  #vizloBarraChat #openSharedFilesBtn {
    font-size: 10px !important;
    padding: 9px 5px !important;
  }

  #vizloBarraChat #vizloSOSButton {
    font-size: 10px !important;
    padding: 0 3px !important;
  }

  #vizloBarraChat #vizloSearchMessagesBtn,
  #vizloBarraChat #vizloGroupOptionsBtn {
    flex-basis: 24px !important;
    width: 24px !important;
    min-width: 24px !important;
  }
}

/* ==========================================
   VIZLO - NOTIFICACION SOS EN PANTALLA
   ========================================== */

#vizloSOSAvisoVecinal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  z-index: 12000;

  width: min(390px, calc(100vw - 28px));
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  gap: 12px;

  padding: 20px;

  border: 2px solid #e66a77;
  border-radius: 16px;

  background: #722b38;
  color: white;

  box-shadow: 0 12px 45px #000a;
}

.vizlo-sos-aviso-encabezado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vizlo-sos-aviso-encabezado strong {
  font-size: 16px;
  color: white;
}

.vizlo-sos-aviso-encabezado button {
  padding: 5px 8px;
  border: 0;
  background: transparent;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

#vizloSOSAvisoVecinal p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #ffffff;
}

#vizloSOSAvisoVecinal small {
  font-size: 11px;
  color: #f4d3d7;
}

#vizloSOSAvisoVecinal
.vizlo-sos-entendido {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 12px;

  border: 0;
  border-radius: 9px;

  background: #c73543;
  color: white;

  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* VIZLO - FORMULARIO DE ALERTA SOS */

.vizlo-sos-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 12px 0;
}

.vizlo-sos-form label {
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.vizlo-sos-form select,
.vizlo-sos-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 11px;
  margin: 0;
  border: 1px solid #54738d;
  border-radius: 9px;
  background: #14253a;
  color: #ffffff;
  font-size: 13px;
  font-family: inherit;
}

.vizlo-sos-form textarea {
  resize: vertical;
}

.vizlo-sos-form small {
  color: #b9cde1;
  font-size: 11px;
  line-height: 1.5;
}

/* ==========================================
   VIZLO - MENSAJES SOS EN ROJO
   ========================================== */

#messages .message.vizlo-sos-message {
  background: #852d39 !important;
  border: 2px solid #e45c6c !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(120, 20, 40, 0.25);
}

/* Nombre del vecino */

#messages .vizlo-sos-message .message-author {
  color: #ffffff !important;
  font-weight: 700;
}

/* Texto de la alerta */

#messages .vizlo-sos-message .message-text {
  color: #ffffff !important;
  white-space: pre-wrap;
  line-height: 1.6;
  font-weight: 500;
}

/* Fecha y hora */

#messages .vizlo-sos-message .message-time {
  color: #ffd1d5 !important;
}

/* Botón responder */

#messages .vizlo-sos-message .reply-message-button {
  color: #ffd1d5 !important;
}

/* Respuestas citadas */

#messages .vizlo-sos-message .reply-quote {
  background: rgba(40, 0, 10, 0.25);
  border-left: 3px solid #ffb7c0;
  color: #ffffff;
}
/* ==========================================
   VIZLO - ALERTA SOS FORMATO NUEVO
   ========================================== */

#messages .message.vizlo-sos-message {
  background: #8f2e3a !important;
  border: 2px solid #ef7184 !important;
  border-radius: 24px !important;
  color: #ffffff !important;
  box-shadow: none !important;
  padding: 18px 20px 14px !important;
}

#messages .vizlo-sos-message .message-author {
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
}

#messages .vizlo-sos-message .message-text {
  color: #ffffff !important;
  white-space: normal !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
}

#messages .vizlo-sos-message .vizlo-sos-title {
  
font-size: 20px !important;
font-weight: 700 !important;
line-height: 1.3 !important;
margin-bottom: 16px !important;

}

#messages .vizlo-sos-message .vizlo-sos-block {
  margin-bottom: 12px !important;
}

#messages .vizlo-sos-message .vizlo-sos-label {
  font-size: 15px !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
  color: #ffffff !important;
}

#messages .vizlo-sos-message .vizlo-sos-value {
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  color: #ffffff !important;
}

#messages .vizlo-sos-message .message-time {
  display: block !important;
  text-align: right !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #ffd9de !important;
  margin-top: 2px !important;
  margin-bottom: 6px !important;
}

#messages .vizlo-sos-message .reply-message-button {
  color: #ffe3e7 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

#messages .vizlo-sos-message .reply-quote {
  background: rgba(60, 0, 10, 0.20) !important;
  border-left: 3px solid #ffc0c8 !important;
  color: #ffffff !important;
}

/* VIZLO - ESTADOS DE ALERTAS SOS */

.vizlo-sos-alerta-estado {
  padding: 12px;
  margin-bottom: 10px;
  background: #263b50;
  border-radius: 10px;
  color: white;
}

.vizlo-sos-alerta-estado strong {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.vizlo-sos-alerta-estado p {
  font-size: 12px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}

.vizlo-sos-alerta-estado small {
  display: block;
  color: #bdd0df;
  font-size: 11px;
}

.vizlo-sos-estado-activa,
.vizlo-sos-chat-activa {
  color: #ffd1d5;
  background: #862d3b;
  border: 1px solid #e45c6c;
  padding: 8px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 12px;
}

.vizlo-sos-estado-resuelta,
.vizlo-sos-chat-resuelta {
  color: #d8ffe4;
  background: #285845;
  border: 1px solid #64bb88;
  padding: 8px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 12px;
}

.vizlo-sos-chat-activa,
.vizlo-sos-chat-resuelta {
  margin-top: 12px;
}

.vizlo-sos-resolver {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  border: 0;
  border-radius: 8px;
  background: #28785a;
  color: white;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

.vizlo-sos-resolver:disabled {
  opacity: 0.5;
}

/* =====================================
   VIZLO - ALERTAS DESPLEGABLES
   ===================================== */

.vizlo-sos-historial {
  width: 100%;
  margin: 10px 0 15px;
}

#vizloSOSHistorialBtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid #486886;
  border-radius: 9px;
  background: #304c67;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

#vizloSOSHistorialBtn:hover {
  background: #3b5a78;
}

#vizloSOSHistorialFlecha {
  font-size: 20px;
  line-height: 1;
}

#vizloSOSAlerts[hidden] {
  display: none !important;
}

.vizlo-sos-historial #vizloSOSAlerts {
  margin: 8px 0 0;
  padding: 8px;
  background: #14253a;
  border-radius: 9px;
  max-height: 220px;
  overflow-y: auto;
}

/* ======================================
   VIZLO - INFORMACION DEL MENSAJE
   ====================================== */

#vizloMessageInfoOverlay[hidden],
#vizloMessageInfoBtn[hidden] {
  display: none !important;
}

.vizlo-message-info-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.65);
}

.vizlo-message-info-panel {
  box-sizing: border-box;
  width: min(420px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  padding: 18px;
  border: 1px solid #486886;
  border-radius: 16px;
  background: #203b56;
  color: #fff;
}

.vizlo-message-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

#vizloMessageInfoClose {
  border: none;
  background: transparent;
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.vizlo-message-info-text {
  padding: 14px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: #2c4c65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.vizlo-message-info-content h4 {
  margin: 16px 0 10px;
  color: #c9e9fc;
  font-size: 14px;
}

.vizlo-message-info-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #45617b;
  font-size: 13px;
}

.vizlo-message-info-person small {
  color: #b8cedf;
  font-size: 11px;
}

/* VIZLO - EVITAR SALTOS DE SCROLL EN SAFARI */

#messages {
  overflow-anchor: none !important;
}

#messages .message {
  overflow-anchor: none;
}

