#upleef-chat-widget {
  display: none !important;
}

#upleef-ai-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  font-family: Arial, Helvetica, sans-serif;
  color: #f7f5eb;
}
#upleef-ai-chat * { box-sizing: border-box; }
#upleef-ai-chat.upleef-ai-waiting { display: none; }
.upleef-ai-toggle {
  min-width: 0 !important;
  width: auto !important;
  height: 56px !important;
  padding: 8px 16px !important;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #62bb47, #f9a11b 52%, #ef332a);
  color: #071007;
  cursor: pointer;
  box-shadow: 0 16px 38px rgba(0,0,0,.42);
  transition: transform .18s ease, filter .18s ease;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-align: left;
  line-height: 1 !important;
}
.upleef-ai-toggle-main {
  display: block;
  font-size: 15px;
  font-weight: 950;
  line-height: 1 !important;
  text-transform: uppercase;
}
.upleef-ai-toggle-sub {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1 !important;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.upleef-ai-toggle:hover,
.upleef-ai-toggle:focus-visible {
  transform: scale(1.08);
  filter: brightness(1.08);
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.upleef-ai-panel {
  position: absolute;
  right: 0;
  bottom: 86px;
  width: min(410px, calc(100vw - 28px));
  height: min(690px, calc(100vh - 120px));
  max-height: min(690px, calc(100vh - 120px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: #080c08;
  box-shadow: 0 24px 70px rgba(0,0,0,.58);
}
#upleef-ai-chat.is-open .upleef-ai-panel { display: flex; }
#upleef-ai-chat.is-open .upleef-ai-toggle { display: none !important; }
.upleef-ai-head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, #62bb47, #f9a11b 54%, #ef332a);
  color: #071007;
}
.upleef-ai-head strong {
  display: block;
  font-size: 18px;
  line-height: 1;
}
.upleef-ai-head span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 800;
}
.upleef-ai-close {
  border: 2px solid rgba(0,0,0,.34);
  background: rgba(0,0,0,.16);
  color: #071007;
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
}
.upleef-ai-head,
.upleef-ai-quick,
.upleef-ai-entry { flex: 0 0 auto; }
.upleef-ai-messages {
  flex: 1 1 auto;
  min-height: 120px;
  overflow: auto;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: radial-gradient(circle at 12% 12%, rgba(98,187,71,.18), transparent 34%), radial-gradient(circle at 88% 18%, rgba(239,51,42,.15), transparent 32%), #080c08;
}
.upleef-ai-msg {
  max-width: 94%;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.42;
}
.upleef-ai-msg.bot {
  justify-self: start;
  background: #141c14;
  border: 1px solid rgba(255,255,255,.12);
}
.upleef-ai-msg.user {
  justify-self: end;
  background: #62bb47;
  color: #061006;
  font-weight: 800;
}
.upleef-ai-msg.thinking { opacity: .78; }
.upleef-ai-msg a {
  color: #f9a11b;
  font-weight: 900;
  text-decoration: underline;
}
.upleef-ai-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px;
  background: #080c08;
}
.upleef-ai-quick button {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: #121912;
  color: #f7f5eb;
  padding: 8px 10px;
  font-weight: 850;
  font-size: 12px;
  cursor: pointer;
}
.upleef-ai-quick button:hover { background: #f9a11b; color: #071007; }
.upleef-ai-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 16px 16px;
  background: #080c08;
  border-top: 1px solid rgba(255,255,255,.12);
}
.upleef-ai-entry input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  background: #030503;
  color: #fff;
  padding: 10px 11px;
  font-size: 14px;
}
.upleef-ai-entry button {
  min-width: 86px !important;
  min-height: 42px !important;
  border: 0;
  border-radius: 6px;
  background: #ef332a;
  color: #fff;
  font-weight: 950;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1 !important;
}
@media (max-width: 560px) {
  #upleef-ai-chat { right: 14px; bottom: 14px; }
  .upleef-ai-toggle { height: 52px !important; padding: 7px 14px !important; }
  .upleef-ai-toggle-main { font-size: 14px; }
  .upleef-ai-toggle-sub { font-size: 9px; }
  .upleef-ai-panel {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 96px;
    bottom: 44px;
    width: auto;
    height: auto;
    max-height: none;
  }
  .upleef-ai-quick { grid-template-columns: 1fr; gap: 6px; padding: 8px 16px !important; }
  .upleef-ai-quick button { min-height: 38px !important; padding: 6px 8px !important; }
}
