:root {
  --lm-blue: #003366;
  --lm-light-blue: #E6F0FF;
  --lm-text: #58636d;
  --lm-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

#lm-chat-trigger {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--lm-blue);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  z-index: 10000;
  box-shadow: var(--lm-shadow);
  transition: transform 0.3s ease;
}

#lm-chat-trigger:hover {
  transform: scale(1.1);
}

#lm-chat-prompt {
  position: fixed;
  right: 34px;
  bottom: 100px;
  background: #ffffff;
  color: var(--lm-blue);
  border: 1px solid #d6e2f1;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  z-index: 10001;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#lm-chat-prompt::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-right: 1px solid #d6e2f1;
  border-bottom: 1px solid #d6e2f1;
  transform: rotate(45deg);
}

#lm-chat-prompt.show {
  opacity: 1;
  transform: translateY(0);
}

#lm-chat-window {
  position: fixed;
  bottom: 105px;
  right: 30px;
  width: 350px;
  height: 500px;
  background: #ffffff;
  border-radius: 16px;
  display: none;
  flex-direction: column;
  z-index: 10000;
  box-shadow: var(--lm-shadow);
  font-family: 'Quicksand', 'Roboto', sans-serif;
  border: 1px solid #eaeaea;
  overflow: hidden;
}

.lm-chat-header {
  background: var(--lm-blue);
  color: white;
  padding: 18px;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lm-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background: #fdfdfd;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lm-chat-footer {
  padding: 15px;
  border-top: 1px solid #eee;
  display: flex;
  background: white;
  align-items: center;
}

.lm-chat-footer input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--lm-text);
}

.msg {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 85%;
}

.msg-bot {
  background: var(--lm-light-blue);
  color: var(--lm-blue);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.msg-user {
  background: var(--lm-blue);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.typing {
  font-style: italic;
  opacity: 0.7;
  font-size: 12px;
}

@media (max-width: 768px) {
  #lm-chat-window {
    right: 12px;
    bottom: 92px;
    width: calc(100vw - 24px);
    max-width: 380px;
    height: min(68vh, 500px);
  }

  #lm-chat-prompt {
    right: 20px;
    bottom: 88px;
  }
}

@media (max-width: 468px) {
  #lm-chat-trigger {
    right: 20px;
    bottom: 20px;
  }

  #lm-chat-window {
    right: 12px;
    bottom: 92px;
    width: calc(100vw - 24px);
    max-width: 350px;
    height: 460px;
  }

  #lm-chat-prompt {
    right: 22px;
    bottom: 88px;
  }
}
