#chat-box {
  width: 300px;
  max-height: 450px;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  box-shadow:0 4px 6px rgba(0, 0, 0, 0.1),0 10px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

#chat-box-header {
  background: #33648a;
  color: white;
  padding: 10px;
  font-weight: bold;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1;
}

#chat-log {
  display: none;
  background: rgba(246, 240, 237, 1);
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 14px;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 6px 6px -6px rgba(0,0,0,0.1);
}


.message {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 15px;
  line-height: 1.4;
  word-wrap: break-word;
}

.message.user {
  align-self: flex-end;
  background-color: #fff;
  border-top-right-radius: 0;
}

.message.assistant {
  align-self: flex-start;
  background-color: #fff3e0; 
  border-top-left-radius: 0;
  border: 1px solid #ffd180;
}

.message.assistant.typing {
  font-style: italic;
  color: gray;
}


#user-input {
  border: none;
  border-top: 1px solid #ccc;
  padding: 10px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}

#chat-box button {
  border: none;
  background-color: var(--accent-color);
  color: white;
  padding: 10px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 0 0 10px 10px;
  transition: background-color 0.3s;
}

#chat-box button:hover {
  background-color: var(--accent-color); 
}

/* Адаптивность */
@media (max-width: 480px) {
  #chat-box {
    width: 95%;
    right: 2.5%;
    bottom: 10px;
  }
}