/* Announcer */

#announcer {
  position: absolute;
  top: 6px;
  left: 50%;
  translate: -50%;
  width: 3.2rem;
  color: #fff;
  background-color: #0e060c;
  border-radius: 5px;
  border: 1px solid #323232;
  overflow: hidden;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
  font-size: 0.85rem;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1rem;
  cursor: pointer;
  padding: 6px;
}

/* Messages */
#top-message {
  overflow: hidden;
}

#messages {
  height: 100%;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.message {
  color: #d0cddb;
  font-size: 0.85rem;
  line-height: 1rem;
}

.message.top {
  color: #e7ca9c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message.regular, .message.system {
  border-radius: 3px;
  padding: 0.25rem;
  box-sizing: border-box;
  border: 1px solid #323232;
}

.message.system {
  color: #e7ca9c;
}

.message .location, .message .username {
  color: #9cbfd9;
}

.message .username.is-patron, .player .is-patron {
  color: #9dd99a;
}

.message .username.is-admin {
  color: #eb80b5;
}

.message .is-you {
  color: #b3fffc;
  font-weight: bold;
}

.message .location {
  margin-right: 0.25rem;
}

.message .username {
  cursor: pointer;
  margin-right: 0.25rem;
}

.message .rank {
  font-size: 0.66rem;
  text-transform: uppercase;
}

.ts {
  height: 0.85rem;
  padding: 1px 3px 1px 3px;
  box-sizing: border-box;
  border-radius: 5px;
  color: #6e6e76;
  background-color: #2a2a2a;
  font-size: 0.75rem;
  margin-right: 0.25rem;
}


.unread {
  animation: new 0.5s ease-in-out;
}

.ping {
  animation: ping 1s ease-in-out;
}

@keyframes new {
  0% {
    background-color: #2a2a2a;
  }
  100% {
  }
}

@keyframes ping {
 50% {
   color: #cded57;
 }
}

/* Chat */
#chat-new {
  position: absolute;
  width: 100%;
  translate: 100%;
  top: 6px;
  bottom: 6px;
  right: 36px;
  color: #fff;
  z-index: 22;
  display: flex;
  font-size: 0.85rem;
}

#chat-grip {
  width: 2rem;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

#chat-display {
  background-color: rgba(0, 0, 0, 0.83);
  border-radius: 5px 0 0 5px;
  border-left: 1px solid #323232;
  border-top: 1px solid #323232;
  border-bottom: 1px solid #323232;
  padding: 5px;
  display: flex;
  gap: 4px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #b7b7b7;
  z-index: 23;
}

#chat-display.hasUnread {
  color: #cded57;
}

#chat-grip-icon {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.5;
  padding-left: 8px;
}

#chat-content {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.83);
  border-radius: 0 5px 5px 5px;
  border: 1px solid #323232;
  margin-left: -2px;
  z-index: 22;
  position:relative;
  overflow: hidden;
}

#chat-content.filled {
  background-color: rgba(0, 0, 0, 0.99);
}

#chat-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 5px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Chat Header */

#chat-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-x: hidden;
}

#chat-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#chat-header-channels {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid #323232;
}

.channel {
  padding: 4px 6px 4px 6px;
  border-radius: 3px;
  cursor: pointer;
  color: #9895ae;
  border: 1px solid #484848;
  margin-right: 4px;
  font-size: 0.75rem;
  margin-bottom: 4px;
  white-space: nowrap;
}

.channel span {
  margin-left: 4px;
}

.channel.selected {
  color: #ffffff;
  background: #7e9145;
}

#chat-controls {
  display: flex;
  gap: 4px;
}

#chat-controls > div {
  font-size: 0.75rem;
  padding: 1px 3px 1px 3px;
  border-radius: 3px;
  cursor: pointer;
  color: #b2859f;
  background-color: #392933;
  border: 1px solid #836174;
}

#online {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  color: #cded57;
}

/* Messages */

#chat-messages {
  flex: 1;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 4px;
}

#chat-messages.big .message {
  font-size: 0.95rem;
  padding: 0.3rem;
}

#chat-messages.big .message .rank {
  font-size: 0.72rem;
}

/* Footer */

#chat-footer {
  display: flex;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.9);
  gap: 4px;
  overflow: hidden;
}

/* Inputs */
#chat-footer input, #chat-footer button {
  height: 1.8rem;
  font-size: 0.85rem;
  padding: 1px 3px 1px 3px;
  border-radius: 3px;
}

#chat-footer input {
  flex: 1;
  min-width: 30px;
  background-color: transparent;
  border: 1px solid #484848;
  color: #fff;
}

#chat-footer input:focus {
  border: 1px solid #a169d5;
}

#chat-footer button:hover {
  background: linear-gradient(to bottom, #764a6c, #482b42);
}

#chat-footer button:active {
  background: linear-gradient(to bottom, #361f31, #4f3048);
}

#chat-footer button {
  background: linear-gradient(to bottom, #4f3048, #361f31);
  border: 1px solid #484848;
  color: #e8cef7;
  cursor: pointer;
}