/* QTM Assistant chatbot widget */
.qbot-launch {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; height: 58px; padding: 0 20px 0 16px; border-radius: 999px; border: 0;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 10px;
  box-shadow: 0 14px 40px rgba(29,78,216,0.38); cursor: pointer; transition: transform .2s, background .2s;
}
.qbot-launch:hover { background: var(--blue-800); transform: translateY(-2px); }
.qbot-launch .dot { width: 10px; height: 10px; border-radius: 50%; background: #5BE49B; box-shadow: 0 0 0 3px rgba(91,228,155,.25); }
.qbot-launch[aria-expanded="true"] .lbl { display: none; }
.qbot-launch[aria-expanded="true"] { width: 58px; padding: 0; justify-content: center; }
.qbot-launch[aria-expanded="true"] .dot, .qbot-launch[aria-expanded="true"] .ico-chat { display: none; }
.qbot-launch .ico-x { display: none; }
.qbot-launch[aria-expanded="true"] .ico-x { display: block; }
.qbot-nudge {
  position: fixed; right: 22px; bottom: 92px; z-index: 59; max-width: 260px; background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px 14px 4px 14px; padding: 12px 34px 12px 14px; font-size: 14px; box-shadow: var(--shadow-sm); display: none;
}
.qbot-nudge.show { display: block; animation: qbot-pop .3s ease; }
.qbot-nudge button { position: absolute; top: 6px; right: 6px; border: 0; background: none; cursor: pointer; color: var(--muted-2); font-size: 18px; line-height: 1; padding: 4px; }
.qbot {
  position: fixed; right: 22px; bottom: 92px; z-index: 60; width: min(390px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px));
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 80px rgba(11,27,63,0.28);
  display: none; flex-direction: column; overflow: hidden;
}
.qbot.open { display: flex; animation: qbot-pop .22s ease; }
@keyframes qbot-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.qbot-head { background: var(--navy); color: #fff; padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.qbot-head .av { width: 40px; height: 40px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; flex: 0 0 auto; box-shadow: 0 0 0 1px #2B3F6E; }
.qbot-head b { display: block; font-size: 16px; }
.qbot-head small { display: flex; align-items: center; gap: 6px; color: #B9C7EA; font-size: 12px; }
.qbot-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5BE49B; }
.qbot-head .x { margin-left: auto; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #2B3F6E; background: transparent; color: #fff; cursor: pointer; font-size: 18px; }
.qbot-head .x:hover { background: var(--navy-2); }
.qbot-log { flex: 1 1 auto; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--tint); }
.qmsg { max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-line; }
.qmsg a { font-weight: 700; }
.qmsg--bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.qmsg--me { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.qtyping { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; gap: 4px; }
.qtyping i { width: 7px; height: 7px; border-radius: 50%; background: #A5B1CF; animation: qblink 1s infinite; }
.qtyping i:nth-child(2) { animation-delay: .15s; } .qtyping i:nth-child(3) { animation-delay: .3s; }
@keyframes qblink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.qchips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 100%; }
.qchips button { border: 1.5px solid #D4E0FB; background: #fff; color: var(--blue); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.qchips button:hover { background: var(--tint-2); border-color: var(--blue); }
.qbot-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.qbot-form input { flex: 1; min-width: 0; min-height: 44px; border: 1.5px solid var(--line-3); border-radius: 12px; padding: 0 14px; font-size: 14.5px; }
.qbot-form input:focus { outline: none; border-color: var(--blue); }
.qbot-form button { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--blue); color: #fff; cursor: pointer; display: grid; place-items: center; flex: 0 0 auto; }
.qbot-form button:hover { background: var(--blue-800); }
.qbot-foot { font-size: 11px; color: var(--muted-2); text-align: center; padding: 0 12px 10px; background: #fff; }
@media (max-width: 520px) {
  .qbot { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; }
  .qbot-launch { right: 16px; bottom: 16px; }
  .qbot.open ~ .qbot-launch { display: none; }
}
