* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
}

#chat-container {
  position: fixed;
  bottom: 4vh;
  right: 2vw;
  display: flex;
  align-items: center;
  z-index: 10000;
}

#chat-bubble {
  width: 4rem;
  height: 4rem;
  background-color: rgb(253, 236, 236);
  border-radius: 50%;
  box-shadow: 0 0.375rem 0.875rem rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  animation: glow 1.5s infinite;
}

#chat-bubble:hover {
  transform: scale(1.1);
}

#chat-bubble.no-glow {
  animation: none;
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 0.5rem rgba(0, 255, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0.95rem #00af3f;
  }
}

#chat-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

#chat-text {
  font-size: 0.875rem;
  color: #fff;
  margin-right: 0.75rem;
  line-height: 1.4;
  background-color: #00af3f;
  border-radius: 1rem;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}

#chat-bubble.no-glow + #chat-text {
  opacity: 0;
  pointer-events: none;
}

#copilot-chat {
  display: none;
  position: absolute;
  bottom: 8vh;
  right: 5rem;
  width: 25vw;
  height: 40vh;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(0.75rem);
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transform-origin: bottom right;
  transition: opacity 0.3s ease, transform 0.3s ease, width 0.4s ease, height 0.4s ease;
  overflow: hidden;
  z-index: 9999;
}

#iframe-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.125rem;
  background-color: #00af3f;
  z-index: 10;
  display: flex;
  align-items: center;
  padding-left: 1rem;
}

#chatbot-name {
  font-size: 1rem;
  font-weight: bold;
  color: #ffffff;
}

#copilot-chat.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#chat-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #00af3f;
  font-size: 1.125rem;
  font-weight: bold;
}

#chat-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}

#expand-chat,
#close-chat,
#reset-chat {
  position: absolute;
  top: 0.625rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #ccc;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 10001;
}

#expand-chat {
  right: 4.875rem;
  font-size: 1.125rem;
}

#reset-chat {
  right: 2.75rem;
}

#close-chat {
  right: 0.625rem;
}

#expand-chat:hover,
#close-chat:hover,
#reset-chat:hover {
  color: #fff;
}

#copilot-chat.enlarged {
  width: 30vw;
  height: 75vh;
  border-radius: 0.75rem;
}

@media (max-width: 600px) {
  #copilot-chat{
    right: 4rem;
    width: 60vw;
    height: 40vh;
  }
  #copilot-chat.enlarged {
    width: 70vw;
    height: 75vh;
  }
}

@media (min-width:601px) and (max-width: 768px) {
  #copilot-chat{
    width: 40vw;
    height: 40vh;
  }
  #copilot-chat.enlarged {
    width: 60vw;
    height: 75vh;
  }
}

@media (min-width: 768px) and (max-width: 992px) {
  #copilot-chat{
    width: 40vw;
    height: 40vh;
  }
  #copilot-chat.enlarged {
    width: 50vw;
    height: 75vh;
  }
}

@media (min-width: 993px){
  #copilot-chat{
    width: 30vw;
    height: 40vh;
  }
  #copilot-chat.enlarged {
    width: 40vw;
    height: 75vh;
  }
}