::-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;
  align-self: stretch;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-message:hover {
  color: white;
  cursor: pointer;
}

.chatbox-wrapper {
  display: flex;
  height: 100%;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  word-wrap: break-word;
}

#chat-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  color: yellow;
  outline: none;
  padding-left: 34px;
  border-top: 1px solid black;
  border-bottom: 1px solid black;
}

#chat-input:disabled {
  background-image: url("/png/bg4.png");
  color: grey;
}

.chat-input-wrapper {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

#chat-lock-indicator {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 8px;
  color: #f0c94b;
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
  text-shadow: 0 1px 2px #000;
}

.chat-input-wrapper:not(.locked) #chat-lock-indicator {
  color: #b8b8b8;
}

.chat-input-wrapper.lock-feedback {
  animation: chat-lock-shake 320ms ease-in-out;
}

.chat-input-wrapper.lock-feedback #chat-input {
  animation: chat-lock-glow 420ms ease-out;
}

.chat-input-wrapper.lock-feedback #chat-lock-indicator {
  color: #ffe979;
  text-shadow:
    0 0 4px #fff2a6,
    0 0 9px #ffc400,
    0 0 14px #ff8a00;
}

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

@keyframes chat-lock-glow {
  0%, 100% {
    box-shadow: none;
  }
  35% {
    box-shadow:
      inset 0 0 8px rgba(255, 213, 46, 0.85),
      0 0 8px rgba(255, 183, 0, 0.9);
  }
}

#chat-text {
  overflow-y: hidden;
  overflow-x: hidden;
  background-image: url("/png/bg3.png");
  height: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 4px;
  border: 1px solid black;
  border-top: 0px;
}

.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;
  position: relative;
  background-image: url("/png/bg2.png");
  color: #f2f2f2;
  cursor: pointer;
  font-weight: bold;
  border: 1px solid black;
  transition: color 120ms ease;
}

.chat-title.selected {
  color: #fff;
  background-image: url("/png/bg3.png");
  border-color: #b18d25;
  border-bottom: 0;
  box-shadow: none;
  text-shadow: 1px 1px 2px #000;
}

.chat-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  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;
  min-width: 0;
}

/* 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 */
}
