/* ThaNag Car Bot Styles */
.thanag-chatbot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: var(--font-primary);
}

/* Chatbot Toggle Button */
.chatbot-toggle {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1001;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
}

.thanag-chatbot.active .chatbot-toggle {
  transform: scale(0.95);
}

.circular-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #dc2626, #ea580c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
  border: 2px solid #ffffff;
}

.circular-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  pointer-events: none;
}

.circular-text-path-top,
.circular-text-path-bottom {
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.circular-text-path-top {
  fill: #ffffff;
}

.circular-text-path-bottom {
  fill: #ffffff;
}

@keyframes rotate-text {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.bot-avatar {
  position: relative;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-logo {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: contain;
}

.bot-pulse {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: pulse-ring 3s ease-out infinite;
  opacity: 0.4;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes gentle-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Remove toggle text styles as we're using circular text now */

/* Chatbot Window */
.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 500px;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-window.show {
  transform: translateY(0);
  opacity: 1;
}

/* Header */
.chatbot-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bot-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.bot-avatar-header {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.bot-details h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.chatbot-close {
  background: none;
  border: none;
  color: white;
  font-size: var(--fs-2xl);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Messages Area */
.chatbot-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: #f8fafc;
}

.message {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  flex-shrink: 0;
}

.message-content {
  flex: 1;
}

.message-bubble {
  background: white;
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-line;
  animation: slide-up 0.3s ease-out;
}

.message.user .message-bubble {
  background: var(--primary-color);
  color: white;
  margin-left: var(--spacing-lg);
}

.message.bot .message-bubble {
  margin-right: var(--spacing-lg);
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Quick Actions */
.chatbot-input {
  padding: var(--spacing-md);
  background: white;
  border-top: 1px solid #e5e7eb;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-action-btn {
  background: white;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  flex: 0 0 auto;
}

.quick-action-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

/* Hint Bubble Styles */
.chat-hint-bubble {
  position: absolute;
  bottom: 100px;
  right: 0;
  width: 280px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 2px solid #dc2626;
  z-index: 999;
  animation: slideInUp 0.5s ease-out;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chat-hint-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.hint-content {
  position: relative;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hint-text {
  flex: 1;
  font-size: 14px;
  color: #333;
  font-weight: 600;
  line-height: 1.4;
}

.hint-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.hint-close:hover {
  background: #f3f4f6;
  color: #333;
}

.chat-hint-bubble::before {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 16px;
  height: 16px;
  background: white;
  border-right: 2px solid #dc2626;
  border-bottom: 2px solid #dc2626;
  transform: rotate(45deg);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive for hint bubble */
@media (max-width: 768px) {
  .chat-hint-bubble {
    width: 250px;
    bottom: 95px;
    right: -10px;
  }
  
  .hint-text {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .chat-hint-bubble {
    width: 220px;
    bottom: 85px;
    right: -15px;
  }
  
  .hint-content {
    padding: 10px 12px;
  }
  
  .hint-text {
    font-size: 12px;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .thanag-chatbot {
    right: 15px;
    bottom: 15px;
  }
  
  .chatbot-toggle {
    width: 70px;
    height: 70px;
  }
  
  .circular-avatar {
    width: 70px;
    height: 70px;
  }
  
  .circular-text {
    width: 66px;
    height: 66px;
    top: 2px;
    left: 2px;
  }
  
  .circular-text-path-top,
  .circular-text-path-bottom {
    font-size: 8px;
  }
  
  .bot-avatar {
    width: 32px;
    height: 32px;
  }
  
  .bot-logo {
    width: 25px;
    height: 25px;
  }
  
  .chatbot-window {
    width: calc(100vw - 30px);
    height: 450px;
    bottom: 90px;
    right: -5px;
  }
  
  .quick-action-btn {
    font-size: 10px;
    padding: 4px 8px;
  }
}

@media (max-width: 480px) {
  .chatbot-toggle {
    width: 60px;
    height: 60px;
  }
  
  .circular-avatar {
    width: 60px;
    height: 60px;
  }
  
  .circular-text {
    width: 56px;
    height: 56px;
    top: 2px;
    left: 2px;
  }
  
  .circular-text-path-top,
  .circular-text-path-bottom {
    font-size: 7px;
  }
  
  .bot-avatar {
    width: 28px;
    height: 28px;
  }
  
  .bot-logo {
    width: 22px;
    height: 22px;
  }
  
  .chatbot-window {
    width: calc(100vw - 20px);
    height: 400px;
    right: -10px;
    bottom: 75px;
  }
}

/* Custom Scrollbar */
.chatbot-messages::-webkit-scrollbar {
  width: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 2px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}
