/* Imperial Agency PK — live support chat bubble */
.ia-chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9998;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #00d084, #07a86b);
  color: #04211a;
  box-shadow: 0 12px 34px rgba(0, 208, 132, .38), 0 0 0 5px rgba(0, 208, 132, .10);
  transition: transform .22s ease, box-shadow .22s ease;
}
.ia-chat-launcher:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 18px 42px rgba(0,208,132,.48), 0 0 0 7px rgba(0,208,132,.12); }
.ia-chat-launcher svg { width: 27px; height: 27px; }
.ia-chat-launcher .ia-chat-badge {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px;
  border-radius: 10px; background: #fff; color: #04211a; font-size: 10px; font-weight: 800;
  display: none; place-items: center; padding: 0 5px; border: 2px solid #071a2a;
}
.ia-chat-launcher.has-badge .ia-chat-badge { display: grid; }

.ia-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 9999;
  width: min(370px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(14,46,46,.98), rgba(7,26,42,.99));
  border: 1px solid rgba(0,208,132,.28);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  overflow: hidden;
  transform: translateY(14px) scale(.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.ia-chat-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.ia-chat-head {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 15px;
  background: rgba(0,0,0,.22);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.ia-chat-avatar {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(0,208,132,.5); flex: 0 0 auto;
}
.ia-chat-title { font-weight: 800; font-size: .9rem; line-height: 1.15; }
.ia-chat-sub { font-size: .68rem; color: #7f9d95; margin-top: 3px; }
.ia-chat-sub b { color: #00d084; }
.ia-chat-close {
  margin-left: auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: #b8d8d0; background: rgba(255,255,255,.05);
}
.ia-chat-close:hover { color: #fff; background: rgba(255,255,255,.12); }
.ia-chat-close svg { width: 16px; height: 16px; }

.ia-chat-log {
  flex: 1; overflow-y: auto; padding: 15px 13px 8px;
  display: flex; flex-direction: column; gap: 9px; scrollbar-width: thin;
}
.ia-chat-msg { max-width: 88%; padding: 10px 13px; border-radius: 15px; font-size: .82rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.ia-chat-msg.bot { align-self: flex-start; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.07); border-bottom-left-radius: 4px; color: #eaf7f2; }
.ia-chat-msg.user { align-self: flex-end; background: rgba(0,208,132,.16); border: 1px solid rgba(0,208,132,.3); border-bottom-right-radius: 4px; color: #fff; }
.ia-chat-msg a { color: #00d084; text-decoration: underline; }
.ia-chat-msg .ia-chat-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.ia-chat-msg .ia-chat-links a {
  display: inline-block; padding: 6px 10px; border-radius: 100px; font-size: .72rem; font-weight: 700;
  background: rgba(0,208,132,.12); border: 1px solid rgba(0,208,132,.32); text-decoration: none;
}
.ia-chat-typing { align-self: flex-start; font-size: .7rem; color: #7f9d95; font-style: italic; }

.ia-chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 13px 10px; }
.ia-chat-chip {
  padding: 7px 11px; border-radius: 100px; font-size: .72rem; font-weight: 700;
  color: #b8d8d0; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
}
.ia-chat-chip:hover { color: #00d084; border-color: rgba(0,208,132,.45); }

.ia-chat-form { display: flex; gap: 8px; padding: 11px 12px 13px; border-top: 1px solid rgba(255,255,255,.07); background: rgba(0,0,0,.16); }
.ia-chat-input {
  flex: 1; min-width: 0; border-radius: 100px; padding: 10px 14px; font-size: .8rem;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #fff; outline: none;
}
.ia-chat-input:focus { border-color: rgba(0,208,132,.55); }
.ia-chat-input::placeholder { color: #7f9d95; }
.ia-chat-send {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: #00d084; color: #04211a; font-weight: 900;
}
.ia-chat-send:hover { background: #18e59a; }
.ia-chat-send svg { width: 17px; height: 17px; }

@media (max-width: 480px) {
  .ia-chat-panel { right: 12px; bottom: 84px; height: min(520px, calc(100vh - 105px)); }
  .ia-chat-launcher { right: 16px; bottom: 16px; }
}
