/* iGlobal AI Chatbot Styles */
.ig-chat-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1B3A6B 0%, #1e4db7 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(27, 58, 107, 0.4);
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  border: none;
  outline: none;
}
.ig-chat-float:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(27, 58, 107, 0.5);
}
.ig-chat-float svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ig-chat-float .close-icon {
  display: none;
}
.ig-chat-float.open .chat-icon {
  display: none;
}
.ig-chat-float.open .close-icon {
  display: block;
}

/* Chat Modal */
.ig-chat-modal {
  position: fixed;
  bottom: 95px;
  right: 22px;
  width: 380px;
  height: 600px;
  max-height: calc(100vh - 120px);
  max-width: calc(100vw - 44px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.ig-chat-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Chat Header */
.ig-chat-header {
  background: linear-gradient(135deg, #1B3A6B 0%, #1e4db7 100%);
  padding: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 3px solid #F47920;
}
.ig-chat-header .bot-avatar {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F47920;
}
.ig-chat-header .bot-avatar svg {
  width: 24px;
  height: 24px;
}
.ig-chat-header .bot-info h3 {
  color: #fff;
  margin: 0;
  font-size: 1.1em;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}
.ig-chat-header .bot-info p {
  margin: 0;
  font-size: 0.8em;
  color: rgba(255,255,255,0.8);
}

/* Chat Body */
.ig-chat-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.chat-msg.user {
  align-self: flex-end;
}
.chat-msg.bot {
  align-self: flex-start;
}
.msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95em;
  line-height: 1.5;
}
.chat-msg.user .msg-bubble {
  background: #F47920;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.bot .msg-bubble {
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

/* Markdown styling inside bot bubble */
.msg-bubble p { margin: 0 0 10px; }
.msg-bubble p:last-child { margin: 0; }
.msg-bubble ul, .msg-bubble ol { margin: 0 0 10px; padding-left: 20px; }
.msg-bubble li { margin-bottom: 4px; }
.msg-bubble strong { font-weight: 700; color: #1B3A6B; }

/* Typing Indicator */
.typing-indicator {
  display: none;
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  gap: 4px;
  align-items: center;
}
.typing-indicator.active { display: flex; }
.typing-dot {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Chat Input */
.ig-chat-footer {
  padding: 16px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}
.ig-chat-input-form {
  display: flex;
  gap: 10px;
}
.ig-chat-input-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 24px;
  font-family: inherit;
  font-size: 0.95em;
  outline: none;
  transition: border-color 0.2s;
}
.ig-chat-input-form input:focus {
  border-color: #F47920;
}
.ig-chat-input-form button {
  background: #F47920;
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.ig-chat-input-form button:hover {
  background: #ea580c;
  transform: scale(1.05);
}
.ig-chat-input-form button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
