
@import 'msg_thread.css';
@import 'msg_write.css';

/**
 * GRID
 */

/* global settings */

.chat_box * {
  position: relative;
	box-sizing: border-box;
}
.chat_box .chat_item.controls_area  { grid-area: controls;}
.chat_box .chat_item.open_close     { grid-area: open_close;}
.chat_box .chat_item.msg_thread     { grid-area: msg_thread;}
.chat_box .chat_item.msg_write      { grid-area: msg_write;}
.chat_box .chat_item.msg_send       { grid-area: msg_send;}
.chat_box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: grid;
  grid:
    ' controls   open_close ' auto
    ' msg_thread msg_thread ' 1fr
    ' msg_write  msg_send   ' auto
    / 1fr        auto;
  gap: 0px;
  padding: 0px;
  width: auto;
  height: auto;

  border: 1px solid green;
}
.chat_box .chat_item {
	/*
  border: 1px solid blue;
	*/
}
/* buttons settings */
.chat_box .chat_item.button {
  display: flex;
  width: auto;
  padding: 10px;
  cursor: pointer;
	outline: none;
	border: none;
  background-color: rgb(220, 220, 220);
}
.chat_box .chat_item.button p {
  margin: auto;
}
.chat_box .chat_item.button:hover {
  background-color: rgb(200, 200, 200);
}
.chat_box .chat_item.button:active {
  background-color: rgb(220, 220, 220);
}
/* collapse settings */
.chat_box .chat_item:not(.open_close) {
  display: none;
}
#chat_input:checked +
.chat_box {
  gap: 5px;
  padding: 5px;
  width: 300px;
  height: 400px;
}
#chat_input:checked +
.chat_box .chat_item {
  display: flex;
}
#chat_input:checked +
.chat_box .chat_item.open_close p {
  display: none;
}
#chat_input:checked +
.chat_box .chat_item.open_close {
  /*
  */
  width: 30px;
  height: 20px;
  padding: 0px;
  justify-self: end;
  background-color: transparent;
  border: none;
}
#chat_input:checked +
.chat_box .chat_item.open_close::before {
  --collapse_width: 20px;
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 2px;
  width: 15px;
  background-color: black;
}

