.uplife-chat-launcher,
.uplife-chat-panel {
  --chat-blue: #293cff;
  --chat-ink: #14232e;
  --chat-paper: #fffefa;
  font-family: 'DM Sans', sans-serif;
}

.uplife-chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 19px;
  border: 0;
  border-radius: 999px;
  background: var(--chat-blue);
  color: #fff;
  font: 700 14px/1 'DM Sans', sans-serif;
  box-shadow: 0 8px 24px #14232e2b;
  cursor: pointer;
}

.uplife-chat-launcher:hover { background: #1d2ebf; }
.uplife-chat-launcher:focus-visible,
.uplife-chat-panel button:focus-visible,
.uplife-chat-panel input:focus-visible,
.uplife-chat-panel a:focus-visible {
  outline: 3px solid #ffdc4d;
  outline-offset: 3px;
}

.uplife-chat-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff26;
  font-size: 16px;
}

.uplife-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 31;
  display: flex;
  width: min(380px, calc(100vw - 32px));
  height: min(540px, calc(100dvh - 125px));
  min-height: 360px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e4dd;
  border-radius: 18px;
  background: var(--chat-paper);
  color: var(--chat-ink);
  box-shadow: 0 18px 60px #14232e30;
}

.uplife-chat-panel[hidden] { display: none; }
.uplife-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; background: var(--chat-blue); color: white; }
.uplife-chat-head strong { display: block; font-size: 15px; }
.uplife-chat-head span { display: block; margin-top: 2px; color: #e4e7ff; font-size: 11px; }
.uplife-chat-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #ffffff22; color: white; font-size: 21px; cursor: pointer; }
.uplife-chat-messages { display: flex; flex: 1; flex-direction: column; gap: 12px; overflow-y: auto; padding: 17px; }
.uplife-chat-message { max-width: 90%; padding: 11px 13px; border-radius: 13px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.uplife-chat-message.bot { align-self: flex-start; background: #f1f2f7; }
.uplife-chat-message.user { align-self: flex-end; background: #293cff; color: white; }
.uplife-chat-message a { display: inline-block; margin-top: 8px; color: #293cff; font-weight: 750; text-underline-offset: 3px; }
.uplife-chat-suggestions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.uplife-chat-suggestions button { padding: 7px 10px; border: 1px solid #d9ddf2; border-radius: 999px; background: white; color: #293cff; font: 700 11px 'DM Sans', sans-serif; cursor: pointer; }
.uplife-chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e5e4dd; }
.uplife-chat-form input { min-width: 0; flex: 1; padding: 11px 12px; border: 1px solid #d6d8df; border-radius: 10px; color: var(--chat-ink); font: 13px 'DM Sans', sans-serif; }
.uplife-chat-form button { padding: 0 14px; border: 0; border-radius: 10px; background: #293cff; color: white; font: 700 12px 'DM Sans', sans-serif; cursor: pointer; }
.uplife-chat-privacy { padding: 0 14px 11px; color: #68757d; font-size: 10px; text-align: center; }

@media (max-width: 520px) {
  .uplife-chat-launcher { right: 14px; bottom: 14px; min-height: 48px; padding: 0 15px; }
  .uplife-chat-panel { right: 10px; bottom: 72px; width: calc(100vw - 20px); height: min(560px, calc(100dvh - 95px)); min-height: 340px; }
}

@media (prefers-reduced-motion: no-preference) {
  .uplife-chat-launcher { transition: background .18s ease, transform .18s ease; }
  .uplife-chat-launcher:hover { transform: translateY(-2px); }
}
