img {
  max-width: 100%;
  height: auto;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f5f5f5;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Блок чата */
.chat {
  width: 90%;
  max-width: 600px;
  height: 80vh;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Шапка чата */
.chat__header {
  background-color: #4a89dc;
  color: white;
  padding: 15px;
  text-align: center;
}

.chat__title {
  font-size: 1.5rem;
  font-weight: bold;
}

/* Блок логина */
.login {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  padding: 20px;
}

.login_hidden {
  display: none;
}

.login__title {
  margin-bottom: 20px;
  color: #333;
}

.login__form {
  display: flex;
  width: 100%;

}

.login__button {
  padding: 10px 15px;
  background-color: #4a89dc;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 16px;
}

.login__button:hover {
  background-color: #3a70b8;
}

.chat__interface {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat__interface_hidden {
  display: none;
}

/* Сообщения */
.chat__messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
}

.message {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 5px;
  background-color: #f1f1f1;
  word-wrap: break-word;
}

.message__username {
  font-weight: bold;
  margin-bottom: 5px;
}

/* Системные сообщения */
.system-message {
  text-align: center;
  color: #666;
  margin: 10px 0;
  font-style: italic;
  font-size: 14px;
}

/* Область ввода сообщения */
.chat__input-area {
  display: flex;
  padding: 15px;
  border-top: 1px solid #eee;
}

.chat__input {
  flex: 1;
  padding: 10px 10px 10px 50px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 16px;
}

.chat__button {
  padding: 10px 15px;
  background-color: #4a89dc;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 16px;
}

.chat__button:hover {
  background-color: #3a70b8;
}

label {
  position: absolute;
  left: 5px;
  z-index: 1;
  background-color: #3a70b8;
  padding: 7px;
  width: 35px;
  height: 35px;
  top: 50%;
  border-radius: 50%;
  transform: translateY(-50%);
}

label img {
  filter: invert(1);
}

.form--chat {
  position: relative;
}

/*//////////////////////////////////////////////*/

.response-list {
    padding-bottom:  30px;
}

.response__o:not(:empty) {
  padding: 20px;
  background-color: rgba(74, 137, 220, 0.25);
  margin-top: 30px;
  border-radius: 4px;
  line-height: 1.5em;
}
.response__o:empty {
  background-color: #fff;
}

#output:empty {
  display: none;
}

.response__o.left {
  align-self: flex-start;
}

.loader {
  width: 48px;
  height: 48px;
  border: 5px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  position: relative;
  animation: pulse 1s linear infinite;
}
.loader:after {
  content: '';
  position: absolute;
  width: 48px;
  height: 48px;
  border: 5px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  animation: scaleUp 1s linear infinite;
}

@keyframes scaleUp {
  0% { transform: translate(-50%, -50%) scale(0) }
  60% , 100% { transform: translate(-50%, -50%)  scale(1)}
}
@keyframes pulse {
  0% , 60% , 100%{ transform:  scale(1) }
  80% { transform:  scale(1.2)}
}
[hidden] {
  display: none!important;
}

/*////////////////////////////////*/
.container {
  display: flex;
  flex-flow: row wrap;
  place-content: center;
  align-items: start;
}
.drawer {
  flex-basis: 40px;
}

.section {
  background-color: cornflowerblue;
  padding: 20px 10px;
  border-radius: 6px;
  margin-right: 15px;
}

.section .heading {
  display: block;
  text-align: center;
  text-transform: uppercase;
  /* font-weight: 700; */
  font-size: 10px;
  padding: 5px 10px;
  background-color: #f5f5f5;
  margin-top: -30px;
  font-family: monospace;
  letter-spacing: .08em;
  border-radius: 15px;
  margin-bottom: 14px;
}

.section:last-of-type {
 margin-top: 30px;
  background-color: limegreen;
}

.label {
  display: block;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;;
  font-size: 12px;
  padding: 5px 0 0 0;
}

.friend-drawer {
  padding: 10px 15px;
  display: flex;
  flex-flow: column wrap;
  background: #eee;
  transition: 0.3s ease;
  border-radius: 4px;
}

.friend-drawer .text {
  margin-left: 12px;
  width: 70%;
}
.friend-drawer .text h6 {
  margin-top: 6px;
  margin-bottom: 0;
}
.friend-drawer .text p {
  margin: 0;
}
.friend-drawer img {
  border-radius: 4px;
}

.friend-drawer--onhover.active,
.friend-drawer--onhover:hover {
  border: #888 1px solid;
  cursor: pointer;
}

.friend-drawer--onhover:hover p,
.friend-drawer--onhover:hover h6,
.friend-drawer--onhover:hover .time {
  color: #fff !important;
}