/* Floating AI chat widget - bottom right */
.ec0-chat-widget {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  font-family: var(--font-sans, "Inter", sans-serif);
}

.ec0-chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ec0-chat-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(5, 150, 105, 0.5);
}

.ec0-chat-panel {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 2rem);
  height: 480px;
  max-height: calc(100vh - 6rem);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.ec0-chat-widget.ec0-chat-open .ec0-chat-panel {
  display: flex;
}
.ec0-chat-widget.ec0-chat-open .ec0-chat-toggle {
  display: none;
}

.ec0-chat-header {
  padding: 1rem 1rem 0.75rem;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.ec0-chat-title {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ec0-chat-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s ease;
}
.ec0-chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ec0-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #f8fafc;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.ec0-chat-msg {
  max-width: 88%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.ec0-chat-msg-user {
  align-self: flex-end;
  background: #059669;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ec0-chat-msg-bot {
  align-self: flex-start;
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.ec0-chat-msg-bot strong { color: #059669; }

.ec0-chat-input-wrap {
  padding: 0.75rem 1rem;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ec0-chat-input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.ec0-chat-input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}
.ec0-chat-send {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #059669;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.ec0-chat-send:hover {
  background: #047857;
}

@media (max-width: 480px) {
  .ec0-chat-widget { bottom: 0.75rem; right: 0.75rem; }
  .ec0-chat-panel {
    width: calc(100vw - 1.5rem);
    height: 70vh;
  }
}
