/* PASDOC AI Chat Widget Styles */

#nrb-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', -apple-system, sans-serif;
}

#nrb-chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #F47920;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(244, 121, 32, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 1;
}

#nrb-chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(244, 121, 32, 0.6);
}

#nrb-chat-toggle svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
}

#nrb-chat-toggle.nrb-pulse {
  animation: nrb-pulse 1s ease-in-out 3;
}

@keyframes nrb-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(244,121,32,.45); }
  50% { transform: scale(1.12); box-shadow: 0 6px 32px rgba(244,121,32,.65); }
}

#nrb-chat-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7CAA2D;
  border: 2px solid #fff;
  animation: nrb-dot-pulse 2s infinite;
}

@keyframes nrb-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

#nrb-chat-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 360px;
  max-height: 520px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(45, 58, 107, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  transform-origin: bottom right;
}

#nrb-chat-panel.nrb-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

#nrb-chat-header {
  background: #2D3A6B;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

#nrb-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

#nrb-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F47920;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#nrb-chat-avatar svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
}

#nrb-chat-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

#nrb-chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  margin-top: 1px;
}

#nrb-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7CAA2D;
  display: inline-block;
}

#nrb-chat-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.15s;
}

#nrb-chat-close:hover { opacity: 1; }
#nrb-chat-close svg { width: 16px; height: 16px; stroke: #fff; }

#nrb-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

#nrb-chat-messages::-webkit-scrollbar { width: 4px; }
#nrb-chat-messages::-webkit-scrollbar-track { background: transparent; }
#nrb-chat-messages::-webkit-scrollbar-thumb { background: #e0e4f0; border-radius: 2px; }

.nrb-msg { display: flex; animation: nrb-msg-in 0.18s ease-out; }
@keyframes nrb-msg-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

.nrb-msg-user { justify-content: flex-end; }
.nrb-msg-bot { justify-content: flex-start; }

.nrb-msg-bubble {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.6;
  font-weight: 300;
}

.nrb-msg-user .nrb-msg-bubble {
  background: #F47920;
  color: #fff;
  border-bottom-right-radius: 3px;
}

.nrb-msg-bot .nrb-msg-bubble {
  background: #f0f2f8;
  color: #2D3A6B;
  border-bottom-left-radius: 3px;
}

.nrb-typing { display:flex; align-items:center; gap:4px; padding:12px 16px !important; }
.nrb-typing span { width:6px; height:6px; border-radius:50%; background:#F47920; animation:nrb-bounce 1.2s infinite; }
.nrb-typing span:nth-child(2) { animation-delay:0.2s; }
.nrb-typing span:nth-child(3) { animation-delay:0.4s; }
@keyframes nrb-bounce { 0%,60%,100% { transform:translateY(0); opacity:0.4; } 30% { transform:translateY(-5px); opacity:1; } }

#nrb-chat-suggestions {
  padding: 0 12px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.nrb-suggestion {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: #2D3A6B;
  background: #eef0f8;
  border: 1px solid #d0d5e8;
  border-radius: 20px;
  padding: 5px 11px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.nrb-suggestion:hover {
  background: #2D3A6B;
  color: #fff;
  border-color: #2D3A6B;
}

#nrb-chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e8eaf0;
  flex-shrink: 0;
}

#nrb-chat-input {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 300;
  color: #2D3A6B;
  background: #f0f2f8;
  border: 1px solid #e0e4f0;
  border-radius: 6px;
  padding: 8px 12px;
  resize: none;
  outline: none;
  line-height: 1.5;
  max-height: 100px;
  transition: border-color 0.2s;
}

#nrb-chat-input:focus { border-color: #2D3A6B; }
#nrb-chat-input::placeholder { color: #9aa0b8; }

#nrb-chat-send {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #F47920;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

#nrb-chat-send:hover { background: #d4640f; }
#nrb-chat-send svg { width: 15px; height: 15px; stroke: #fff; }

#nrb-chat-footer {
  font-size: 0.65rem;
  color: #a0a8c0;
  text-align: center;
  padding: 5px 12px 8px;
  flex-shrink: 0;
}

#nrb-chat-footer a { color: #7CAA2D; text-decoration: none; }

@media (max-width: 480px) {
  #nrb-chat-widget { bottom: 16px; right: 16px; }
  #nrb-chat-panel { width: calc(100vw - 32px); right: 0; max-height: 70vh; }
}
