/* UtilitiKart AI Assistant widget */
#uk-agent-launch {
  position: fixed; bottom: 22px; right: 22px; z-index: 9998;
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #f07020, #e04322);
  color: #fff; border: none; border-radius: 999px;
  padding: 13px 20px; font-family: Inter, Arial, sans-serif; font-weight: 700; font-size: 15px;
  cursor: pointer; box-shadow: 0 8px 26px rgba(240,112,32,.45);
  transition: transform .15s ease, box-shadow .15s ease;
}
#uk-agent-launch:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(240,112,32,.6); }
#uk-agent-launch .uk-a-ico { font-size: 20px; line-height: 1; }

#uk-agent-panel {
  position: fixed; bottom: 22px; right: 22px; z-index: 9999;
  width: 380px; max-width: calc(100vw - 24px); height: 560px; max-height: calc(100vh - 44px);
  background: #14181f; border: 1px solid #29313e; border-radius: 18px;
  display: flex; flex-direction: column; overflow: hidden;
  font-family: Inter, Arial, sans-serif;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.uk-a-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: linear-gradient(135deg, #f07020, #e04322); color: #fff;
}
.uk-a-title { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.uk-a-dot { width: 9px; height: 9px; border-radius: 50%; background: #6dfba0; box-shadow: 0 0 0 3px rgba(109,251,160,.3); }
.uk-a-head-btns { display: flex; gap: 6px; }
.uk-a-hbtn { background: rgba(255,255,255,.18); border: none; color: #fff; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.uk-a-hbtn:hover { background: rgba(255,255,255,.3); }
.uk-a-hbtn.on { background: rgba(255,255,255,.4); }

.uk-a-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #14181f; }
.uk-a-bubble { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.uk-a-bubble.bot { background: #29313e; color: #eaf4f8; align-self: flex-start; border-bottom-left-radius: 4px; }
.uk-a-bubble.me { background: #f07020; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.uk-a-typing { display: flex; gap: 4px; align-items: center; }
.uk-a-typing span { width: 7px; height: 7px; border-radius: 50%; background: #7a889d; animation: ukbounce 1.2s infinite; }
.uk-a-typing span:nth-child(2) { animation-delay: .2s; }
.uk-a-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ukbounce { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

.uk-a-input { display: flex; align-items: center; gap: 8px; padding: 12px; background: #1e242e; border-top: 1px solid #29313e; }
.uk-a-input input { flex: 1; background: #14181f; border: 1px solid #29313e; border-radius: 999px; color: #eaf4f8; font-size: 14px; padding: 11px 16px; outline: none; }
.uk-a-input input:focus { border-color: #f07020; }
.uk-a-mic, .uk-a-send { border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; font-size: 17px; flex-shrink: 0; }
.uk-a-mic { background: #29313e; color: #eaf4f8; }
.uk-a-mic.rec { background: #e04322; color: #fff; animation: ukpulse 1s infinite; }
@keyframes ukpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(224,67,34,.5); } 50% { box-shadow: 0 0 0 8px rgba(224,67,34,0); } }
.uk-a-send { background: #f07020; color: #fff; }
.uk-a-foot { padding: 7px 12px; font-size: 11px; color: #7a889d; text-align: center; background: #1e242e; }

@media (max-width: 440px) {
  #uk-agent-panel { width: 100vw; height: 100vh; max-height: 100vh; bottom: 0; right: 0; border-radius: 0; }
  #uk-agent-launch { bottom: 16px; right: 16px; }
}

/* ---------- Voice usage nudge ---------- */
.uk-a-tip {
  background: linear-gradient(135deg, rgba(240,112,32,.16), rgba(224,67,34,.10));
  border: 1px solid rgba(240,112,32,.4);
  border-radius: 14px; padding: 12px 14px; align-self: stretch;
}
.uk-a-tip-row { display: flex; align-items: flex-start; gap: 10px; }
.uk-a-tip-ico { font-size: 22px; line-height: 1.2; }
.uk-a-tip-txt { flex: 1; font-size: 13px; color: #eaf4f8; line-height: 1.5; }
.uk-a-tip-txt b { color: #ffb782; }
.uk-a-tip-sub { color: #a9bcc6; font-size: 12px; }
.uk-a-tip-x { background: transparent; border: none; color: #7a889d; cursor: pointer; font-size: 13px; padding: 2px 4px; }
.uk-a-tip-x:hover { color: #eaf4f8; }
.uk-a-tip-cta { margin-top: 10px; }
.uk-a-tip-try {
  width: 100%; background: #f07020; color: #fff; border: none;
  border-radius: 999px; padding: 9px 14px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.uk-a-tip-try:hover { background: #e04322; }

/* Pulse the speaker button to draw attention */
.uk-a-hbtn.pulse { animation: ukHbtnPulse 1s ease-in-out 4; }
@keyframes ukHbtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.5); }
  50% { box-shadow: 0 0 0 7px rgba(255,255,255,0); transform: scale(1.08); }
}

/* Mic hint glow after user turns on voice */
.uk-a-mic.hint { animation: ukMicHint 1s ease-in-out 3; }
@keyframes ukMicHint {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240,112,32,.6); }
  50% { box-shadow: 0 0 0 9px rgba(240,112,32,0); background: #f07020; color: #fff; }
}

/* Launcher gentle attention pulse on load */
#uk-agent-launch { animation: ukLaunchPulse 2.4s ease-in-out 3; }
@keyframes ukLaunchPulse {
  0%, 100% { box-shadow: 0 8px 26px rgba(240,112,32,.45); }
  50% { box-shadow: 0 8px 26px rgba(240,112,32,.45), 0 0 0 10px rgba(240,112,32,0); }
}
