#groqchat-root, #groqchat-root * {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.groqchat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #43270D, #EB9743);
  box-shadow: 0 6px 20px rgba(67, 39, 13, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999998;
  border: none;
  transition: transform 0.2s ease;
}
.groqchat-bubble:hover { transform: scale(1.08); }
.groqchat-bubble svg { width: 28px; height: 28px; fill: #fff; }

.groqchat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 360px;
  height: 520px;
  max-height: 75vh;
  background: #16121f;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
}
.groqchat-window.groqchat-open { display: flex; }

@media (max-width: 480px) {
  .groqchat-window {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
  .groqchat-bubble { bottom: 16px; right: 16px; }
}

.groqchat-header {
  background: linear-gradient(135deg, #43270D, #EB9743);
  padding: 16px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.groqchat-header-title { font-size: 15px; font-weight: 600; margin: 0; }
.groqchat-header-sub { font-size: 11px; opacity: 0.85; margin: 2px 0 0; }
.groqchat-header-actions { display: flex; gap: 10px; align-items: center; }
.groqchat-icon-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.groqchat-icon-btn:hover { background: rgba(255,255,255,0.28); }

.groqchat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #16121f;
}

.groqchat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.groqchat-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #43270D, #EB9743);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.groqchat-msg-bot {
  align-self: flex-start;
  background: #241d33;
  color: #eae6f5;
  border-bottom-left-radius: 4px;
}
.groqchat-msg-error {
  align-self: flex-start;
  background: #3a1f24;
  color: #ffb4b4;
  border-bottom-left-radius: 4px;
}

.groqchat-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: #241d33;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.groqchat-typing span {
  width: 6px;
  height: 6px;
  background: #b8aed6;
  border-radius: 50%;
  animation: groqchat-bounce 1.2s infinite ease-in-out;
}
.groqchat-typing span:nth-child(2) { animation-delay: 0.15s; }
.groqchat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes groqchat-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.groqchat-inputbar {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #1c1729;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.groqchat-input {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  background: #241d33;
  color: #fff;
  font-size: 13.5px;
  outline: none;
}
.groqchat-input::placeholder { color: #8a80a3; }
.groqchat-send {
  background: linear-gradient(135deg, #43270D, #EB9743);
  border: none;
  color: #fff;
  width: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.groqchat-send:disabled { opacity: 0.5; cursor: default; }
.groqchat-send svg { width: 18px; height: 18px; fill: #fff; }
