:root {
  --font_family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    "Helvetica", "Arial", sans-serif;
}

body {
  margin: 0;
  font-family: var(--font_family);
  background: linear-gradient(to bottom, #fffde7, #dfffdc);
}


.styled-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #ccc;
  border-radius: 10px;
  transition: border-color 0.3s ease;
  font-family: inherit;
  font-size: 16px;
}

.styled-input:focus,
.styled-input:hover {
  border-color: #77c043;
  outline: none;
}

.input-group {
  margin-bottom: 12px;
}

.error {
  color: #d93025;
  font-size: 13px;
  margin-top: 4px;
  padding-left: 4px;
}


.chat-container {
  max-width: 600px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.chat {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.message {
/*  max-width: 80%; */
  position: relative;
  padding: 10px 15px;
  border-radius: 16px;
  margin: 10px 0;
  word-wrap: break-word;
  display: inline-block;
  animation: fadeInUp 0.3s ease;
  background: #f1f1f1;
}

.message.operator {
/*  max-width: 80%; */
  background-color: white;
  border-radius: 15px;
  padding: 12px 16px;
  position: relative;
  font-family: var(--font_family);
  word-break: break-word;
}

.message form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
  width: 100%;
  margin-top: 10px;
}

.message form input {
  padding: 10px 12px;
  border: 2px solid #a3d977;
  border-radius: 10px;
  font-family: var(--font_family);
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.message form input:focus {
  outline: none;
  border-color: #7cbf42;
  box-shadow: 0 0 0 2px rgba(124, 191, 66, 0.2);
}

.message form input:hover {
  border-color: #7cbf42;
}

.validation-error {
  color: red;
  font-size: 12px;
  margin-top: -5px;
  margin-bottom: 5px;
}

.message.operator::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid white;
  border-top: 8px solid white;
}

.message.user {
  align-self: flex-end;
  background: #a8e063;
  color: black;
  border-radius: 16px 16px 0 16px;
  margin-right: 10px;
}

.message.user::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-right: 8px solid transparent;
  border-left: 8px solid #a8e063;
  border-top: 8px solid #a8e063;
}

.meta {
  font-size: 0.75em;
  color: #666;
  margin-top: 5px;
}

.operator-row {
  display: flex;
  align-items: flex-end;
}

.avatar {
/*  width: 36px;
  height: 36px;*/
  border-radius: 50%;
  margin-right: 8px; /* Было 8-10px — уменьшили */
  align-self: flex-end;
}



.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  animation: fadeInUp 0.3s ease;
}

.button-option {
  padding: 12px 20px;
  background: #b55501;
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 1.4em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.button-option:hover {
  background: #7cb342;
  transform: translateY(-2px);
}

.input-area {
  padding: 10px;
  border-top: 1px solid #ccc;
  background: white;
}
