::-webkit-scrollbar {
  width: 16px;
  background: black;
}

::-webkit-scrollbar-thumb {
  background: #222;
  -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.75);
  border: 1px solid grey;
}

::-webkit-scrollbar-corner {
  background: #000;
}

.chat-message {
  display: block;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.chat-message:hover {
  color: white;
  cursor: pointer;
}

.chatbox-wrapper {
  display: flex;
  height: 100%;
  flex-direction: column;
  word-wrap: break-word;
  min-width: 0;
  overflow: hidden;
}

#chat-input {
  width: 100%;
  color: yellow;
  outline: none;
  padding: 0 0 0 7px;
  border-top: 1px solid black;
  border-bottom: 1px solid black;
  border-left: 3px solid #c8a84e;
  border-right: none;
  white-space: nowrap;
  overflow: hidden;
  min-height: 1.2em;
  line-height: 1.2em;
  cursor: text;
  display: flex;
  align-items: center;
  -webkit-user-modify: read-write-plaintext-only;
  background-color: rgba(200, 168, 78, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

#chat-input:empty::before {
  content: attr(data-placeholder);
  color: grey;
  pointer-events: none;
}

#chat-input.chat-disabled {
  background-image: url("/png/bg4.png");
  background-color: transparent;
  color: grey;
  cursor: default;
  border-left: 3px solid #333;
}

#chat-input.chat-glow:not(.chat-disabled) {
  box-shadow: 0 0 6px 2px rgba(200, 168, 78, 0.7);
}

#chat-input.chat-glow.chat-disabled {
  box-shadow: 0 0 6px 2px rgba(100, 100, 100, 0.5);
}

@keyframes chat-typing-pulse {
  0%, 100% { border-left-color: #c8a84e; }
  50% { border-left-color: #e8d088; }
}

#chat-input.chat-typing:not(.chat-disabled) {
  animation: chat-typing-pulse 1s ease-in-out infinite;
}

@keyframes chat-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

#chat-input.chat-shake {
  animation: chat-shake 0.3s ease;
}

#chat-text {
  overflow-y: hidden;
  overflow-x: hidden;
  background-image: url("/png/bg3.png");
  height: 100%;
  padding: 4px;
  border: 1px solid black;
  border-top: 0px;
  min-width: 0;
}

.chat-header {
  display: flex;
  flex: 1 1 auto;
  overflow-x: hidden;
}

.channel-header {
  display: flex;
}

.wrapper-header {
  display: flex;
  height: 46px;
}

.chat-title span {
  pointer-events: none;
  margin-top: 4px;
  margin-bottom: 4px;
  margin-left: 24px;
  margin-right: 24px
}

.chat-title:hover {}

.chat-title {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  background-image: url("/png/bg2.png");
  cursor: pointer;
  font-weight: bold;
  border: 1px solid black;
}

.chat-title.selected {
  background-image: url("/png/bg3.png");
  border-bottom: 0px;
  border-top: 2px solid #c8a84e;
  border-left: 1px solid #c8a84e;
  border-right: 1px solid #c8a84e;
}

.chat-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  height: 100%;
  width: 100%;
  min-width: 0;
  align-items: flex-start;
}

.channel-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.chat-footer {
  margin-top: 2px;
  margin-bottom: 2px;
  display: flex;
}

/* Resizer Handle */
#chat-resizer {
  height: 5px;
  background-color: #222;
  border-top: 1px solid black;
  border-bottom: 1px solid black;
  cursor: ns-resize;
  width: 100%;
  flex: 0 0 auto;
  /* Não crescer nem encolher */
  z-index: 10;
}

#chat-resizer:hover {
  background-color: #444;
}

/* Quando estiver redimensionando */
.resizing {
  pointer-events: none;
  /* Desativa eventos de mouse no conteúdo para evitar seleção */
  user-select: none;
}

#chat-resizer.locked {
  background-color: #111;
  border-top: 1px solid #111;
  border-bottom: 1px solid #111;
}

#chat-resizer.locked:hover {
  background-color: #111;
  /* Sem destaque quando travado */
}