/* === ESeye Native B2B Technical AI Assistant (v1, 2026-12-02) === */
.es-ai-launcher {
  position: fixed;
  right: 20px;
  bottom: 92px;
  z-index: 62;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 15px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 183, 0.45);
  background: #0e3b2e;
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 32px -12px rgba(8, 36, 27, 0.55), 0 2px 6px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.es-ai-launcher:hover {
  background: #14503e;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px rgba(8, 36, 27, 0.62);
}
.es-ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fbf71;
  box-shadow: 0 0 0 3px rgba(47, 191, 113, 0.28);
  flex-shrink: 0;
}
.es-ai-launcher svg {
  width: 17px;
  height: 17px;
  color: #6ee7b7;
  flex-shrink: 0;
}
.es-ai-launcher.is-open {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.es-ai-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 125;
  width: 396px;
  max-width: calc(100vw - 24px);
  height: 590px;
  max-height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #c9ded3;
  box-shadow: 0 28px 64px -18px rgba(8, 30, 22, 0.45);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.24s cubic-bezier(0.2, 0.75, 0.25, 1), visibility 0.22s;
  font-family: inherit;
  color: #10241d;
}
.es-ai-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.es-ai-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px 13px;
  background: #0e3b2e;
  color: #ffffff;
}
.es-ai-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 7px;
}
.es-ai-sub {
  margin: 3px 0 0;
  font-family: var(--mono, "IBM Plex Mono", monospace);
  font-size: 11px;
  color: #a7f3d0;
  line-height: 1.35;
}
.es-ai-head-act {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.es-ai-hbtn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: grid;
  place-items: center;
  text-decoration: none;
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
}
.es-ai-hbtn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.es-ai-hbtn svg {
  width: 16px;
  height: 16px;
}

.es-ai-ctxbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px;
  background: #f1f8f4;
  border-bottom: 1px solid #dcebe2;
  font-family: var(--mono, "IBM Plex Mono", monospace);
  font-size: 11px;
  color: #164939;
}
.es-ai-ctxbar a {
  color: #0f7a48;
  font-weight: 700;
  text-decoration: underline;
}

.es-ai-msgs {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: #fbfdfb;
}
.es-ai-msg {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 13px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.es-ai-msg.bot {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #d7e7de;
  color: #10241d;
  border-bottom-left-radius: 4px;
}
.es-ai-msg.user {
  align-self: flex-end;
  background: #0e3b2e;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}
.es-ai-typing {
  align-self: flex-start;
  padding: 8px 13px;
  border-radius: 12px;
  background: #eef6f1;
  color: #365c4e;
  font-size: 12.5px;
  font-style: italic;
}

.es-ai-cards {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}
.es-ai-pcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: #ffffff;
  border: 1px solid #cde1d6;
  text-decoration: none;
  color: #0e3b2e;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.es-ai-pcard:hover {
  border-color: #2fbf71;
  background: #f3fbf6;
}
.es-ai-pcard strong {
  display: block;
  font-family: var(--mono, "IBM Plex Mono", monospace);
  font-size: 13px;
  color: #0e3b2e;
}
.es-ai-pcard small {
  display: block;
  font-size: 12px;
  color: #46665b;
  line-height: 1.35;
}
.es-ai-pcard-go {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #0f7a48;
  white-space: nowrap;
}

.es-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.es-ai-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #c5dfd0;
  background: #ffffff;
  color: #134435;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.es-ai-chip:hover {
  background: #0e3b2e;
  border-color: #0e3b2e;
  color: #ffffff;
}

.es-ai-lead {
  padding: 12px;
  border-radius: 12px;
  background: #eef8f2;
  border: 1px solid #b6dec7;
  display: grid;
  gap: 8px;
}
.es-ai-lead-h {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0e3b2e;
}
.es-ai-lead-p {
  margin: 0;
  font-size: 12px;
  color: #36594c;
  line-height: 1.4;
}
.es-ai-lead-row {
  display: flex;
  gap: 6px;
}
.es-ai-lead input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1.5px solid #bddac9;
  background: #ffffff;
  font: inherit;
  font-size: 13px;
  color: #10241d;
}
.es-ai-lead input:focus {
  outline: none;
  border-color: #2fbf71;
}
.es-ai-lead button {
  flex: 0 0 auto;
  padding: 0 12px;
  min-height: 36px;
  border-radius: 9px;
  border: 0;
  background: #2fbf71;
  color: #0c261d;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.es-ai-lead button:disabled {
  opacity: 0.6;
}
.es-ai-lead-st {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #0f7a48;
}
.es-ai-lead-st.err {
  color: #b91c1c;
}

.es-ai-inputbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #ffffff;
  border-top: 1px solid #dcebe2;
}
.es-ai-inputbar input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1.5px solid #cbdcd2;
  background: #f9fcfa;
  font: inherit;
  font-size: 13.5px;
  color: #10241d;
}
.es-ai-inputbar input:focus {
  outline: none;
  border-color: #2fbf71;
  background: #ffffff;
}
.es-ai-send {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 0;
  background: #0e3b2e;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.es-ai-send:hover {
  background: #155240;
}
.es-ai-send:disabled {
  opacity: 0.55;
}

@media (max-width: 820px) {
  .es-ai-launcher {
    right: 14px;
    bottom: calc(148px + env(safe-area-inset-bottom, 0px));
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
  }
  .es-ai-launcher .es-ai-ltxt {
    display: none;
  }
  .es-ai-launcher .es-ai-dot {
    position: absolute;
    top: 7px;
    right: 7px;
  }
  .es-ai-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 82dvh;
    max-height: 82dvh;
    border-radius: 18px 18px 0 0;
  }
  .es-ai-inputbar {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}
