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

#chat-element {
    width: calc(100% - 3px);
    max-width: 450px;
    margin: 0 auto;
}

.dynamic-island {
	width: 250px;
	height: 250px;
	background-image: url(../img/avatarka.jpg);
	background-size: cover;
	border-radius: 125px;
	border: 3px solid #977138;
	margin: 0 auto -115px auto;
	z-index: 99999;
	transition: all .5s;
	position: relative;
}
.dynamic-island:hover {
	border: 6px solid #977138;
}

#grey-area {
    height: 625px;
    padding: 147px 25px 23px 25px;
    border: 3px solid #977138;
    border-radius: 15px;
    background: #d9d9d9;
}

.chat-log {
    position: relative;
    max-height: 370px;
    min-height: 370px;
    overflow-y: auto;
	overflow-x: hidden;
    padding: 15px 15px 20px 15px;
    font-size: 13px;
    scrollbar-color: #888 #f1f1f1;
    scrollbar-width: thin;
    border-radius: 15px 15px 0 0;
    background: #fff;
	display: flex;
    flex-direction: column;
}

.typing-area {
	height: 50px;
	background-color: white;
	border-radius: 0 0 15px 15px;
	width: calc(100% - 0px);
}
#chat-message-input {
	border-radius: 20px;
	font-size: 12px;
	margin: 0 0 0 20px;
    padding: 0 34px 0 17px;
    width: calc(100% - 40px);
    border: 1px solid #977138;
    height: 28px;
}
#chat-message-input:active,
#chat-message-input:hover,
#chat-message-input:focus {
	outline: none;
}

#chat-message-send {
	color: #977138;
	padding: 6px 6px 0px 4px;
	border: 3px solid #977138;
	background: white;
	border-radius: 25px;
	margin: -3px 0 0 -33px;
	width: 34px;
    display: inline-block;
	position: absolute;
}
.bi-send::before {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23977138' class='bi bi-send' viewBox='0 0 16 16'%3E%3Cpath d='M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z'/%3E%3C/svg%3E");
}

.message {
    display: flex;
}

.message-bubble {
	padding: 7px 11px;
	border-radius: 19px;
	max-width: 70%;
	box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
	margin: 5px;
	
}

.ai-message {
	justify-content: flex-start;
	
}
.system-message {
	justify-content: flex-start;
}
.human-message {
    justify-content: flex-end;
}

.message.ai-message .message-bubble {
    border: 1px solid #424242;
    background: unset;
    color: #000;
	padding-left: 20px;
}
.message.system-message .message-bubble {
	border: 1px solid #ffffff;
	background: unset;
	color: #000;
	/* Запускаем анимацию */
	animation: systemBlink 2s infinite ease-in-out;
  }
  
  @keyframes systemBlink {
	/* Начало и конец цикла */
	0%, 100% {
	  background-color: unset;   /* или background: none; */
	  border-color: #ffffff;
	  color: #000;
	}
	/* Середина цикла (50%) — «мигание» */
	50% {
	  background-color: #ebebeb; /* Пример приглушённого «светлого» мигания */
	  border-color: #000000;     /* Меняем цвет рамки */
	  color: #000000;            /* Меняем цвет текста */
	}
  }
.message.human-message .message-bubble {
    border: 1px solid #977138;
    background: unset;
    color: #977138;
}

.message-bubble p {
	line-height: 16px;
	font-size: 12px;
	white-space: pre-line;
	
}