/* Ermes Dance chat widget — minimal monochrome */

.ermes-chat-root,
.ermes-chat-root * {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

.ermes-chat-bubble {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 2147483646;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ermes-chat-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}
.ermes-chat-bubble svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ermes-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  width: 380px;
  height: 560px;
  max-height: calc(100vh - 100px);
  background: #fff;
  color: #111;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2147483647;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.ermes-chat-panel.hidden {
  display: none;
}

.ermes-chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
}
.ermes-chat-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ermes-chat-header-sub {
  font-size: 11px;
  color: #777;
  margin-top: 2px;
}
.ermes-chat-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #555;
  padding: 4px;
  border-radius: 6px;
  line-height: 0;
}
.ermes-chat-close:hover {
  background: #eee;
}

.ermes-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}

.ermes-chat-msg {
  max-width: 85%;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  border-radius: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.ermes-chat-msg.user {
  align-self: flex-end;
  background: #111;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ermes-chat-msg.assistant {
  align-self: flex-start;
  background: #f3f3f3;
  color: #111;
  border-bottom-left-radius: 4px;
}
.ermes-chat-msg.assistant.streaming::after {
  content: "▍";
  margin-left: 2px;
  animation: ermes-blink 0.9s steps(2) infinite;
}
@keyframes ermes-blink {
  50% {
    opacity: 0;
  }
}

.ermes-chat-msg a {
  color: inherit;
  text-decoration: underline;
}

.ermes-chat-tool {
  align-self: flex-start;
  font-size: 11px;
  color: #888;
  font-style: italic;
  padding: 0 4px;
}

.ermes-chat-input-wrap {
  border-top: 1px solid #f0f0f0;
  padding: 10px 12px 12px;
  background: #fafafa;
}
.ermes-chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.ermes-chat-input {
  flex: 1;
  resize: none;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e1e1e1;
  background: #fff;
  color: #111;
  font-family: inherit;
  max-height: 120px;
  outline: none;
}
.ermes-chat-input:focus {
  border-color: #999;
}
.ermes-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ermes-chat-send:disabled {
  background: #aaa;
  cursor: not-allowed;
}
.ermes-chat-send svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ermes-chat-footer {
  font-size: 10px;
  color: #999;
  text-align: center;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .ermes-chat-panel {
    right: 8px;
    left: 8px;
    bottom: 80px;
    width: auto;
    height: 80vh;
    border-radius: 14px;
  }
  .ermes-chat-bubble {
    right: 14px;
    bottom: 14px;
  }
}
