.qama-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(135deg, #43288b, #2563eb, #0891b2);
  color: #ffffff;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 20px 55px rgba(67, 40, 139, 0.28);
}

.qama-chat-window {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 9999;
  width: min(380px, calc(100vw - 32px));
  height: 560px;
  max-height: calc(100vh - 120px);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(67, 40, 139, 0.16);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(20px);
}

.qama-chat-window.open {
  display: flex;
}

.qama-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #43288b, #2563eb, #0891b2);
  color: white;
}

.qama-chat-title {
  font-weight: 900;
  font-size: 16px;
}

.qama-chat-subtitle {
  margin-top: 3px;
  font-size: 12px;
  opacity: 0.9;
}

.qama-chat-close {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 20px;
}

.qama-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background:
    radial-gradient(circle at 10% 10%, rgba(67, 40, 139, 0.08), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(14, 165, 233, 0.1), transparent 32%),
    #f5f9ff;
}

.qama-msg {
  max-width: 88%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.qama-msg.bot {
  margin-right: auto;
  background: #ffffff;
  color: #27324a;
  border: 1px solid rgba(67, 40, 139, 0.1);
}

.qama-msg.user {
  margin-left: auto;
  background: linear-gradient(135deg, #43288b, #2563eb);
  color: white;
}

.qama-chat-form {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid rgba(67, 40, 139, 0.08);
  background: white;
}

.qama-chat-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(67, 40, 139, 0.16);
  border-radius: 9999px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
}

.qama-chat-input:focus {
  border-color: #43288b;
  box-shadow: 0 0 0 4px rgba(67, 40, 139, 0.08);
}

.qama-chat-send {
  border: none;
  border-radius: 9999px;
  background: #43288b;
  color: white;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

.qama-chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .qama-chat-launcher {
    right: 16px;
    bottom: 16px;
  }

  .qama-chat-window {
    right: 16px;
    bottom: 76px;
    height: 520px;
  }
}