* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

.logo-svg {
  width: 70px;
  height: 70px;
}

.page {
  width: 100vw;
  height: 100vh;
  background-color: #1e90ff;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #888;
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body::-webkit-scrollbar,
.history-items-container::-webkit-scrollbar,
.messages-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  padding-left: 10px;
}

body::-webkit-scrollbar-button,
.history-items-container::-webkit-scrollbar-button,
.messages-container::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body::-webkit-scrollbar-corner,
.history-items-container::-webkit-scrollbar-corner,
.messages-container::-webkit-scrollbar-corner {
  background-color: transparent;
}

* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.history-items-container:hover,
.messages-container:hover {
  scrollbar-color: #888 #f1f1f1;
}

.history-items-container:hover::-webkit-scrollbar-thumb,
.messages-container:hover::-webkit-scrollbar-thumb {
  background-color: #888;
}

.history-items-container:hover::-webkit-scrollbar-track,
.messages-container:hover::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

.open-modal-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px;
  font-size: 16px;
  background-color: transparent;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  z-index: 999;
}

.logo-svg {
  width: 200px;
  height: 200px;
  transition: all 0.3s ease;
}

.logo-tooltip {
  position: absolute;
  right: 40px;
  bottom: 195px;
  background: rgba(0, 0, 0, 0.2);
  width: 200px;
  height: auto;
  min-height: 50px;
  max-height: 400px;
  border: 1px solid rgb(0, 0, 0);
  color: black;
  padding: 10px 10px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 16px;
  opacity: 0;
  transform: translateX(-100px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.typed-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: center;
  width: 100%;
  margin: auto 0;
}

.cursor {
  display: block;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.open-modal-btn:hover .logo-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.open-modal-btn:hover .logo-svg {
  transform: scale(1.05);
}

@media (max-width: 600px) {
  .logo-tooltip {
    position: absolute;
    right: 10px;
    bottom: 95px;
    background: rgba(0, 0, 0, 0.2);
    width: 90px;
    height: auto;
    min-height: 20px;
    max-height: 400px;
    border: 1px solid rgb(0, 0, 0);
    color: black;
    padding: 10px 10px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 10px;
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .typed-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: center;
    width: 100%;
    margin: auto 0;
  }

  .logo-svg {
    width: 90px;
    height: 90px;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 872px;
  height: 385px;
  background-color: white;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: height 0.3s ease;
  min-height: 420px;
  max-height: 680px;
}

.modal.expanded {
  height: 450px;
}

.close-modal-btn {
  position: absolute;
  width: 27px;
  height: 27px;
  top: 15px;
  right: 25px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.telegram {
  width: 20px;
  height: 20px;
}

.initial-view {
  padding: 30px 1px 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
}

.initial-view.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.header-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 25px;
}

.header-container .logo {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
}

.title {
  font-weight: 700;
  font-size: 32px;
  line-height: 100%;
  color: #000;
}

.greeting-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 0 25px;
}

.greeting-text {
  font-weight: 400;
  font-size: 18px;
  line-height: 100%;
  color: rgba(102, 102, 102, 1);
}

.details-btn {
  padding: 8px 16px;
  background-color: transparent;
  border: 1px solid rgba(42, 69, 121, 1);
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  color: rgba(42, 69, 121, 1);
  cursor: pointer;
  transition: all 0.3s;
  width: 110px;
  height: 39px;
  margin-left: auto;
}

.details-btn:hover {
  background-color: #f0f0f0;
}

.chat-container {
  position: relative;
  width: calc(100% - 50px);
  margin: 15px 25px 0;
  background: white;
  border-radius: 15px;
  border: 1px solid rgba(180, 180, 180, 1);
  min-height: 125px;
  overflow: hidden;
}

.chat-input {
  width: 100%;
  min-height: 60px;
  max-height: 180px;
  border-radius: 15px 15px 0 0;
  border: none;
  border-bottom: none;
  outline: none;
  padding: 20px;
  font-size: 16px;
  line-height: 1.5;
  resize: none;
  overflow-y: auto;
  background: transparent;
}

.chat-input::placeholder {
  color: #999;
}

.chat-button-row {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: white;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  gap: 15px;
}

.circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.internet-btn,
.paperclip-btn {
  background-color: white;
  border: 1px solid rgba(42, 69, 121, 1);
}

.send-btn {
  background-color: rgba(42, 69, 121, 1);
  border: none;
  margin-left: auto;
}

.circle-btn img {
  width: 16px;
  height: 16px;
}

.dialog-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 20px 25px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.1s ease;
  pointer-events: none;
}

.dialog-view.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.back-header {
  margin-bottom: 15px;
  padding: 0 0px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.back-btn span {
  font-weight: 400;
  font-size: 15px;
  line-height: 18px;
  color: #000;
}

.back-arrow {
  width: 16px;
  height: 16px;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 0px;
  margin-bottom: 15px;
}

.message {
  margin-bottom: 20px;
  animation: fadeIn 0.5s ease;
}

.user-message {
  font-weight: 500;
  font-size: 16px;
  line-height: 100%;
  color: #000;
  margin-left: 400px;
  margin-right: 10px;
  max-width: 80%;
  padding: 15px;
  border-radius: 8px;
  background-color: #e2f1fc;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.bot-response {
  font-weight: 400;
  font-size: 15px;
  line-height: 30px;
  color: #000;
  margin-right: 10px;
  margin-left: 0px;
  padding: 15px;
  border-radius: 8px;
  background-color: #f5f5f5;
  font-family: "Roboto", sans-serif;
  word-wrap: break-word;
  white-space: pre-wrap;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.feedback-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 20px;
  padding: 0 0px;
}

.feedback-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: none;
  border: none;
  border-radius: 20px;
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
  color: black;
}

.feedback-btn img {
  width: 16px;
  height: 16px;
}

.feedback-btn:hover {
  background-color: #f0f0f0;
}

.suggested-questions {
  margin-top: 15px;
  padding: 0 25px;
}

.question-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 5px;
}

.question-row:last-child {
  margin-bottom: 0;
}

.question-btn {
  height: 34px;
  background: white;
  border: 1px solid rgba(42, 69, 121, 1);
  border-radius: 17px;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  color: rgba(42, 69, 121, 1);
  cursor: pointer;
  transition: all 0.3s;
  padding: 0 12px;
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.question-btn img {
  max-width: 18px;
}

.question-btn:hover {
  background-color: #f0f0f0;
}

.additional-input-container {
  position: relative;
  width: calc(100%);
  margin: 0 0px 0px 0;
  background: white;
  border-radius: 15px;
  border: 1px solid rgba(180, 180, 180, 1);
  min-height: 65px;
  overflow: hidden;
  padding-right: 0px;
}

.additional-chat-input {
  width: 100%;
  min-height: 45px;
  max-height: 135px;
  border: none;
  outline: none;
  padding: 15px 20px;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  overflow-y: auto;
  background: transparent;
  border-radius: 15px;
  padding-right: 60px;
}

.additional-chat-input::placeholder {
  color: #999;
}

.additional-send-btn {
  position: absolute;
  right: 15px;
  bottom: 30px;
  background-color: rgba(42, 69, 121, 1);
  border: none;
  width: 31px;
  height: 31px;
  z-index: 2;
}

.additional-send-btn img {
  width: 16px;
  height: 16px;
}

.history-container {
  margin-top: 20px;
  width: calc(100% - 5px);
  display: none;
  flex-direction: column;
  padding: 0 25px 20px;
}

.history-container.visible {
  display: flex;
}

.history-title {
  font-weight: 700;
  font-size: 19px;
  color: #000;
  margin-bottom: 10px;
  font-family: "Roboto", sans-serif;
}

.history-items-container {
  max-height: 150px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #ebebeb;
  cursor: pointer;
  min-height: 50px;
  margin-right: 5px;
}

.history-item:hover {
  background-color: rgba(218, 218, 218, 0.5);
  border-radius: 10px;
}

.history-item-content {
  display: flex;
  align-items: center;
  flex-grow: 1;
  height: 100%;
}

.history-item-text {
  font-size: 15px;
  color: rgba(0, 0, 0, 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
  font-family: "Roboto", sans-serif;
  display: flex;
  align-items: center;
  height: 100%;
  padding-left: 10px;
  font-weight: 400;
}

.history-item-delete {
  width: 13px;
  height: 13px;
  cursor: pointer;
  margin-right: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.history-item:hover .history-item-delete {
  opacity: 1;
}

.modal {
  transition: height 0.2s ease, transform 0.1s ease;
}

.initial-view {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dialog-view {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 600px) {
  .modal {
    width: 310px !important;
    min-height: 420px !important;
    max-height: 80vh !important;
    overflow-y: auto;
  }

  .question-btn img {
    max-width: 12px;
  }

  .modal-overlay {
    padding: 0px;
  }

  .header-container {
    padding: 0 10px;
    margin-top: 0px;
  }

  .logo {
    width: 23px;
    height: 23px;
  }

  .title {
    font-size: 20px;
    color: #393939;
  }

  .close-modal-btn {
    top: 10px;
    right: 10px;
  }

  .greeting-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 10px;
    margin-top: 0px;
  }

  .greeting-text {
    font-size: 11px;
    color: #666;
    margin-bottom: 10px;
  }

  .details-btn {
    width: 68px;
    height: 20px;
    font-size: 7px;
    color: #2a4579;
    font-weight: 700;
    margin-left: 0;
    line-height: 3px;
  }

  .chat-container {
    width: calc(100% - 20px);
    margin: 10px 10px 0;
    min-height: 75px;
  }

  .chat-input {
    min-height: 75px;
    font-size: 9px;
    padding: 10px;
  }

  .chat-input::placeholder {
    font-size: 9px;
    color: #666;
  }

  .chat-button-row {
    height: 40px;
    padding: 0 10px;
    gap: 10px;
  }

  .circle-btn {
    width: 23px;
    height: 23px;
  }

  .circle-btn img {
    width: 12px;
    height: 12px;
  }

  .suggested-questions {
    display: flex;
    flex-direction: column;
    padding: 10px;
    margin-top: 10px;
  }

  .question-row {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
  }

  .question-btn {
    font-size: 8px;
    padding: 0 5px;
    height: 20px;
  }

  .history-container {
    padding: 0 10px 10px;
    margin-top: 10px;
    /* overflow-y: auto; */
  }

  .history-title {
    font-size: 16px;
    color: #393939;
    margin-bottom: 10px;
  }

  .history-item {
    min-height: 30px;
    padding: 5px 0;
  }

  .history-item-text {
    font-size: 9px;
  }

  .history-item-delete {
    width: 8px;
    height: 8px;
  }

  .back-btn {
    padding: 5px;
    gap: 6px;
    margin-top: 0px;
    margin-left: 0px;
  }

  .back-arrow {
    width: 12px;
    height: 12px;
  }

  .back-btn span {
    font-size: 10px;
    line-height: 18px;
  }

  .user-message {
    font-size: 11px;
    max-width: 100%;
    padding: 10px;
    margin-left: 110px;
    margin-right: 0px;
  }

  .bot-response {
    line-height: 16px;
    font-size: 11px;
    max-width: 100%;
    padding: 10px;
    margin-left: 0px;
    margin-right: 0px;
  }

  .feedback-buttons {
    gap: 5px;
    margin-top: 5px;
    margin-bottom: 10px;
  }

  .feedback-btn {
    width: 127px;
    height: 37px;
    font-size: 13px;
    gap: 5px;
    white-space: nowrap;
  }

  .feedback-btn img {
    width: 17px;
    height: 17px;
  }

  .additional-input-container {
    width: calc(100%px);
    margin: 20px 10px 0px;
    height: 38px;
    min-height: 38px;
    margin-left: 0px;
    border-radius: 20px;
    display: flex;
    align-items: center;
  }

  .additional-chat-input {
    height: 27px;
    min-height: 27px;
    font-size: 13px;
    border-radius: 50px;
    padding: 11px 15px;
    margin-bottom: 15px;
  }

  .additional-send-btn {
    width: 23px;
    height: 23px;
    right: 15px;
    bottom: 7px;
  }

  .additional-send-btn img {
    width: 15px;
    height: 15px;
  }

  .suggested-questions.desktop {
    display: none;
  }

  .suggested-questions.mobile {
    display: flex;
  }
}

.mobile-questions {
  display: none;
}

@media (max-width: 600px) {
  .mobile-questions {
    display: block;
    margin-top: 10px;
    padding: 0 10px;
  }

  .mobile-questions .question-btn {
    font-size: 8px;
    padding: 0 8px;
    height: 20px;
    width: auto;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-grow: 0;
    margin-right: 2px;
  }

  .mobile-questions .question-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px;
    justify-content: flex-start;
  }
}

.chat-input {
  transition: min-height 0.3s ease;
  font-family: "Roboto", sans-serif;
}

.modal {
  transition: height 0.3s ease;
}

@media (max-width: 600px) {
  .chat-container {
    min-height: 75px;
    transition: min-height 0.3s ease;
  }

  .chat-input {
    min-height: calc(75px - 20px);
    line-height: 1.3;
    font-size: 10px;
    padding: 10px;
    box-sizing: border-box;
    transition: min-height 0.3s ease;
  }
}
