/* assets/css/chat-widget.css */
:root {
  --chat-primary: #0a2e6e;
  --chat-secondary: #D86A0E;
  --chat-bg: #ffffff;
  --chat-glass: rgba(255, 255, 255, 0.95);
  --chat-shadow: 0 12px 28px 0 rgba(0, 0, 0, 0.2), 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  --font-family: 'Montserrat', sans-serif;
}

/* Floating Action Button (FAB) */
.chat-fab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--chat-primary), #0056b3);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(10, 46, 110, 0.4);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-fab:hover {
  transform: scale(1.1);
}

.chat-fab .chat-fab-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ... (Pulse Animation kept same) ... */

/* Chat Modal Window */
.chat-window {
  position: fixed;
  bottom: 90px;
  left: 20px;
  width: 380px;
  height: 600px;
  max-height: 80vh;
  background-color: var(--chat-bg);
  border-radius: 20px;
  box-shadow: var(--chat-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  transform-origin: bottom left;
  transform: scale(0);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  font-family: var(--font-family);
}

.chat-window.open {
  transform: scale(1);
  opacity: 1;
}

/* Header */
.chat-header {
  background: var(--chat-primary);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
}

.chat-title h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chat-title span {
  font-size: 12px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #2ecc71;
  border-radius: 50%;
  display: inline-block;
}

.chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.chat-close:hover {
  opacity: 1;
}

/* Messages Area */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: #f4f6f9;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
  word-wrap: break-word;
}

.message.bot {
  align-self: flex-start;
  background-color: white;
  color: #333;
  border-bottom-left-radius: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message.user {
  align-self: flex-end;
  background-color: var(--chat-primary);
  color: white;
  border-bottom-right-radius: 2px;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background-color: white;
  border-radius: 12px;
  border-bottom-left-radius: 2px;
  width: fit-content;
  align-self: flex-start;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: #bbb;
  border-radius: 50%;
  animation: typing 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 typing {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* Input Area */
.chat-input-area {
  padding: 15px;
  background-color: white;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 25px;
  padding: 12px 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
  font-family: inherit;
}

.chat-input:focus {
  border-color: var(--chat-primary);
}

.chat-send-btn {
  background-color: var(--chat-primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  transition: background-color 0.3s;
}

.chat-send-btn:hover {
  background-color: #001f4d;
}

/* Responsive */
@media (max-width: 480px) {
  .chat-window {
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }

  .chat-header {
    border-radius: 0;
  }
}