/* Общие стили */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --background-color: #f5f5f5; /* Default background color */
  --sent-color: #20B2AA; /* #66CDAA; #00e34d;*/
}
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  height: 100%;
  place-items: center;
  text-align: center;
  /* background: #f2f2f2; */
  font-size: 16px;
  background-color: var(--background-color); /*#f5f5f5; #ebebeb*/
}
/* Mobile */
@media screen and (max-width: 479px) {
  :root {
    --records-per-row: 1;
  }
}
/* Small tablets and larger */
@media screen and (min-width: 480px) {
  :root {
    --records-per-row: 2;
  }
}
/* Medium tablets and larger */
@media screen and (min-width: 600px) {
  :root {
    --records-per-row: 3;
  }
}
/* Large tablets and larger */
@media screen and (min-width: 768px) {
  :root {
    --records-per-row: 4;
  }
}
/* Small laptops and larger */
@media screen and (min-width: 900px) {
  :root {
    --records-per-row: 5;
  }
}
/* Medium laptops and larger */
@media screen and (min-width: 1024px) {
  :root {
    --records-per-row: 6;
  }
}
/* Large laptops and larger */
@media screen and (min-width: 1200px) {
  :root {
    --records-per-row: 7;
  }
}
/* Extra large laptops and larger */
@media screen and (min-width: 1400px) {
  :root {
    --records-per-row: 8;
  }
}
/* Larger screens and larger */
@media screen and (min-width: 1600px) {
  :root {
    --records-per-row: 9;
  }
}
/* Huge screens and larger */
@media screen and (min-width: 1800px) {
  :root {
    --records-per-row: 10;
  }
}
/* Общие чат-стили */
.container {
  height: 100vh;
  width: 100vw;
  display: flex;
  padding-top: 50px;
  /* margin-top: 50px; */
}
.topics {
  /* width: 100%; */
  flex: 0 0 300px;
  /* width: 300px; */
  height: 100%;
  overflow-y: scroll;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  margin-top: 5px;
}
.chats {
  flex-grow: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin-left: 5px;
  
}
.messages {
  flex-grow: 1;
  height: calc(100% - 250px);
  overflow-y: scroll;
  padding:2% 3%;
  border-bottom:1px solid #ecf0f1;
}
.chat-form {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px;
}
@media screen and (max-width: 767px) {
  .topics {
    width: 100%;
    box-shadow: none;
    overflow-y: scroll;
    /* overflow-y: auto; */
    height: auto;
  }
  .topics:not([style*="display: none"]) + .chats {
    display: none;
  }
}
li {
  background: #f2f2f2;
  border-radius: 3px;
  box-shadow: -3px -3px 7px #ffffff73, 3px 3px 5px rgba(94, 104, 121, 0.288);
  text-decoration: none;
  color: #4d3252;
  font-weight: bold;
  list-style: none;
  cursor: pointer;
  padding: 0 5px;
  box-sizing: border-box;
}

li:hover {
  background-color: white;
}

li.active {
  box-shadow: inset -3px -3px 7px #ffffff73, inset 3px 3px 5px rgba(94, 104, 121, 0.288);
  color: #007bff;
}

.header {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #f2f2f2;
  box-shadow: -3px -3px 7px #ffffff73, 3px 3px 5px rgba(94, 104, 121, 0.288);
  z-index: 5;
}

.header ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
}

.header li {
  margin: 0;
  padding: 0 10px;
}

.header .right-panel {
  margin-left: auto;
}

.header .right-panel .clear {
  display: none;
  color: rgb(24, 148, 24);
  font-size: 18px;
  padding: 0 10px;
}

.header .right-panel li input {
  font-size: 16px;
  color: #007bff;
  height: 25px;
  width: 100px;
  padding: 0 5px;
  border: none;
  background-color: transparent;
  outline: none;
  font-weight: bold;
  box-sizing: border-box;
}

.header .location .menu,.header .right-panel .menu {
  height: 25px;
  padding: 0 15px;
  box-sizing: border-box;
}

.header .location .menu:after {
  content: "▼";
  color: #4caf50;
}
.header .location .menu.show-arrow:after {
  content: "▲";
  color: #007bff;
}
.header .location .dropdown-menu, .header .right-panel .dropdown-menu {
  position: absolute;
  display: none;
  background-color: lightgray;
  min-width: 160px;
  box-shadow: -3px -3px 7px #ffffff73, 3px 3px 5px rgba(94, 104, 121, 0.288);
  /* box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); */
  text-align: left;
  margin-top: 10px;
  padding: 5px;
  z-index: 2;
}
.header .right-panel .dropdown-menu {
  right: 200;
  margin: 10px 0 0 -125px;
  /* padding: 20px 20px; */
}
.header .location .dropdown-menu.show, .header .right-panel .dropdown-menu.show {
  display: block;
}
.header .location .dropdown-menu li.active:after, .header .right-panel .dropdown-menu li.active:after {
  content: " ✔";
}
.topics .filters li input , .header .right-panel li input {
  font-size: 16px;
  color: #007bff;
  height: 25px;
  width: 100px;
  padding: 0 5px;
  border: none;
  background-color: transparent;
  outline: none;
  font-weight: bold;
  box-sizing: border-box;
}
.header .right-panel .menu.active {
  color: #007bff;
}
.header .right-panel .menu:before {
  color: #007bff; content: '♻';
}
.header .right-panel .sorter[data-attr="date"] {
  color: #007bff;
}
.header .right-panel .sorter[data-attr="price"] {
  color: rgb(24, 148, 24);
}
.header .right-panel .menu:after {
  content: "▼";
  color: #4caf50;
}
.header .right-panel .menu.show-arrow:after {
  content: "▲";
  color: #007bff;
}
.header .right-panel .menu .circle-with-number {
  background-color: var(--background-color); /*#f2f2f2; */
}
.header .right-panel .menu .circle-with-number .symbol:hover {
  border-radius: 50%;
  background-color: #4caf50;
}
.topics .filters{
  /* justify-content: space-between; */
  /* margin-top: 10px; */
  /* margin-left: auto; */
  display: flex;
  justify-content: flex-end;  
  /* margin-left: 20px; */
  /* padding-left: 20px; */
  padding: 5px 20px;
  box-shadow: -3px -3px 7px #ffffff73, 3px 3px 5px rgba(94, 104, 121, 0.288);
}
.topics .filters .clear {
  display: none;
  color: rgb(24, 148, 24);
  font-size: 18px;
  padding: 0 10px;
  /* margin: 5px; */
}
.topics .filters li:last-child {
  color: rgb(24, 148, 24);
  font-size: 22px;
  margin: 0 20px;
  padding: 0 20px;
}
.topics .filters li:last-child:active {
  box-shadow: inset -3px -3px 7px #ffffff73, inset 3px 3px 5px rgba(94, 104, 121, 0.288);
  color: #007bff; 
}
.conversations {
  margin-top: 5px;
  margin-left: 5px;
  /* padding-top: 10px; */
}
.conversations li {
  display: flex;
  font-style: italic;
  /* color: #888; */
  line-height: 1.7; 
  text-align: left;
  margin: 5px;
  /* margin-bottom: 5px; */
  /* font-weight: normal; */
  /* background: #f2f2f2; */
  border-radius: 5px;
  box-shadow: -1px -1px .7px #ffffff73, 1px 1px .5px rgba(94, 104, 121, 0.288);
  /* text-decoration: none; */
  /* color: #4d3252;   */
  /* font-weight: bold; */
  /* list-style: none; */
  cursor: pointer;
  padding: 5px; /* Add padding to all sides */
  display: block; /* Make the <li> element a block-level element */
}
.conversations li.active {
  display: flex;
  box-shadow: inset -1px -1px .7px #ffffff73, inset 1px 1px .5px rgba(94, 104, 121, 0.288);
}
.conversations li.active > .title-label {
  /* box-shadow: inset -1px -1px .7px #ffffff73, inset 1px 1px .5px rgba(94, 104, 121, 0.288); */
  color: #007bff; 
  flex: 1;
  padding: 0 5px;
  /* background-color: #e1f5fe; */
}
.conversations .edit-title {
  max-width: 300px;
}
