/* Tech Bhidu chat widget */
.bhidu { position: fixed; right: 20px; bottom: 22px; z-index: 960; font-family: 'Inter', system-ui, sans-serif; }
.bhidu-launch { width: 64px; height: 64px; border-radius: 50%; border: 3px solid #fff; padding: 0; background: #14304F; cursor: pointer;
  box-shadow: 0 10px 28px rgba(12,32,54,.35); transition: transform .2s; position: relative; display: block; }
.bhidu-launch:hover { transform: scale(1.06); }
.bhidu-launch img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.bhidu-dot { position: absolute; right: 2px; bottom: 4px; width: 14px; height: 14px; border-radius: 50%; background: #22C55E; border: 2px solid #fff; }
.bhidu-unread .bhidu-dot { background: #F9AE1A; animation: bhidu-pulse 1.2s infinite; }
@keyframes bhidu-pulse { 50% { transform: scale(1.3); } }
.bhidu-open .bhidu-launch { transform: scale(.9); }

.bhidu-hint { position: absolute; right: 0; bottom: 78px; white-space: nowrap; background: #fff; color: #10253D; font: 600 14px/1.2 'Poppins', sans-serif;
  padding: 11px 32px 11px 14px; border-radius: 14px 14px 4px 14px; box-shadow: 0 10px 28px rgba(12,32,54,.18); cursor: pointer; animation: bhidu-in .3s ease; }
.bhidu-hint button { position: absolute; right: 6px; top: 6px; border: 0; background: none; font-size: 16px; color: #8A97A8; cursor: pointer; line-height: 1; }

.bhidu-panel { position: absolute; right: 0; bottom: 78px; width: 370px; height: min(600px, calc(100vh - 120px)); background: #F6F8FB; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(12,32,54,.3); display: flex; flex-direction: column; overflow: hidden; animation: bhidu-in .25s ease; }
.bhidu-panel[hidden], .bhidu-hint[hidden] { display: none; }
@keyframes bhidu-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.bhidu-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: linear-gradient(120deg, #0C2036, #14304F 60%, #1D4573); color: #fff; }
.bhidu-head img { border-radius: 50%; border: 2px solid #F9AE1A; }
.bhidu-head div { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.bhidu-head strong { font: 700 16px/1.2 'Poppins', sans-serif; }
.bhidu-head span { font-size: 12px; color: rgba(255,255,255,.75); display: flex; align-items: center; gap: 6px; }
.bhidu-head span i { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; display: inline-block; }
.bhidu-head button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: rgba(255,255,255,.1); color: #fff; font-size: 20px; cursor: pointer; line-height: 1; }
.bhidu-head button:hover { background: rgba(255,255,255,.2); }
.bhidu-reset { font-size: 17px !important; }

.bhidu-body { flex: 1; overflow-y: auto; padding: 16px 12px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.bhidu-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; }
.bhidu-msg p { margin: 0; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere; }
.bhidu-bot p { background: #fff; color: #10253D; border: 1px solid #E3E8EF; border-bottom-left-radius: 4px; }
.bhidu-bot img { border-radius: 50%; flex: none; }
.bhidu-user { align-self: flex-end; }
.bhidu-user p { background: #14304F; color: #fff; border-bottom-right-radius: 4px; }
.bhidu-msg a { color: #1D4573; font-weight: 600; word-break: break-all; }
.bhidu-user a { color: #F9AE1A; }
.bhidu-typing p { display: flex; gap: 4px; padding: 14px; }
.bhidu-typing span { width: 7px; height: 7px; border-radius: 50%; background: #8A97A8; animation: bhidu-dots 1s infinite; }
.bhidu-typing span:nth-child(2) { animation-delay: .15s; } .bhidu-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bhidu-dots { 50% { opacity: .3; transform: translateY(-3px); } }

.bhidu-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.bhidu-chips:empty { display: none; }
.bhidu-chips button { border: 1px solid #D8E1EC; background: #fff; color: #14304F; font: 600 12.5px/1 'Poppins', sans-serif; padding: 8px 11px; border-radius: 20px; cursor: pointer; }
.bhidu-chips button:hover { background: #F9AE1A; border-color: #F9AE1A; color: #0C2036; }

.bhidu-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; background: #fff; border-top: 1px solid #E3E8EF; }
.bhidu-form textarea { flex: 1; resize: none; border: 1.5px solid #E3E8EF; border-radius: 12px; padding: 10px 12px; font: 400 15px/1.4 'Inter', sans-serif; color: #10253D; max-height: 110px; background: #F6F8FB; }
.bhidu-form textarea:focus { outline: none; border-color: #3A6EA5; background: #fff; }
.bhidu-form button { width: 42px; height: 42px; flex: none; border: 0; border-radius: 12px; background: #F9AE1A; color: #0C2036; font-size: 18px; cursor: pointer; }
.bhidu-note { margin: 0; padding: 0 12px 9px; background: #fff; text-align: center; font-size: 10.5px; color: #8A97A8; }
.bhidu-note a { color: #66758A; }

@media (max-width: 767px) {
  .bhidu { right: 14px; bottom: 76px; }
  .bhidu-launch { width: 56px; height: 56px; }
  .bhidu-hint { bottom: 68px; }
}
@media (max-width: 639px) {
  .bhidu-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; z-index: 1001; }
  .bhidu-open .bhidu-launch, .bhidu-open .bhidu-hint { display: none; }
  .bhidu-form textarea { font-size: 16px; } /* stops iPhone zoom */
}
html.bhidu-lock, html.bhidu-lock body { overflow: hidden; }
/* the site sets img{width:100%} globally — keep chat images at their own size */
.bhidu img { max-width: none; flex: none; }
.bhidu-launch img { width: 100%; height: 100%; }
.bhidu-head img { width: 42px; height: 42px; }
.bhidu-msg img { width: 28px; height: 28px; }
.bhidu-msg p { flex: 1 1 auto; min-width: 0; }

/* Launcher: soft pulse ring + friendly wiggle, and a rotating label */
.bhidu-launch::before { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid #F9AE1A; opacity: 0; animation: bhidu-ring 2.6s ease-out infinite; pointer-events: none; }
@keyframes bhidu-ring { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.45); opacity: 0; } }
.bhidu-launch img { animation: bhidu-wiggle 6s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes bhidu-wiggle { 0%, 84%, 100% { transform: rotate(0); } 87% { transform: rotate(-10deg); } 90% { transform: rotate(9deg); } 93% { transform: rotate(-6deg); } 96% { transform: rotate(4deg); } }
.bhidu-open .bhidu-launch::before, .bhidu-open .bhidu-launch img { animation: none; }

.bhidu-label { position: absolute; right: 74px; bottom: 14px; white-space: nowrap; cursor: pointer;
  background: #fff; color: #10253D; font: 600 14px/1 'Poppins', sans-serif; padding: 11px 14px; border-radius: 22px 22px 6px 22px;
  box-shadow: 0 10px 28px rgba(12,32,54,.22); border: 1px solid #F2D490; animation: bhidu-in .4s ease .8s both; }
.bhidu-label span { display: inline-block; transition: opacity .3s, transform .3s; }
.bhidu-label.bhidu-swap span { opacity: 0; transform: translateY(6px); }
.bhidu-open .bhidu-label { display: none; }
@media (max-width: 767px) {
  .bhidu-label { right: 64px; bottom: 11px; font-size: 13px; padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .bhidu-launch::before, .bhidu-launch img { animation: none; }
  .bhidu-label span { transition: none; }
}
.bhidu-label { transition: opacity .35s, transform .35s; }
.bhidu-label.bhidu-label-off { opacity: 0; transform: translateX(10px) scale(.95); pointer-events: none; }

/* Off-topic: no words, just a thinking animation */
.bhidu-off p { display: flex; align-items: center; gap: 8px; padding: 9px 14px; }
.bhidu-think { font-size: 26px; line-height: 1; display: inline-block; animation: bhidu-think 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes bhidu-think { 0%, 100% { transform: rotate(0) translateY(0); } 20% { transform: rotate(-12deg) translateY(-2px); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg) translateY(-1px); } 80% { transform: rotate(4deg); } }
.bhidu-think-dots { display: inline-flex; gap: 4px; }
.bhidu-think-dots i { width: 7px; height: 7px; border-radius: 50%; background: #F9AE1A; animation: bhidu-dots 1.2s infinite; }
.bhidu-think-dots i:nth-child(2) { animation-delay: .2s; } .bhidu-think-dots i:nth-child(3) { animation-delay: .4s; }
@media (prefers-reduced-motion: reduce) { .bhidu-think, .bhidu-think-dots i { animation: none; } }
.bhidu-body { position: relative; }
