/* vue 2.7 script widget */
.chat-widget {
  position: fixed;
  bottom: 0px;
  right: 20px;
  /* width: 420px;*/
  min-width: 420px;
  font-family: Arial, sans-serif;
  z-index: 100;
  user-select: none;
}

.chat-header {
  background: linear-gradient(to right, #002554, #0b5c72, #0b8f8e, #09af91);
  color: white;
  padding: 10px;
  border-radius: 10px 10px 0 0px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 45px;

  align-items: center;
  justify-content: center;
}
.chat-header span {
  font-size: 14px;
  line-height: 20px;
}
.chat-header span strong {
  display: block;
}
.chat-face-image {
  position: absolute;
  left: 10px;
  bottom: 15px;
  width: 120px;
  height: 130px;
  background-image: url(/lomonosov.png);
  background-size: 100%;
}
.chat-body {
  padding: 15px;
  border-radius: 10px;
  background: #f0f0f0;
  background: linear-gradient(to right, #002554, #0b5c72, #0b8f8e, #09af91);
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
  display: flex;
  flex-flow: column;
  min-height: 300px;
  min-width: 390px;
  font-size: 18px;
}
.license-agreement {
}
.license-agreement p {
  font-size: 12px;
  color: #fff;
}
.license-agreement p a {
  color: #fff;
}
.license-agreement .accept-button {
  border: none;
  background-color: #002554;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  width: 100%;
  text-align: center;
  height: 40px;
  cursor: pointer;
  border-radius: 5px;
}
.chat-body-header {
  display: flex;
  flex-direction: column;
  color: #fff;
  flex: 0 0 80px;
  box-sizing: border-box;
  padding: 0px 0 0px 0;

  .reset-button {
    position: absolute;
    right: 65px;
    top: 23px;
    cursor: pointer;
    color: #fff;
    font-size: 12px;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 5px;
    img {
      width: 13px;
    }
  }
}
.chat-body-header .logo {
  font-size: 20px;
  line-height: 20px;
  font-weight: bold;
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}
.chat-body-header .logo img {
  width: 30px;
}
.chat-body-header .notice {
  color: #fff;
  font-size: 12px;
  line-height: 15px;
  margin-bottom: 10px;
  width: 97%;
}
.chat-body-header .close {
  position: absolute;
  right: 15px;
  top: 15px;
}
.chat-body-header .close img {
  width: 24px;
  cursor: pointer;
}
.chat-messages {
  /*max-height: 200px;*/
  /*min-height: 200px;*/
  overflow-y: auto;
  margin-bottom: 10px;
  background: #d9d9d9;

  width: calc(100% + 30px);
  left: -15px;
  position: relative;
  box-sizing: border-box;
  padding: 10px 15px;
  flex-grow: 1;
  .first-notice-message {
    background: #8a8a8a;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 10px 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    a {
      color: #fff;
    }
  }
}

.user-message {
  display: flex;
  justify-content: end;
}
.user-message .message-body {
  text-align: right;
  color: #fff;
  background: #19a092;
  margin-bottom: 10px;
  box-sizing: border-box;
  padding: 10px 5px;
  border-radius: 10px;
}
.bot-message {
  text-align: left;
  color: black;
  margin-bottom: 5px;
}
.bot-message-content {
}
.bot-message-content .message-header {
  display: flex;
  flex-flow: row;
  justify-content: space-between;
  padding: 5px 10px;
  box-sizing: border-box;
  background: #f8f8f8;
  border-radius: 10px 10px 0 0;
}
.bot-message-content .message-header .bot-icon {
  width: 30px;
  height: 31px;
}
.bot-message-content .message-header .copy-icon {
  display: flex;
  flex-flow: row;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 10px;
}
.bot-message-content .message-header .copy-icon .text {
  font-size: 12px;
  color: #002554;
}
.bot-message-content .message-header .copy-icon img {
  width: 16px;
}
.bot-message-content .message-body {
  background: #fff;
  font-size: 18px;
  color: #000;
  padding: 10px 10px;
}
.bot-message-content .message-body.error {
  color: #c81818;
}
.bot-message-content .message-footer {
  display: flex;
  flex-direction: row;
  background: #f8f8f8;
  border-radius: 0 0 10px 10px;
  padding: 5px 10px;
}
.bot-message-content .message-footer .note {
  font-size: 12px;
  line-height: 15px;
  color: #8a8a8a;
}
.bot-message-content .message-footer .buttons {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-left: 40px;
  .thumbs-up {
    position: relative;
    top: -2px;
  }
  thumbs-down {
    position: relative;
    bottom: -5px;
  }
}
.bot-message-content .message-footer .buttons div {
  cursor: pointer;
}
.bot-message-content .message-footer .buttons svg {
  width: 20px;
}
.bot-message-content .message-footer .buttons svg.voted path {
  fill: #002554;
}
.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 50px;
}
.chat-input .send-button {
  cursor: pointer;
  &.disabled {
    opacity: 0.5; /* Visually indicate the button is disabled */
    pointer-events: none; /* Disable click events */
    cursor: not-allowed; /* Change cursor to indicate it's not clickable */
  }
}
.chat-input .send-button img {
  width: 20px;
  display: block;
}

.chat-input input {
  flex: 1;
  padding: 5px 10px;
  border: none;
  font-size: 18px;
  border-radius: 5px;
}

.chat-input button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 5px 10px;
  margin-left: 5px;
  cursor: pointer;
  border-radius: 5px;
}

/* Loading Spinner */
.chat-widget .loading {
  margin: 0 auto;
  border: 4px solid #f3f3f3;
  border-radius: 50%;
  border-top: 4px solid #007bff;
  width: 20px;
  height: 20px;
  animation: spin 2s linear infinite;
  display: block;
  margin-bottom: 10px;
}
/* Resizing handle */
.resize-handle {
  width: 10px;
  height: 100%;
  /* background: #002554;*/
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  cursor: nwse-resize; /* Top-left corner resize cursor */
}
.resize-handle2 {
  width:100%;
  height: 10px;
  /* background: #002554;*/
  position: absolute;
  z-index: 9;
  top: 0;
  left: 0;
  cursor: nwse-resize; /* Top-left corner resize cursor */
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .chat-widget {
    right: 0;
    min-width: auto;
    width: 100%;
    &.open {
      height: 100%;
    }
    .chat-body {
      font-size: 14px;
      min-height: auto;
      min-width: auto;
      height: 100% !important;
      width: 100% !important;
      box-sizing: border-box;
    }
  }

  .bot-message-content .message-body {
    font-size: 14px;
  }
}
