/* ===== PR Tech Chatbot Widget ===== */
#prt-chat-launcher {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #002776 0%, #001a4d 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,23,77,.38);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
#prt-chat-launcher:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0,23,77,.5);
}
#prt-chat-launcher svg { transition: opacity .15s, transform .15s; }
#prt-chat-launcher .icon-chat  { opacity: 1;  transform: scale(1) rotate(0deg); position: absolute; }
#prt-chat-launcher .icon-close { opacity: 0;  transform: scale(.6) rotate(-90deg); position: absolute; }
#prt-chat-launcher.is-open .icon-chat  { opacity: 0;  transform: scale(.6) rotate(90deg); }
#prt-chat-launcher.is-open .icon-close { opacity: 1;  transform: scale(1) rotate(0deg); }
#prt-chat-launcher::after {
  content: '';
  position: absolute;
  top: 4px; right: 4px;
  width: 10px; height: 10px;
  background: #86bc25;
  border-radius: 50%;
  border: 2px solid #fff;
  transition: opacity .2s;
}
#prt-chat-launcher.is-open::after { opacity: 0; }

#prt-chat-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 9998;
  width: 360px;
  max-height: 580px;
  background: #fff;
  border: 1px solid rgba(0,39,118,.1);
  box-shadow: 0 20px 60px rgba(0,23,77,.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2px;
  transform: translateY(16px) scale(.97);
  opacity: 0;
  pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
}
#prt-chat-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.prt-chat-header {
  background: linear-gradient(135deg, #001a4d 0%, #002776 100%);
  padding: 18px 20px 14px;
  flex-shrink: 0;
}
.prt-chat-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.prt-chat-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(134,188,37,.18);
  border: 1px solid rgba(134,188,37,.35);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.prt-chat-avatar svg { width: 18px; height: 18px; color: #86bc25; }
.prt-chat-header-name { font-size: .88rem; font-weight: 700; color: #fff; line-height: 1.25; }
.prt-chat-header-status {
  font-size: .72rem;
  color: rgba(255,255,255,.65);
  display: flex; align-items: center; gap: 5px;
}
.prt-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #86bc25;
  display: inline-block;
}
.prt-chat-header-sub { font-size: .76rem; color: rgba(255,255,255,.55); margin-top: 2px; }

.prt-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7f9fc;
}
.prt-msg {
  max-width: 82%;
  font-size: .82rem;
  line-height: 1.55;
  padding: 9px 13px;
  border-radius: 2px;
  word-break: break-word;
}
.prt-msg--bot {
  align-self: flex-start;
  background: #fff;
  color: #1a2a3a;
  border: 1px solid #e8edf3;
  border-bottom-left-radius: 0;
}
.prt-msg--user {
  align-self: flex-end;
  background: #002776;
  color: #fff;
  border-bottom-right-radius: 0;
}

.prt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px;
  background: #f7f9fc;
}
.prt-chip {
  font-size: .75rem;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid rgba(0,39,118,.2);
  color: #002776;
  background: #fff;
  cursor: pointer;
  border-radius: 20px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.prt-chip:hover { background: #002776; color: #fff; border-color: #002776; }

.prt-chat-input-area {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e8edf3;
  background: #fff;
  flex-shrink: 0;
}
#prt-user-input {
  flex: 1;
  font-size: .82rem;
  padding: 8px 11px;
  border: 1px solid #dde3ec;
  color: #1a2a3a;
  background: #f7f9fc;
  outline: none;
  font-family: inherit;
  transition: border-color .15s;
  border-radius: 2px;
  min-width: 0;
}
#prt-user-input:focus { border-color: #002776; background: #fff; }
#prt-send-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #002776;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
  transition: background .15s;
}
#prt-send-btn:hover { background: #001a4d; }
#prt-skip-btn {
  font-size: .74rem;
  font-weight: 600;
  color: #999;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  white-space: nowrap;
  font-family: inherit;
  flex-shrink: 0;
  transition: color .15s;
}
#prt-skip-btn:hover { color: #002776; }

.prt-typing {
  display: flex !important;
  align-items: center;
  gap: 4px;
  padding: 10px 14px !important;
}
.prt-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #aab4c4;
  display: inline-block;
  animation: prt-bounce .9s infinite ease-in-out;
}
.prt-typing span:nth-child(2) { animation-delay: .15s; }
.prt-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes prt-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40%            { transform: translateY(-5px); }
}

.prt-chat-success {
  padding: 24px 20px;
  text-align: center;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: #fff;
}
.prt-chat-success.is-visible { display: flex; }
.prt-success-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(134,188,37,.12);
  display: flex; align-items: center; justify-content: center;
}
.prt-success-icon svg { width: 24px; height: 24px; color: #86bc25; }
.prt-success-title { font-size: .95rem; font-weight: 700; color: #002776; }
.prt-success-sub { font-size: .8rem; color: #666; line-height: 1.6; }

.prt-chat-powered {
  text-align: center;
  font-size: .68rem;
  color: #bbb;
  padding: 6px 0 10px;
  background: #fff;
  letter-spacing: .02em;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

#prt-bubble {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 9997;
  background: #fff;
  border: 1px solid rgba(0,39,118,.1);
  box-shadow: 0 8px 32px rgba(0,23,77,.15);
  padding: 11px 36px 11px 14px;
  font-size: .82rem;
  color: #1a2a3a;
  line-height: 1.45;
  max-width: 240px;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
#prt-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 22px;
  width: 12px; height: 12px;
  background: #fff;
  border-right: 1px solid rgba(0,39,118,.1);
  border-bottom: 1px solid rgba(0,39,118,.1);
  transform: rotate(45deg);
}
#prt-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#prt-bubble-close {
  position: absolute;
  top: 6px; right: 8px;
  font-size: .65rem;
  color: #bbb;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
}
#prt-bubble-close:hover { color: #666; }

@media (max-width: 480px) {
  #prt-chat-panel { width: calc(100vw - 24px); right: 12px; bottom: 86px; }
  #prt-chat-launcher { right: 16px; bottom: 20px; }
  #prt-bubble { right: 16px; bottom: 86px; }
}
