/* EcomHutsy AI Support — professional widget */
.eh-ai-root {
  --eh-ai-blue: #095cff;
  --eh-ai-blue-deep: #0639a8;
  --eh-ai-ink: #0b1220;
  --eh-ai-muted: #5a6a86;
  --eh-ai-bg: #ffffff;
  --eh-ai-panel: #f3f6fb;
  --eh-ai-line: rgba(9, 92, 255, 0.14);
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99990;
  font-family: "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--eh-ai-ink);
}
.eh-ai-root *,
.eh-ai-root *::before,
.eh-ai-root *::after {
  box-sizing: border-box;
}

.eh-ai-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: linear-gradient(145deg, #2f7bff 0%, #095cff 45%, #0536b8 100%);
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 0 0 6px rgba(9, 92, 255, 0.22),
    0 0 28px rgba(77, 141, 255, 0.55),
    0 18px 40px rgba(8, 24, 70, 0.45);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
  animation: eh-ai-pulse 2.4s ease-in-out infinite;
}
.eh-ai-fab:hover {
  filter: brightness(1.08);
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 0 0 8px rgba(9, 92, 255, 0.28),
    0 0 36px rgba(120, 180, 255, 0.7),
    0 20px 44px rgba(8, 24, 70, 0.5);
  animation: none;
}
@keyframes eh-ai-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 6px rgba(9, 92, 255, 0.22),
      0 0 28px rgba(77, 141, 255, 0.55),
      0 18px 40px rgba(8, 24, 70, 0.45);
  }
  50% {
    box-shadow:
      0 0 0 12px rgba(9, 92, 255, 0.12),
      0 0 40px rgba(120, 180, 255, 0.75),
      0 18px 40px rgba(8, 24, 70, 0.45);
  }
}
.eh-ai-fab__icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  flex-shrink: 0;
}
.eh-ai-fab__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.eh-ai-fab__label {
  display: none !important;
}

.eh-ai-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: min(400px, calc(100vw - 28px));
  height: min(580px, calc(100vh - 110px));
  display: none;
  flex-direction: column;
  background: var(--eh-ai-bg);
  border: 1px solid rgba(15, 35, 90, 0.12);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(8, 20, 55, 0.28);
}
.eh-ai-root.is-open .eh-ai-panel {
  display: flex;
  animation: eh-ai-rise 0.22s ease;
}
@keyframes eh-ai-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.eh-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(9, 92, 255, 0.35), transparent 55%),
    linear-gradient(135deg, #0b1220 0%, #132047 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.eh-ai-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.eh-ai-brand__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}
.eh-ai-brand__text {
  min-width: 0;
}
.eh-ai-brand__text strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
}
.eh-ai-brand__text span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #a9c0ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eh-ai-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.eh-ai-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.eh-ai-body {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  background: var(--eh-ai-panel);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.eh-ai-msg {
  max-width: 92%;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.eh-ai-msg a {
  color: var(--eh-ai-blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.eh-ai-msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--eh-ai-line);
  color: var(--eh-ai-ink);
  box-shadow: 0 6px 18px rgba(15, 35, 90, 0.05);
}
.eh-ai-msg--user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--eh-ai-blue), var(--eh-ai-blue-deep));
  color: #fff;
}
.eh-ai-msg--typing {
  color: var(--eh-ai-muted);
  font-style: italic;
}

.eh-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.65rem;
  background: var(--eh-ai-panel);
}
.eh-ai-chip {
  border: 1px solid rgba(9, 92, 255, 0.22);
  background: #fff;
  color: var(--eh-ai-blue-deep);
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.eh-ai-chip:hover {
  background: #eef4ff;
  border-color: rgba(9, 92, 255, 0.4);
}

.eh-ai-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem;
  border-top: 1px solid rgba(15, 35, 90, 0.08);
  background: #fff;
}
.eh-ai-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(15, 35, 90, 0.14);
  border-radius: 12px;
  padding: 0 0.85rem;
  font: inherit;
  font-size: 14px;
  outline: none;
  background: #fafbfd;
}
.eh-ai-form input:focus {
  border-color: var(--eh-ai-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(9, 92, 255, 0.12);
}
.eh-ai-form button {
  min-height: 44px;
  padding: 0 1rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--eh-ai-blue), var(--eh-ai-blue-deep));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.eh-ai-form button:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 520px) {
  .eh-ai-root {
    right: 12px;
    bottom: 12px;
  }
  .eh-ai-fab {
    width: 60px;
    height: 60px;
  }
  .eh-ai-fab__icon {
    width: 32px;
    height: 32px;
  }
  .eh-ai-fab__icon svg {
    width: 20px;
    height: 20px;
  }
}
