:root {
  --border-radius: 5px;
  --font-size: 16px;
}

body.fullscreen-chat {overflow: hidden;}
.fullscreen-chat *:not(#chat-toggle .button-round):not(#chat-close):not(#chat-container):not(#chat-container *) {
  height: 0;
  overflow: hidden;
}

#chat-header {
  position: absolute;
  width: calc(100% - 80px);
  height: 66px;
  cursor: grab;
}

.fullscreen-chat #chat-container, .fullscreen-chat #chat-container iframe {border-radius: 0px;}

#chat-toggle{
  display: none;
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 999;
}

#chat-toggle .button-round {
  width: 70px;
  height: 70px;
  border: none;
  border-radius: 50%;
  background-color: #2799ca;
  color: white;
  font-size: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
  z-index: 9;
}



#chat-toggle .button-round:hover {
  background-color: #1b7faa;
}

#chat-toggle .button-round svg {
  width: 40px;
  height: 40px;
}


     
#chat-close {
  position: absolute;
  top: 10px;
  right: 15px;
  padding: 0;
  background-color: transparent;
  border: none;
  color: #fff;
  font-size: 27px;
  line-height: 30px;
  cursor: pointer;
  transition: transform 0.3s;
}

#chat-close:hover {
  color: #eee;
  transform: scale(1.2);
}  



#chat-container {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  visibility: hidden;
  position: fixed;
  bottom: 130px;
  right: 40px;
  width: 320px;
  height: 500px;
  border: 0px solid #ccc;
  border-radius: var(--border-radius);
  background-color: white;
  box-shadow: 0px 0px 15px 9px #ccc;
  z-index: 1000;
  transition: opacity 0.5s;
  opacity: 0;
}


.fullscreen-chat #chat-container {
  height: 100dvh; 
  width: 100%; 
  right: 0;
  top:0;
  box-shadow: none;
}

#aiboto-iframe {
  height: 100%;
}

#chat-container iframe {
  width: 100%;
  height: 100%;
  border: 0px solid #ccc;
  border-radius: var(--border-radius);
}


.visible-chat #chat-container {
  opacity: 1;
}


#chat-toggle .counter {
  position: absolute;
  top: -5px;
  left: -10px;
  background: #d52222;
  font-size: 16px;
  font-weight: bold;
  width: 25px;
  height: 25px;
  border-radius: 100%;
  line-height: 20px;
  align-content: center;
  text-align: center;
  border: 3px solid #fff;
  z-index: 2;
  color: #fff;
}



@media (max-width: 480px) { 

  #chat-toggle .button-round {
    width: 60px;
    height: 60px;
  }

  #chat-toggle .button-round svg {
    width: 30px;
    height: 30px;
  }

}



#chat-toggle .button-pramoi {
  background: #2799ca;
  transition: 0.3s ease;
  color: #fff;
  border: none;
  padding: 15px 25px 15px 20px;
  font-size: 16px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.button-pramoi .text {
  z-index: 2;
  line-height: 20px;
  font-size: 16px;
  padding-right: 20px;
}

#chat-toggle .button-pramoi::after {
  background: linear-gradient(90deg, #fff0, #717171);
  content: '';
  width: 100%;
  position: absolute;
  height: 100%;
  left: 0;
  bottom: 0;
}

#chat-toggle .button-pramoi::before {
  content: '';
  width: 15px;
  height: 15px;
  background: #4db344;
  border-radius: 100%;
  position: absolute;
  right: 15px;
  z-index: 2;
  top: 18px;
}


#chat-toggle.mobile-chat {bottom: 20px; right: 20px;}
#chat-toggle.mobile-chat .button-pramoi {display: none;}
#chat-toggle.mobile-chat .button-round {display: flex;}

#notificationBox {
  position: fixed;
  background: #fff;
  width: 180px;
  bottom: 20px;
  left: 20px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  padding: 10px 40px 10px 10px;
  z-index: 22;
}

#closeBtn {
  position: absolute;
  top: 5px;
  right: 10px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
}

/* Анимация вращения. Удалить если не нужно */

#chat-toggle .button-round::before,
#chat-toggle .button-round::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border-width: 2px;
  border-radius: 50%;
  border-style: solid;
  border-color: #ccc;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
  animation: rotate 8s linear infinite;
  z-index: 1;
  opacity: 0.2; 
}

#chat-toggle .button-round::before {
  animation-delay: 0s;
}

#chat-toggle .button-round::after {
  animation-delay: 4s;
}

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

