/* NaviGo Chat Widget — Brand UI v2 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Inter:wght@400;500&display=swap');

/* ── Floating Button ── */
#navigo-chat-btn {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #1E90FF 0%, #050A14 100%);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(30,144,255,0.5);
  z-index: 9997;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  outline: none;
}
#navigo-chat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 32px rgba(30,144,255,0.7);
}
#navigo-chat-btn svg { width: 26px; height: 26px; fill: white; }
#navigo-chat-btn::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 12px;
  height: 12px;
  background: #00E676;
  border-radius: 50%;
  border: 2px solid white;
  animation: ngPulse 2s infinite;
}
@keyframes ngPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

/* ── Chat Window ── */
#navigo-chat-window {
  position: fixed;
  bottom: 160px;
  right: 24px;
  width: 360px;
  height: 545px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(5,10,20,0.2), 0 0 0 1px rgba(30,144,255,0.08);
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: ngChatSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Inter', system-ui, sans-serif;
}
#navigo-chat-window.open { display: flex; }
@keyframes ngChatSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Header ── */
.ng-chat-header {
  background: linear-gradient(135deg, #050A14 0%, #071a35 55%, #0d3870 100%);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(30,144,255,0.25);
}
.ng-chat-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231E90FF' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

/* ── Avatar (Logo) ── */
.ng-chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(30,144,255,0.45);
  background: #0a1f3d;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.ng-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Header Text ── */
.ng-chat-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.ng-chat-info h3 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  font-family: 'Montserrat', system-ui, sans-serif;
  letter-spacing: 0.01em;
}
.ng-chat-info p {
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  margin: 3px 0 0;
  font-family: 'Inter', system-ui, sans-serif;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Online Dot ── */
.ng-online-dot {
  width: 7px;
  height: 7px;
  background: #00E676;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(0,230,118,0.8);
  animation: ngBlink 2.5s infinite;
}
@keyframes ngBlink {
  0%, 90%, 100% { opacity: 1; }
  95% { opacity: 0.4; }
}

/* ── Close Button ── */
.ng-chat-close {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 7px;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  padding: 0;
}
.ng-chat-close:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.3);
  color: white;
}
.ng-chat-close svg { pointer-events: none; }

/* ── Messages Area ── */
.ng-chat-messages {
  flex: 1;
  padding: 14px 14px 8px;
  overflow-y: auto;
  background: #f4f7fb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ng-chat-messages::-webkit-scrollbar { width: 3px; }
.ng-chat-messages::-webkit-scrollbar-thumb { background: #d0dae8; border-radius: 3px; }

/* ── Bot Message ── */
.ng-message.bot {
  background: #ffffff;
  color: #0a1628;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(5,10,20,0.07);
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid rgba(30,144,255,0.08);
}

/* ── User Message ── */
.ng-message.user {
  background: linear-gradient(135deg, #1E90FF 0%, #0d5fc4 100%);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  max-width: 80%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 2px 12px rgba(30,144,255,0.3);
}

/* ── Typing ── */
.ng-typing {
  display: flex;
  gap: 4px;
  padding: 11px 14px;
  background: white;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(5,10,20,0.07);
  border: 1px solid rgba(30,144,255,0.08);
}
.ng-typing span {
  width: 6px;
  height: 6px;
  background: #1E90FF;
  border-radius: 50%;
  animation: ngBounce 1.2s infinite;
}
.ng-typing span:nth-child(2) { animation-delay: 0.18s; }
.ng-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes ngBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* ── Quick Replies ── */
.ng-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px 4px;
  background: #f4f7fb;
}
.ng-qr-btn {
  background: white;
  border: 1.5px solid rgba(30,144,255,0.4);
  color: #1E90FF;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'Inter', system-ui, sans-serif;
  box-shadow: 0 1px 4px rgba(30,144,255,0.1);
}
.ng-qr-btn:hover {
  background: #1E90FF;
  color: white;
  border-color: #1E90FF;
  box-shadow: 0 2px 8px rgba(30,144,255,0.35);
}

/* ── Input Area ── */
.ng-chat-input-area {
  padding: 10px 12px;
  background: white;
  border-top: 1px solid #e8eef6;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.ng-chat-input-area input {
  flex: 1;
  border: 1.5px solid #e0e8f4;
  border-radius: 22px;
  padding: 9px 15px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: 'Inter', system-ui, sans-serif;
  background: #f8fafc;
  color: #0a1628;
}
.ng-chat-input-area input::placeholder { color: #9baec8; }
.ng-chat-input-area input:focus {
  border-color: #1E90FF;
  background: white;
  box-shadow: 0 0 0 3px rgba(30,144,255,0.1);
}
.ng-chat-send {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #1E90FF, #050A14);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(30,144,255,0.35);
}
.ng-chat-send:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(30,144,255,0.5);
}
.ng-chat-send svg { width: 15px; height: 15px; fill: white; }

/* ── Powered By ── */
.ng-powered {
  text-align: center;
  padding: 5px 12px 7px;
  font-size: 10.5px;
  color: #9baec8;
  background: white;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: 0.01em;
}
.ng-powered a { color: #1E90FF; text-decoration: none; font-weight: 600; }
.ng-powered a:hover { text-decoration: underline; }

/* ── Mobile ── */
@media (max-width: 480px) {
  #navigo-chat-window { width: calc(100vw - 20px); right: 10px; bottom: 150px; }
}
