.messaging
{
  position: fixed;
  max-height: 95%;
  max-width: 90%;
  max-width: calc(100% - 40px);
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  display: none;
  padding: 0;
  margin: 0;
  
  bottom: 50px;
  right: calc(50% - 1375px / 2 * var(--scale) + var(--scale) * 20px); /* 230px; */

  width: 679px;
  height: 670px;
  transform: none;
  z-index: 999;

  /*--bg_color: white;*/
  --bg_color: #2d2522;
  --border_color: #a17344;
  --container_element_bg: #36221b;
  --container_element_bg_selected: #53362b;
  --text_color: #ffb468;
  --input_bg: #1c0b04cc;
  --scroll_bg: #1a1615;
  --scroll_element: #38302d;

  color: #ffb468;
  color: var(--text_color);
  font-family: 'Open Sans', Tahoma, Arial, sans-serif;
  font-size: 90%;

  background-image: url("../assets/chat/chat_bg.png");
  background-size: cover;
}

.messaging--show
{
  display:block !important;
}

.main
{
  /* height: 100%; */
  width: 191px;
  right: 25px;
  bottom: 82px;
  top: 20px;
  position: absolute;
}

.container
{
  /* padding: 50px 50px 50px 50px; */
  /* margin: auto 30px 30px 30px; */
  height: 100%;
}

.container_inner
{
  border-radius: 0;
  /* border-radius: 6px 6px 0 0; */
  border-color: #a17344;
  border-color: var(--border_color);
  border-width: 0px;
  border-style: solid;
  /* box-shadow: 0 0 3px rgba(0, 0, 0, 0.4); */
  /* background-color: #2d2522;
  background-color: var(--bg_color); */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
  margin: 0 auto;
}

.header
{
  height: 40px;
  line-height: 40px;
  padding: 0 2em 0 1em;
  cursor: pointer;
  user-select: none;
  display: block;
}
.messaging--small .header
{
  height: 35px;
  line-height: 35px;
}

.header_inner
{
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  word-wrap: normal;
  display: inline-block;
  vertical-align: top;
  box-sizing: border-box;
  padding: 0 2.55em 0 1em;
}

#messaging.messaging--full .header_close
{
    visibility: visible;
    z-index: 1;
}

.header_close
{
  position: absolute;
  top: 5px;
  right: 0;
  height: 100%;
  padding: 0 5px;
  font-weight: 700;
  outline: 0;
  background: transparent;
  border: 0;
  opacity: 0.6;
  vertical-align: middle;
  word-wrap: normal;
  /* visibility: hidden; */
  z-index: -1;
}

/* .header_icon
{
  position: absolute;
  top: 15%;
  height: 100%;
  padding: 0 1em;
  font-weight: 700;
  outline: 0;
  background: transparent;
  border: 0;
  opacity: 0.5;
  vertical-align: middle;
  word-wrap: normal;
  animation: blink 1s linear 0s infinite alternate none;
}
@keyframes blink
{
  from {opacity: 0;}
  to {opacity: 1;}
} */

.container_main
{
  position: static;
  display: block;
  /* height: 0; */
  /* top: 0;
  left: 0;
  width: 100%;
  height: 100%; */
}

.container_main_friends_wrapper
{
  width: 100%;
  position: relative;
  display: block;
  flex: 1;
}

.container_main_friends_inner
{
  display: block;
  position: relative;
  height: calc(100% - 1px);
  width: 100%;
  background: #1c0b04cc;
  box-shadow: 0px 1px #ffc27945, 0px -1px #ffc27926;
  border-style: solid;
  border-width: 0px;
  border-radius: 5px;
}

.container_main_friends
{
  height: 100%;
  width: 100%;
  overflow-y: auto;
  position: absolute;  
  /* top: 0;
  left: 0;
  bottom: 0;
  right: 0; */
}

.friends
{
  width: 100%;
}

.friend
{
  width: 100%;
  height: 60px;
  /* background: #1a1615; */
  margin: 5px 0px;
  position: relative;
  user-select: none;
}

.friend:nth-child(even)
{
  background: #8b53131a;
}

.friend:hover
{
  background: #d47e1c27;
  cursor: pointer;
}

.friend.container_element_selected
{
  background: linear-gradient(to top, #794000, #ce914d);
  box-shadow: 0px 2px 2px #11110e;
}


.friend_avatar
{
  width: 40px;
  height: 40px;
  border: 1px solid rgb(205,150,82);
  /* box-shadow: 0px 0px 5px 0px crimson; */
  /* margin: 5px; */
  position: absolute;
  left: 10px;
  top: 10px;
  /* bottom: 5px; */
}
/* .friend_avatar:before
{
  content: ' ';
  display: block;
  position: absolute;
  height: 40px;
  width: 40px;
  background-image: url(../assets/lobby/!lobby_no_photo_my.jpg);
  background-size: cover;
} */

.friend_nickname
{
  position: absolute;
  left: 60px;
  top: 12px;
  color: #fcf0cc;
  text-shadow: 1px 1px 5px black;
}

.friend_state
{
  position: absolute;
  left: 60px;
  top: 32px;
  color: #4dd024;
  text-shadow: 1px 1px 5px black;
  font-size: 90%;
  /* font-weight: bold; */
}

.friend_state_online
{
  color: #4dd024;
}
.friend_state_offline
{
  color: #d02424;
}
.friend_state_in_game
{
  color: #eccd1e;
}
.friend_state_iaminvited
{
  cursor: pointer;
  color: #6cacff;
  text-decoration: underline;
}
.group_new_message_svg
{
  position: absolute;
  right: 5px;
  top:5px;
  font-size: 90%;
  display: none;
  text-shadow: 1px 1px 5px black;
}
.group_new_message_svg_general
{
  /* color: #ecd610; */
  color: #fd3d3d;
}
.group_new_message_svg_game
{
  color: #ecd610;
}
.has_new_message .group_new_message_svg
{
  display: unset;
}
.friend_new_message_svg
{
  position: absolute;
  right: 5px;
  top:5px;
  color: #4dd024;
  text-shadow: 1px 1px 5px black;
  font-size: 90%;
  display: none;
}

.has_new_message .friend_new_message_svg
{
  display: unset;
}

.icon_blink
{
  animation: blink 1s linear 0s infinite alternate none;
}
@keyframes blink
{
  from {opacity: 0;}
  to {opacity: 1;}
}

#messaging.messaging--small .container_options
{
  display: none;
}
.container_options
{
  bottom: 10px;
  position: absolute;
  /*height: 45px;*/
  padding: 0 5px;
}

.container_element
{
  position: relative;
  text-align: center;
  background-color: #36221b;
  background-color: var(--container_element_bg);
  border-radius: 5px;
  margin: 5px;
  height: 30px;
  line-height: 30px;
  border-color:#a17344;
  border-color: var(--border_color);
  border-width: 1px;
  border-style: solid;
  cursor: pointer;
}

.container_element:hover
{
  background-color: #63463b;
}

.container_element.container_element_selected
{
  background-color: #53362b;
  background-color: var(--container_element_bg_selected);
}

.container_group
{
  text-align: center;
  /* background-color: gray; */
  padding-top: 20px;
  margin: 5px;
  height: 30px;
  line-height: 30px;
}

.chat
{
  left: 35px;
  top: 26px;
  width: 424px;
  /* height: 557px; */
  bottom: 78px;
  position: absolute;

  /* position: fixed; */
  max-height: 95%;
  max-width: 90%;
  max-width: calc(100% - 40px);
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  /*display: block;*/
  margin: 0;
  
  /* bottom: 20px; */
  /* right: 270px; */

  transform: none;
  z-index: 999;

  --bg_color: #2d2522;
  --border_color: #a17344;
  --container_element_bg: #36221b;
  --container_element_bg_selected: #53362b;
  --text_color: #ffb468;
  --input_bg: #1c0b04cc;
  --scroll_bg: #1a1615;
  --scroll_element: #38302d;

  color: #ffb468;
  color: var(--text_color);
  font-family: 'Open Sans', Tahoma, Arial, sans-serif;
  font-size: 90%;
  padding: 0;
  line-height: 1.4;
}

.chat_invisibe
{
  /*display: none;*/
  visibility: hidden;
}
.chat_visibe
{
  /*display: block;*/
  visibility: visible;
}

/* .chat textarea, .chat span */
/* .message_author
{
  color: #ffb468;
  color: var(--text_color);
  font-family: 'Open Sans', Tahoma, Arial, sans-serif;
} */

.chat_container_outter
{
  padding: 5px;
  height: calc( 100% - 10px);
}

.chat_container_inner
{
  /* border-radius: 6px 6px 6px 6px;
  border-color: #a17344;
  border-color: var(--border_color); */
  /* border-width: 1px; */
  /* border-style: solid; */
  /* box-shadow: 0 0 3px rgba(0, 0, 0, 0.4); */
  /* background-color: #2d2522;
  background-color: var(--bg_color); */
  overflow: hidden;
  height: calc(100% - 1px);
  position: relative;
  margin: 0 auto;

  background: #1c0b04cc;
  box-shadow: 0px 1px #ffc27945, 0px -1px #ffc27926;
  border-style: solid;
  border-width: 0px;
  border-radius: 5px;
}

.chat_title
{
  text-align: center;
  background-color: #53362b;
  background-color: var(--container_element_bg_selected);
  border-radius: 5px;
  margin: 5px;
  height: 30px;
  line-height: 30px;
  border-color: #a17344;
  border-color: var(--border_color);
  border-width: 1px;
  border-style: solid;
  position: relative;
}

.chat_title_spinner
{
  position: absolute !important; 
  left: 20px;
  top: 2px;
}
.chat_title_spinner_hide
{
  display: none  !important;
}

.chat_title_button
{
  position: absolute !important; 
  /* right: 0px;
  top: 0px;
  bottom: 0px; */

  text-align: center;
  background-color: #36221b;
  background-color: var(--container_element_bg);
  border-radius: 5px;
  margin: 3px;
  padding: 0 10px;
  height: 22px;
  line-height: 22px;
  border-color:#a17344;
  border-color: var(--border_color);
  border-width: 1px;
  border-style: solid;
  cursor: pointer;
}

.chat_title_button:hover
{
  background-color: #63463b;
}

.chat_title_button_enable
{
  position: absolute !important; 
  right: 0px;
  top: 0px;
  bottom: 0px;
}

.chat_title_button_invite
{
  position: absolute !important; 
  left: 0px;
  top: 0px;
  bottom: 0px;
}

.chat_title_button_view
{
  position: absolute !important; 
  left: 0px;
  top: 0px;
  bottom: 0px;
  color: #eee3a2;
  background-color: darkgreen;
}

.chat_title_button_view:hover
{
  background-color: rgb(0, 71, 0);
}

.chat_title_button_remove
{
  position: absolute !important; 
  right: 0px;
  top: 0px;
  bottom: 0px;
}

.chat_title_button_hide
{
  display: none  !important;
}

.chat_textarea
{
  vertical-align: middle;
  resize: none;
  min-height: 41px;
  max-height: 125px;
  height: 15px;
  width: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  /*margin-right: -18px;*/
  margin: auto auto;
  overflow-y: scroll;
  padding-top: 0.7em;
  padding-right: 0.5em;
  padding-bottom: 0.7em;
  padding-left: 5px !important;
  /* font-size: 100%;*/
  font-size: 16px;
  line-height: inherit;
  color: inherit;
  background: none;
  border: none;
}

.chat_textarea_wrapper
{
  position: absolute;
  left: 40px;
  right: 25px;
  bottom: 30px;
  height: 40px;
  padding: 1px;
  background-color: #1c0b04cc;
  background-color: var(--input_bg);
  box-shadow: 0px 1px #ffc27945, 0px -1px #ffc27926;
  border-radius: 5px;
  border-color: #a17344;
  border-color: var(--border_color);
  border-width: 0px;
  border-style: solid;
}
.chat_textarea_inner
{
  /* position: relative; 
  width: 100%; */
  position: absolute;
  right: 50px;
  left: 0px;
}

.chat_messages_wrapper
{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0px;
  top: 40px;
  margin: 5px 5px 5px 10px;
  overflow-y: auto;
  width: unset;
  height: unset;
}

.chat_textarea_btn_send
{
  position: absolute;
  top: 11px;
  right: 12px;
}

.chat_textarea_btn_send svg
{
  fill: #c67646;
  cursor: pointer;
}
.chat_textarea_btn_send:hover svg
{
  fill: #cd9d4c;
}
.chat_textarea_btn_send:active svg
{
  fill: #834d2b;
}

.chat_messages
{
  /*padding: 5px;*/
}
  
.message
{
  margin-bottom: 10px;
  text-align: left;
}
.message_dt_group
{
  background: #d47e1c3a;
  cursor: pointer;
}
.message_author
{
  display: inline;
}
.message_content
{
  display: inline;
}
.message_content_moderator
{
  color: rgb(247, 105, 105);
  font-weight: bolder;
}
.message_content_system
{
  color: white;
}

/* MINI */

#minichat
{
  --scale: 1;
  position: fixed;
  max-height: 95%;
  max-width: 90%;
  max-width:  calc(100% - 40px);
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  /*display: block;*/
  margin: 0;
  
  bottom: calc(var(--scale) * 15px);
  right: calc(50% - 1375px / 2 * var(--scale) + var(--scale) * 236px); /* 230px; */

  width: calc(var(--scale) * 500px);
  height: 150px;
  transform: none;
  z-index: 999;

  --bg_color: #2d2522;
  --border_color: #a17344;
  --container_element_bg: #36221b;
  --container_element_bg_selected: #53362b;
  --text_color: #ffb468;
  --input_bg: #161210;
  --scroll_bg: #1a1615;
  --scroll_element: #38302d;

  color: #ffb468;
  color: var(--text_color);
  font-family: 'Open Sans', Tahoma, Arial, sans-serif;
  font-size: 90%;
  padding: 0;
  line-height: 1.4;
  pointer-events: none;
}

.minichat_invisibe
{
  /*display: none;*/
  visibility: hidden;
}
.minichat_visibe
{
  /*display: block;*/
  visibility: visible;
}

#minichat textarea, #minichat span
{
  color: #ffb468;
  color: var(--text_color);
  font-family: 'Open Sans', Tahoma, Arial, sans-serif;
}

.minichat_container_outter
{
  padding: 5px 5px 0 5px;
  height: calc( 100% - 5px);
}

.minichat_container_inner
{
  border-radius: 6px 6px 0px 0px;
  /*box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);*/
  /*background-color: var(--bg_color);*/
  overflow: hidden;
  height: 100%;
  position: relative;
  margin: 0 auto;
}

.minichat_textarea
{
  display: none;
  vertical-align: middle;
  resize: none;
  min-height: 10px;
  max-height: 125px;
  height: calc( var(--scale) * 32px);
  width: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  /*margin-right: -18px;*/
  margin: auto auto;
  overflow-y: scroll;
  background: none;
  /* background-color: #161210;
  background-color: var(--input_bg); */
  padding-top: calc( var(--scale) * 3px) !important;
  padding-right: 0.5em;
  padding-bottom: 0;
  padding-left: 5px !important;
  /* font-size: 100%; */
  line-height: calc( var(--scale) * 17px);
  border: none;
}

.minichat_textarea_wrapper
{
  position: absolute;
  /*left: 0;*/
  width: 78%;
  right: 0;
  bottom: 0;
  padding: 5px 5px 2px 5px;
  pointer-events: all;
}
.minichat_textarea_inner
{
  position: relative;
  width: 100%;
}

.minichat_messages_wrapper
{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  margin: 5px;
  overflow-y: auto;
}
.minichatchat_messages
{
  /*padding: 5px;*/
}
  
.minichatmessage
{
  margin-bottom: 10px;
  background: rgba(0,0,0,0.7);
  color: #ffb468;
  color: var(--text_color);
  display: block;
  animation: anim_message_hide 1s linear 4s 1 forwards normal;
  text-align: left;
  padding: 0 10px;
}

@keyframes anim_message_hide
{
  from {opacity: 1;}
  to {opacity: 0;}
}
.minichatmessage_author
{
  display: inline;
}
.minichatmessage_content
{
  display: inline;
}


/* !!!!!!!!!!           SPINNER           !!!!!!!!!!!!!!!*/

.lds-spinner {
  color: official;
  display: inline-block;
  position: relative;
  width: 28px;
  height: 28px;
}
.lds-spinner div {
  transform-origin: 14px 14px;
  animation: lds-spinner 1.2s linear infinite;
}
.lds-spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 3px;
  left: 13px;
  width: 2px;
  height: 5px;
  border-radius: 20%;
  background: #fff;
}
.lds-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.lds-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.lds-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.lds-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.lds-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.lds-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.lds-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.lds-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.lds-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.lds-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.lds-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.lds-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}
@keyframes lds-spinner {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}