/* DEMOE: scoped public chat UI; green matches the website brand palette. */
#demoe-root {
  font-family: Inter, sans-serif;
  color: #1e293b;
}
#demoe-root * {
  box-sizing: border-box;
}
.demoe-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 2px solid #bbf7d0;
  border-radius: 50%;
  background: #15803d;
  color: white;
  cursor: pointer;
  box-shadow: 0 10px 28px #14532d55;
  font-size: 28px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.demoe-launcher img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}
.demoe-launcher:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px #14532d77;
}
.demoe-launcher:focus-visible,
.demoe-panel :focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}
.demoe-panel {
  position: fixed;
  bottom: 94px;
  right: 20px;
  z-index: 900;
  width: min(390px, calc(100vw - 24px));
  height: min(570px, calc(100dvh - 112px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #bbf7d0;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 22px 50px #0f172a38;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}
.demoe-panel.demoe-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}
.demoe-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #166534;
  color: white;
}
.demoe-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 12px;
  background: #ffffff25;
}
.demoe-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.demoe-title {
  flex: 1;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.25;
}
.demoe-title small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #dcfce7;
}
.demoe-close {
  border: 0;
  background: transparent;
  color: white;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 7px;
}
.demoe-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  background: #f8fafc;
  overscroll-behavior: contain;
}
.demoe-message {
  max-width: 90%;
  width: fit-content;
  margin-bottom: 12px;
  padding: 10px 13px;
  border-radius: 14px 14px 14px 4px;
  background: white;
  border: 1px solid #e2e8f0;
  color: #334155;
  line-height: 1.5;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.demoe-message.demoe-user {
  margin-left: auto;
  background: #15803d;
  border-color: #15803d;
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}
.demoe-message.demoe-typing {
  color: #166534;
  background: #f0fdf4;
}
.demoe-faqs {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 8px 0 14px;
}
.demoe-faqs button {
  text-align: left;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 9px 11px;
  background: #f0fdf4;
  color: #166534;
  font:
    600 12px/1.3 Inter,
    sans-serif;
  cursor: pointer;
}
.demoe-faqs button:hover {
  background: #dcfce7;
}
.demoe-notice {
  padding: 8px 14px;
  background: white;
  color: #64748b;
  font-size: 10px;
  line-height: 1.4;
  border-top: 1px solid #e2e8f0;
}
.demoe-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 12px;
  background: white;
}
.demoe-input {
  flex: 1;
  min-width: 0;
  max-height: 100px;
  min-height: 41px;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  padding: 10px;
  font:
    13px/1.5 Inter,
    sans-serif;
  color: #0f172a;
  background: #fff;
}
.demoe-send {
  flex: none;
  width: 41px;
  height: 41px;
  border: 0;
  border-radius: 11px;
  background: #15803d;
  color: white;
  cursor: pointer;
  font-size: 20px;
}
.demoe-send:disabled,
.demoe-faqs button:disabled {
  opacity: 0.55;
  cursor: wait;
}
@media (max-width: 600px) {
  .demoe-launcher {
    bottom: 84px;
    right: 14px;
    width: 55px;
    height: 55px;
  }
  .demoe-panel {
    bottom: 148px;
    right: 12px;
    width: calc(100vw - 24px);
    height: min(520px, calc(100dvh - 165px));
  }
}
@media (max-height: 550px) {
  .demoe-panel {
    bottom: 8px;
    height: calc(100dvh - 16px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .demoe-panel,
  .demoe-launcher {
    transition: none;
  }
}
