@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

@media (max-width: 600px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  #botko-interface-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
  }

  #botko-header-name {
    font-size: 16px;
  }

  #botko-input {
    font-size: 16px !important;
  }

  #botko-interface {
    border-radius: 0 0 0 0 !important;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }

  #botko-header-actions-wrapper {
    gap: 0.5rem !important;
    padding: 5px !important;
  }

  #botko-interface-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px !important;
    flex: 0 0 auto;
  }

  #botko-interface-chat {
    flex: 1 1 auto;
    overflow-y: auto;
    background-color: white;
  }

  #botko-interface-input {
    display: flex;
    align-items: center;
    padding: 0 !important;
    flex: 0 0 auto;
  }

  #botko-header-icon {
    width: 55px;
    height: 55px;
  }

  #botko-call-support-icon-container {
    width: 25px;
    height: 25px;
  }

  #botko-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #botko-placeholder:hover {
    transform: scale(1.1);
    transition: transform 0.15s ease-in-out;
  }

  #botko-send-message,
  #botko-received-message {
    word-wrap: break-word;
    border-radius: 15px;
    font-size: 14px;
    max-width: 80%;
  }

  #botko-send-message {
    color: #fff;
    align-self: flex-end;
    padding: 10px;
    margin: 5px;
  }

  #botko-received-message {
    background-color: #e9ecef;
    align-self: flex-start;
    padding: 10px;
    margin: 5px;
  }

  #botko-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
  }

  .botko-suggestion {
    padding: 12px;
    border-radius: 15px;
    background-color: #f1f3f5;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    flex: 1 1 calc(50% - 20px);
  }

  .botko-suggestion:hover {
    background-color: #e9ecef;
  }

  #typing-dots {
    min-height: 40px;
    margin: 10px;
    display: flex;
    align-items: center;
  }

  #dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 4px;
    animation: typingDots 1.5s infinite ease-in-out;
  }

  @keyframes typingDots {
    0%,
    60%,
    100% {
      opacity: 0.2;
    }
    30% {
      opacity: 1;
    }
  }
}

@media screen and (min-width: 601px) and (max-width: 1024px) {
  /* Styles for screens up to 600 pixels wide go here */

  #botko-interface-wrapper {
    position: fixed !important;
    bottom: 135px !important;
    right: 20px !important;
    left: auto !important;
    height: 70%;
    width: 25%;
    font-family: "Open Sans", sans-serif;
    z-index: 9999;
    min-width: 300px !important;
  }

  #botko-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 100%;
    cursor: pointer;

    &:hover {
      transform: scale(1.1);
      transition: all 0.15s ease-in 0.15s;
    }
  }
}

@media screen and (min-width: 1024px) and (max-width: 1400px) {
  /* Styles for screens up to 600 pixels wide go here */

  #botko-interface-wrapper {
    position: fixed !important;
    bottom: 135px !important;
    right: 20px !important;
    left: auto !important;
    height: 65%;
    width: 23%;
    font-family: "Open Sans", sans-serif;
    z-index: 9999;
    min-width: 235px !important;
    font-size: 13px;
  }

  #botko-interface-header {
    padding: 7px !important;
  }


  #botko-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 100%;
    cursor: pointer;

    &:hover {
      transform: scale(1.1);
      transition: all 0.15s ease-in 0.15s;
    }
  }

  #botko-interface-footer {
    font-size: 10px !important;
  }

  #botko-header-name {
    font-size: 14px !important;
  }
}

@media screen and (min-width: 1400px) and (max-width: 1600px) {
  /* Styles for screens up to 600 pixels wide go here */

  #botko-interface-wrapper {
    position: fixed !important;
    bottom: 135px !important;
    right: 20px !important;
    left: auto !important;
    height: 65%;
    width: 24%;
    font-family: "Open Sans", sans-serif;
    z-index: 9999;
    min-width: 270px !important;
    font-size: 13px !important;
  }

  #botko-placeholder {
    width: 75px;
    height: 75px;
    border-radius: 100%;
    cursor: pointer;

    &:hover {
      transform: scale(1.1);
      transition: all 0.15s ease-in 0.15s;
    }
  }

  #botko-interface-footer {
    font-size: 13px !important;
  }

  #botko-header-name {
    font-size: 16px;
  }
}

@media screen and (min-width: 1600px) {
  /* Styles for screens up to 600 pixels wide go here */

  #botko-interface-wrapper {
    position: fixed !important;
    bottom: 135px !important;
    right: 20px !important;
    left: auto !important;
    height: 65%;
    width: 21%;
    font-family: "Open Sans", sans-serif;
    z-index: 9999;
    min-width: 300px !important;
    user-select: none;
    font-size: 14px;
  }

  #botko-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 100%;
    cursor: pointer;

    &:hover {
      transform: scale(1.1);
      transition: all 0.15s ease-in 0.15s;
    }
  }
}

#botko-header-name {
  font-size: 16px;
}

#botko-wrapper {
  position: fixed !important;
  bottom: 25px !important;
  right: 30px !important;
  left: auto !important;
  transition: transform 0.3s ease-in-out;
  z-index: 9999;
}

#botko-interface-wrapper.active {
  animation: bubble 0.15s ease-in-out;
}

#botko-interface-wrapper.inactive {
  animation: bubble-reverse 0.15s ease-in-out;
}

#botko-placeholder:active {
  transform: scale(0.9);
  transition: transform 0.15s ease-in-out;
}

#botko-interface {
  background-color: white;
  height: 100%;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

#botko-placeholder-logo {
  object-fit: contain;
  width: 70%;
}

#botko-interface-header {
  background-color: white;
  height: 10%;
  border-radius: 20px 20px 0 0;
  display: flex;
  border-bottom: 2px solid #f7f7f7;
  justify-content: space-between;
}

#logo-placeholder {
  position: absolute;
  top: 0;
  transition: transform 0.16s linear 0s, opacity 0.08s linear 0s;
  opacity: 1;
  transform: rotate(0deg) scale(1);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

#logo-placeholder.hidden {
  transition: transform 0.16s linear 0s, opacity 0.08s linear 0s;
  opacity: 0;
  transform: rotate(30deg) scale(0);
}

#minimize-placeholder {
  opacity: 1;
  display: flex;
  transform: rotate(0deg);
  transition: transform 0.16s linear 0s, opacity 0.08s linear 0s;
  height: 100%;
  align-items: center;
  justify-content: center;
}

#minimize-placeholder.hidden {
  transition: transform 0.16s linear 0s, opacity 0.08s linear 0s;
  opacity: 0;
  transform: rotate(-60deg);
}

.action-icon {
  align-self: center;
  height: 75%;
  aspect-ratio: 1/1;
  border-radius: 5px;

  &:hover {
    cursor: pointer;
    background-color: #f7f7f7;
  }
}

#botko-header-info-wrapper {
  display: flex;
}

#botko-header-actions-wrapper {
  display: flex;
  flex-direction: row-reverse;
  gap: 0.2rem;
  justify-content: flex-start;
  padding: 10px;
}

#botko-header-status-container {
  display: flex;
}

#botko-header-status-icon {
  width: 5px;
  height: 5px;
  background-color: darkgreen;
  border-radius: 50%;
  align-self: center;
  margin: 2px;
  font-family: "Open Sans", sans-serif;
}

#botko-header-name-container {
  display: flex;
  align-self: center;
  flex-direction: column;
}

#botko-header-name-container p {
  margin: 0px;
  color: #221853;
}

#botko-interface-chat {
  box-sizing: border-box;
  padding: 2% 0%;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.8rem;
  width: 100%;
  height: 77%;
  overflow-y: auto;
}

#botko-interface-chat::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

#botko-interface-chat::-webkit-scrollbar-thumb {
  background-color: gray;
  border-radius: 7px;
  border: 3px solid white;
}

#botko-interface-chat::-webkit-scrollbar-thumb:hover {
  background-color: gray;
}

#botko-interface-input {
  position: relative;
  width: 100%;
  height: 8%;
  border-top: 2px solid #f7f7f7;
  background-color: white;
  display: flex;
}

#botko-interface-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-color: white;
  height: 5%;
  border-radius: 0 0 20px 20px;
  border-top: 2px solid #f7f7f7;
  color: grey;
  font-size: 14px;
}

#botko-input {
  width: 100%;
  height: 100%;
  padding: 4% 12% 4% 4%;
  background-color: #fff0;
  overflow-y: hidden;
  border: 0px;
  resize: none;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
  color: #221853;
  outline: none;
  box-shadow: none;
  font-size: 14px;
}

#botko-suggestions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-left: 7%;
  padding-right: 7%;
  align-items: stretch;
}

.botko-suggestion {
  padding: 4%;
  border-radius: 15px;
  max-width: 100%;
  word-wrap: break-word;
  margin: 0;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  &:hover {
    transform: scale(1.05);
  }
}

#botko-suggestions > .botko-suggestion:nth-child(odd):last-child {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 50%;
}

#botko-send-message {
  color: white;
  padding: 3%;
  border-radius: 15px 0px 15px 15px;
  align-self: flex-end;
  max-width: 70%;
  word-wrap: break-word;
  margin-right: 7%;
  margin-top: 1%;
  margin-bottom: 2%;
  animation: message 0.15s ease-in;
}

#botko-send-icon {
  width: 8%;
  position: absolute;
  right: 2%;
  top: 20%;
  flex: 1;
}

#botko-received-message {
  background-color: #f2f2f2;
  color: #221853;
  padding: 4%;
  border-radius: 0px 15px 15px 15px;
  align-self: flex-start;
  max-width: 90%;
  word-wrap: break-word;
}

#botko-received-message-container {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-left: 4%;
}

#botko-message-icon {
  width: 12%;
}

#botko-header-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  aspect-ratio: 1/1;
  border-radius: 20%;
  align-self: center;
}

#botko-feedback-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

#botko-feedback-mark {
  width: 30px;
  height: 30px;
  border-radius: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  &:hover {
    transform: scale(1.1);
  }
}

#botko-typing-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 12%;
}

#typing-dots {
  overflow: hidden;
  font-size: 24px;
  display: flex;
  margin-bottom: 4%;
  min-height: 40px;
}

#dot {
  animation: typingDots 2s infinite;
  align-self: center;
  margin-left: 4px;
  width: 5px;
  height: 5px;
  background-color: black;
  border-radius: 50%;
}

@keyframes typingDots {
  0% {
    opacity: 0.1;
  }

  25% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  75% {
    opacity: 0.5;
  }

  100% {
    opacity: 0.1;
  }
}

@keyframes message {
  0% {
    opacity: 0;
    transform: translateY(3rem);
  }

  100% {
    opacity: 1;
    transform: translateY(0rem);
  }
}

@keyframes bubble {
  0% {
    transform: translateY(85px);
    height: 65px;
    width: 65px;
    z-index: -1;
    border-radius: 100%;
    overflow-y: hidden;
    opacity: 0;
  }

  25% {
    transform: translateY(0);
    overflow-y: hidden;
    opacity: 0.1;
  }

  100% {
    height: 65%;
    width: 20%;
    border-radius: 0;
    overflow-y: hidden;
    opacity: 0.5;
  }
}

@keyframes bubble-reverse {
  0% {
    height: 65%;
    width: 20%;
    border-radius: 0;
    opacity: 0.5;
    overflow-y: hidden;
  }

  25% {
    transform: translateY(0);
    opacity: 0.1;
    overflow-y: hidden;
  }

  100% {
    transform: translateY(85px);
    height: 65px;
    width: 65px;
    z-index: -1;
    border-radius: 100;
    opacity: 0;
    overflow-y: hidden;
  }
}
