/* GO EASY AI Chat — self-hosted, Chatway-style floating widget */
.ge-chat {
  --gc-brand: #0d7a76;
  --gc-brand-d: #0a625f;
  --gc-ink: #141414;
  --gc-muted: #5b6b74;
  --gc-line: #e2e8ea;
  --gc-bg: #ffffff;
  font-family: inherit;
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 99991;
  font-size: 14px;
  line-height: 1.5;
}
.ge-chat * { box-sizing: border-box; }

/* Floating button */
.ge-chat__fab {
  width: 58px; height: 58px;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: var(--gc-brand);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(13,122,118,.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform .18s ease, background .18s ease;
}
.ge-chat__fab:hover { background: var(--gc-brand-d); transform: translateY(-2px); }
.ge-chat__fab-close { display: none; }
.ge-chat__fab--open .ge-chat__fab-open { display: none; }
.ge-chat__fab--open .ge-chat__fab-close { display: inline; }

/* Panel */
.ge-chat__panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: 372px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100dvh - 120px);
  background: var(--gc-bg);
  border: 1px solid var(--gc-line);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(20,20,20,.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.ge-chat__panel--open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.ge-chat__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--gc-brand);
  color: #fff;
}
.ge-chat__brand { display: flex; align-items: center; gap: 10px; }
.ge-chat__brand strong { display: block; font-size: 15px; line-height: 1.2; }
.ge-chat__brand small { display: block; font-size: 11px; opacity: .85; }
.ge-chat__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.ge-chat__close {
  border: 0; background: transparent; color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px;
}

/* Body / messages */
.ge-chat__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f7f9f9;
  -webkit-overflow-scrolling: touch;
}
.ge-chat__intro { margin-bottom: 8px; }
.ge-chat__bubble {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 14px;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.ge-chat__bubble--bot { background: #fff; color: var(--gc-ink); border: 1px solid var(--gc-line); border-bottom-left-radius: 4px; }
.ge-chat__bubble--user { background: var(--gc-brand); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.ge-chat__typing { letter-spacing: 2px; color: var(--gc-muted); }

.ge-chat__suggest { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.ge-chat__chip {
  border: 1px solid var(--gc-brand);
  color: var(--gc-brand);
  background: #fff;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ge-chat__chip:hover { background: var(--gc-brand); color: #fff; }

/* Footer */
.ge-chat__foot { border-top: 1px solid var(--gc-line); padding: 10px 12px 8px; background: #fff; }
.ge-chat__form { display: flex; gap: 8px; }
.ge-chat__input {
  flex: 1; min-width: 0;
  border: 1px solid var(--gc-line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.ge-chat__input:focus { border-color: var(--gc-brand); box-shadow: 0 0 0 3px rgba(13,122,118,.12); }
.ge-chat__input:disabled { background: #f4f6f6; color: #999; }
.ge-chat__send {
  width: 42px; flex: 0 0 42px;
  border: 0; border-radius: 10px;
  background: var(--gc-brand); color: #fff;
  font-size: 16px; cursor: pointer;
}
.ge-chat__send:disabled { background: #b9c9c8; cursor: not-allowed; }
.ge-chat__note { text-align: center; font-size: 10px; color: #9aa7ad; margin-top: 7px; }

@media (max-width: 600px) {
  .ge-chat { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .ge-chat__panel {
    position: fixed;
    right: 8px; left: 8px; bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    width: auto; max-width: none;
    height: 68dvh;
  }
}
