#mafer-ai-widget-root {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mafer-ai-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #1a1a2e;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.mafer-ai-window {
  display: none;
  flex-direction: column;
  width: 340px;
  max-width: calc(100vw - 40px);
  height: 460px;
  max-height: calc(100vh - 100px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: absolute;
  bottom: 68px;
  right: 0;
}

.mafer-ai-window.mafer-ai-open {
  display: flex;
}

.mafer-ai-header {
  background: #1a1a2e;
  color: #fff;
  padding: 12px 16px;
  font-weight: 600;
}

.mafer-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mafer-ai-message {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.mafer-ai-message.user {
  align-self: flex-end;
  background: #1a1a2e;
  color: #fff;
}

.mafer-ai-message.assistant {
  align-self: flex-start;
  background: #f1f1f5;
  color: #1a1a2e;
}

.mafer-ai-message.system {
  align-self: center;
  background: transparent;
  color: #888;
  font-size: 12px;
}

.mafer-ai-input-row {
  display: flex;
  border-top: 1px solid #eee;
}

.mafer-ai-input-row input {
  flex: 1;
  border: none;
  padding: 12px;
  font-size: 14px;
  outline: none;
}

.mafer-ai-input-row button {
  border: none;
  background: #1a1a2e;
  color: #fff;
  padding: 0 16px;
  cursor: pointer;
}

.mafer-ai-input-row button:disabled {
  opacity: 0.5;
  cursor: default;
}
