/* chat.css */
@charset "UTF-8";

/* Estilo para o contêiner do chatbox */
#chatbox-container {
  display: none;
  /* Inicialmente oculto */
  position: fixed;
  bottom: 80px;
  /* Apenas uma definição */
  right: 0;
  width: 343px;
  height: 405px;
  bottom: 50px;
  /* Alinhado 20px acima do fundo da tela */
  right: 0px;
  /* Alinhado 20px à direita da tela */
  background-color: white;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  z-index: 103;
  /* Certifique-se de que o contêiner do chat tenha um z-index menor */
}


/* Estilo para o chatbox */
#chatbox {
  width: 100%;
  height: 229px;
  border: 1px solid #ccc;
  overflow-y: scroll;
  padding: 10px;
  white-space: pre-wrap;
  /* Preserva quebras de linha e espaços */
  font-family: monospace;
  /* Melhor para ASCII art */
}

/* Estilo para a área de entrada de mensagem */
#message {
  width: 100%;
  height: 100px;
  /* Altura inicial maior para indicar multi-linha */
  padding: 10px;
  border: none;
  border-top: 1px solid #ddd;
  resize: vertical;
  /* Permite redimensionar verticalmente, opcional */
  font-size: 16px;
  box-sizing: border-box;
  border-radius: 5px;
}

#message:focus {
  outline: none;
  border-top: 1px solid #28a745;
  /* Cor ao focar, opcional */
}

/* Estilo para o botão de envio */
#send {
  bottom: 20px;
  right: 20px;
  background-color: #0088cc;
  /* cor estilo Telegram */
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.3s;
    display: none;
  /* Inicialmente oculto */
  z-index: 120;
  /* 102 Garante que o botão de envio esteja acima do contêiner do chat */
}

/* Cor ao passar o mouse no botão */
#send:hover {
  background-color: #00b306;
}

.send-btn svg {
  width: 28px;
  height: 28px;
  fill: white;
  transform: rotate(-45deg);
  /* Aponta para cima */
}

/* Estilo do botão flutuante (X ou 💬) */
.float-button {
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  text-align: center;
  font-size: 24px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 103;
  -webkit-tap-highlight-color: transparent;
  /* Evita destaque no iOS */
}

/* Estilo para a notificação de mensagens não lidas */
.float-button[data-badge]:after {
  content: attr(data-badge);
  position: absolute;
  top: -5px;
  right: -5px;
  background: red;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

/* Estilo para a lista de usuários online */
#online-users-container {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  background-color: #f9f9f9;
}

* {
  box-sizing: border-box;
}

.admin-message {
  color: red;
}

#clear-name-btn {
  bottom: 0px;
  right: 7px;
  width: 93px;
  height: 22px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  z-index: 100;
}


/* definir nome */
.name-input-container {
  position: fixed;
  bottom: 160px;
  /* Ajustado levemente para alinhar */
  right: 20px;
  background-color: #fff;
  padding: 15px;
  /* Mais espaço interno */
  border: 1px solid #ccc;
  border-radius: 8px;
  z-index: 102;
  width: 250px;
  /* Tamanho ajustável manualmente */
}

/* definir nome */
.name-input-container input#name-input {
  width: 100%;
  /* Ocupa toda a largura do container */
  padding: 10px;
  font-size: 18px;
  /* Tamanho da fonte aumentado */
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

/* definir nome */
.name-input-container input#name-input::placeholder {
  font-size: 18px;
  /* Fonte do placeholder aumentada */
  color: #060101;
}

/* definir nome */
.name-input-container button#save-name-btn {
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* Estilo para o botão Definir Nome */
.name-input-btn {
  position: fixed;
  bottom: 30px;
  /* Ajuste a posição vertical (acima do botão Limpar Nome) */
  right: 14px;
  /* Mesma posição horizontal do Limpar Nome para alinhamento */
  width: 93px;
  /* Mesmo tamanho do Limpar Nome */
  height: 22px;
  background-color: #28a745;
  /* Verde para diferenciar, mas ajustável */
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  z-index: 100;
  font-size: 12px;
  /* Mesmo tamanho de fonte do Limpar Nome */
  text-align: center;
}

.name-input-btn:hover {
  background-color: #218838;
  /* Cor mais escura ao passar o mouse, ajustável */
}