/* style.css */
.prefix_auto-invite-bubble {
  position: fixed;
  bottom: 100px;
  right: 100px;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  max-width: 250px;
  z-index: 10001;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
  /* Для крестика */
  position: fixed;
  box-sizing: border-box;
}

/* Общие стили для всех иконок соцсетей */
.prefix_whatsapp-icon,
.prefix_telegram-icon,
.prefix_windowchat-icon,
.prefix_vk-icon {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  pointer-events: none;
}

/* Стили для SVG внутри иконок */
.prefix_whatsapp-icon svg,
.prefix_telegram-icon svg,
.prefix_windowchat-icon svg,
.prefix_vk-icon svg,
.prefix_chat-icon svg {
  position: static !important;
  margin: auto !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
}

/* Стили для анимации появления */
.prefix_whatsapp-icon.show,
.prefix_telegram-icon.show,
.prefix_windowchat-icon.show,
.prefix_vk-icon.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.prefix_auto-invite-bubble.show {
  opacity: 1;
  transform: translateY(0);
}

.prefix_auto-invite-bubble.hide {
  opacity: 0;
  transform: translateY(20px);
}

.prefix_auto-invite-message {
  font-size: 14px;
  line-height: 1.4;
  padding-right: 20px;
  word-wrap: break-word;
}

.prefix_auto-invite-arrow {
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid;
}

.prefix_chat-widget,
.prefix_chat-icon {
  z-index: 9999;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 100%;
}

.loading-spinner svg {
  position: relative;
  top: 25%;
  left: 25%;
  width: 50%;
  height: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.prefix_windowchat-icon {
  font-size: 25px;
  box-shadow: 0 0 16px 4px rgba(0, 0, 0, 0.2);
  background-color: #ad0082;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: fixed;
  bottom: 85px;
  right: 30px;
  z-index: 10001;
}

.prefix_whatsapp-icon {
  font-size: 12,5px;
  box-shadow: 0 0 16px 4px rgba(0, 0, 0, 0.2);
  background-color: #00ad00;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: fixed;
  bottom: 140px;
  right: 30px;
  z-index: 10001;
}

.prefix_telegram-icon {
  font-size: 12,5px;
  box-shadow: 0 0 16px 4px rgba(0, 0, 0, 0.2);
  background-color: #10a5d6;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: fixed;
  bottom: 195px;
  right: 30px;
  z-index: 10001;
}

.prefix_vk-icon {
  font-size: 12,5px;
  box-shadow: 0 0 16px 4px rgba(0, 0, 0, 0.2);
  background-color: #0073f7;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: fixed;
  bottom: 245px;
  right: 30px;
  z-index: 10001;
}

.prefix_chat-widget {
  width: 350px;
  position: fixed;
  bottom: 30px;
  right: 30px;
  box-shadow: 0 0 16px 4px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  font-family: "Arial", sans-serif;
  z-index: 10000;
  border: 1px solid #d2d6dc;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
  visibility: hidden;
}

.prefix_chat-widget.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

@media (max-width: 400px) {
  .prefix_chat-widget {
    width: 95%;
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.9);
  }
  
  .prefix_chat-widget.show {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.prefix_chat-header {
  background-color: #1a73e8;
  color: #fff;
  padding: 15px 20px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
}

.prefix_chat-body {
  background-color: #f4f6f8;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
}

.prefix_chat-messages {
  overflow-y: auto;
  height: 400px;
  padding: 20px;
}

.prefix_chat-input {
  position: relative;
  bottom: 1px;
  background-color: #fff;
  padding: 12px 16px;
  border-radius: 0 0 10px 10px;
  display: flex;
  align-items: center;
  font-size: 15px;
}

.prefix_chat-input .chat-input-content {
  box-sizing: border-box;
  flex-grow: 1;
  min-height: 45px;
  max-height: calc(1.2em * 4 + 24px);
  padding: 12px 16px;
  width: 100%;
  border: 1px solid #d2d6dc;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
  padding-right: 40px;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.4;
  resize: none;
  overflow-y: hidden;
  color: black;
}

/* Стиль для плейсхолдера */
.prefix_chat-input .chat-input-content[data-placeholder] {
  color: #a9a9a9;
}

/* Стиль для активного поля ввода */
.prefix_chat-input .chat-input-content:focus {
  color: black !important;
  border-color: #1a73e8;
}

/* Показываем скролл только когда контент превышает максимальную высоту */
.prefix_chat-input .chat-input-content[style*="height"] {
  overflow-y: auto;
}

.prefix_chat-input .chat-input-content::-webkit-scrollbar {
  width: 5px;
}

.prefix_chat-input .chat-input-content::-webkit-scrollbar-thumb {
  background-color: #c4c4c4;
  border-radius: 5px;
}

.prefix_chat-input .chat-input-content::-webkit-scrollbar-thumb:hover {
  background-color: #a4a4a4;
}

.prefix_chat-input button {
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3C!-- icon666.com - MILLIONS vector ICONS FREE --%3E%3Csvg viewBox='0 0 25 25' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='Layer_47' data-name='Layer 47'%3E%3Cpath d='m23 12.5a.52.52 0 0 1 -.3.46l-16.31 7.36-2.34 1.06-.92.41-.37.21a.52.52 0 0 1 -.21 0 .55.55 0 0 1 -.34-.13.5.5 0 0 1 -.13-.54l3.26-8.83-3.26-8.83a.5.5 0 0 1 .13-.54.53.53 0 0 1 .55-.13l9.24 4.21 10.65 4.79a.52.52 0 0 1 .35.5z' fill='%231e88e5' style='fill: rgb(120, 180, 232);'%3E%3C/path%3E%3Cpath d='m23 12.5a.52.52 0 0 1 -.3.46l-16.31 7.36a12 12 0 0 0 5.91-10.32 11.54 11.54 0 0 0 -.3-2.79l10.65 4.79a.52.52 0 0 1 .35.5z' fill='%231976d2' style='fill: rgb(85, 145, 206);'%3E%3C/path%3E%3Cpath d='m22.65 12-19.89-9a.53.53 0 0 0 -.55.09.5.5 0 0 0 -.13.54l3.26 8.87-3.26 8.83a.5.5 0 0 0 .13.54.55.55 0 0 0 .34.13.52.52 0 0 0 .21 0l19.89-9a.5.5 0 0 0 0-.92zm-19.22-7.55 16.7 7.55h-13.91zm2.79 8.55h13.91l-16.7 7.55z' fill='%230d47a1' style='fill: rgb(94, 117, 151);'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 28px 20px;
  background-position-x: center;
  background-position-y: center;
  position: absolute;
  border: 0;
  background-color: #00000000;
  cursor: pointer;
  right: 25px;
}

.prefix_chat-input button.loading {
  background-image: none;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Стиль для сообщений */
.message {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  line-height: 20px;
  word-wrap: break-word;
  font-size: 15px;
}

.message:last-child {
  margin-bottom: 0;
}

.message.user {
  background-color: #9ecceb;
  margin-right: auto;
  margin-left: 10%;
}

.message.assistant {
  background-color: #e0eef7;
  margin-left: auto;
  margin-right: 10%;
}

.field-container-dataform {
  display: block;
  width: 100%;
  margin-bottom: 10px; /* Отступ между полями */
}

.input-data-field-dataform {
  width: 100%;
  box-sizing: border-box; /* Поля ввода не будут выходить за рамки ширины 100% */
  border: 2px solid #bfc9d4;
  height: 34px;
  border-radius: 8px;
  margin-top: 2px;
}

.title-field-dataform {
  margin: 5px;
  letter-spacing: 1px;
}

.title-dataform {
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 18px;
}

.prefix_chat_button-container-dataform {
  display: flex;
  justify-content: flex-end;
}

.prefix_chat-button-send-dataform {
  margin-top: 5px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  right: 25px;
  border: 0px;
  float: right;
  display: flex;
  justify-content: center;
  align-items: center;
}

.prefix_chat-button-svg-dataform {
  fill: #1e88e5;
}

/* Стили для индикатора загрузки */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #1a73e8;
  margin: 0 4px;
  animation: bounce 1.2s infinite ease-in-out;
}

.dot:nth-child(1) {
  animation-delay: 0.2s;
}

.dot:nth-child(2) {
  animation-delay: 0.4s;
}

.dot:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.prefix_chat-icon {
  box-shadow: 0 0 16px 4px rgba(0, 0, 0, 0.2);
  font-size: 25px;
  background-color: #1a73e8;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10001;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.prefix_chat-icon.hide {
  opacity: 0;
  transform: scale(0.8);
}

.prefix_chat-icon.show {
  opacity: 1;
  transform: scale(1);
}

.prefix_close-icon {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 26px;
  line-height: 24px;
  padding: 2px;
  transition: color 0.2s;
}

.prefix_close-icon:hover {
  color: #fff;
}

.prefix_fullscrin-icon {
  position: absolute;
  top: 10px;
  left: 15px;
  cursor: pointer;
  font-size: 20px;
  line-height: 24px;
  padding: 2px;
  transition: color 0.2s;
}

/* Удаляем старый стиль для placeholder */
.chat-input-content:not(:focus):empty:before {
  display: none;
}

/* Стили для полосы прокрутки */
.prefix_chat-messages::-webkit-scrollbar,
.prefix_chat-input::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.prefix_chat-messages::-webkit-scrollbar-thumb,
.prefix_chat-input::-webkit-scrollbar-thumb {
  background-color: #c4c4c4;
  border-radius: 5px;
}

.prefix_chat-messages::-webkit-scrollbar-thumb:hover,
.prefix_chat-input::-webkit-scrollbar-thumb:hover {
  background-color: #a4a4a4;
}

.prefix_chat-messages::-webkit-scrollbar-track,
.prefix_chat-input::-webkit-scrollbar-track {
  background-color: #e8e8e8;
  border-radius: 5px;
}

.prefix_chat-messages .message {
  /* Существующие стили */
}

.prefix_chat-messages .message p {
  margin: 0 0 0 0;
}

.prefix_chat-messages .message ul,
.prefix_chat-messages .message ol {
  margin: 0 0 10px 0;
  padding-left: 20px;
}

.prefix_chat-messages .message code {
  background-color: #f4f4f4;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
}

.prefix_chat-messages .message pre {
  background-color: #f4f4f4;
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
}

.prefix_chat-messages .message blockquote {
  border-left: 3px solid #ccc;
  margin: 0 0 10px 0;
  padding-left: 10px;
  color: #666;
}

.prefix_chat-messages .message a {
  color: #0366d6;
  text-decoration: none;
}

.prefix_chat-messages .message a:hover {
  text-decoration: underline;
}

.prefix_chat-messages .message img {
  max-width: 100%;
  height: auto;
}

/* Удаляем старые стили, которые скрывали скроллбар */
.prefix_chat-input .chat-input-content::-webkit-scrollbar,
.prefix_chat-input .chat-input-content::-webkit-scrollbar-thumb,
.prefix_chat-input .chat-input-content::-webkit-scrollbar-track {
  /* Удаляем display: none */
}

.prefix_auto-invite-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  padding: 0;
  line-height: 1;
  transition: all 0.2s;
  /* Создаем контрастную обводку */
  text-shadow: 
    -1px -1px 0 rgba(255, 255, 255, 0.5),
    1px -1px 0 rgba(255, 255, 255, 0.5),
    -1px 1px 0 rgba(255, 255, 255, 0.5),
    1px 1px 0 rgba(255, 255, 255, 0.5);
}

.prefix_auto-invite-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}



