/* ══════════════════════════════════════════════════════════════
   CHAUDHARY TAXI SERVICE AGRA — AI Chatbot Assistant CSS
   ══════════════════════════════════════════════════════════════ */

/* Floating Launcher Button */
.ctsa-bot-launcher {
  position: fixed;
  bottom: 110px;
  left: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.ctsa-bot-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #d97706 100%);
  color: #ffffff;
  border: 2px solid #f59e0b;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.45), 0 0 20px rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  padding: 0;
}

.ctsa-bot-btn img.ctsa-bot-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.ctsa-bot-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.55), 0 0 25px rgba(245, 158, 11, 0.6);
  border-color: #f59e0b;
}

.ctsa-bot-badge-online {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #10b981;
  border: 2.5px solid #0f172a;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  z-index: 2;
}

.ctsa-bot-tooltip {
  background: #0f172a;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.4);
  white-space: nowrap;
  animation: floatTooltip 3s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctsa-bot-tooltip i {
  color: #f59e0b;
}

@keyframes floatTooltip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Chatbot Window */
.ctsa-chat-window {
  position: fixed;
  bottom: 180px;
  left: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 200px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom left;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}


.ctsa-chat-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Header */
.ctsa-chat-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #f59e0b;
}

.ctsa-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctsa-chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
  flex-shrink: 0;
  overflow: hidden;
}

.ctsa-chat-avatar img.ctsa-header-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}


.ctsa-chat-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.ctsa-chat-status {
  font-size: 0.75rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.ctsa-chat-status::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

.ctsa-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctsa-chat-btn-icon {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.ctsa-chat-btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Chat Messages Container */
.ctsa-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Message Bubble */
.ctsa-msg {
  display: flex;
  gap: 10px;
  max-width: 88%;
  animation: fadeInMsg 0.25s ease-out;
}

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

.ctsa-msg-bot {
  align-self: flex-start;
}

.ctsa-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ctsa-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0f172a;
  border: 1.5px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  overflow: hidden;
  margin-top: 2px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.ctsa-msg-avatar img.ctsa-msg-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.ctsa-msg-bubble {
  padding: 12px 15px;
  border-radius: 16px;
  font-size: 0.89rem;
  line-height: 1.48;
  position: relative;
  word-break: break-word;
}


.ctsa-msg-bot .ctsa-msg-bubble {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-top-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ctsa-msg-user .ctsa-msg-bubble {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.ctsa-msg-time {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 4px;
  text-align: right;
}

.ctsa-msg-user .ctsa-msg-time {
  color: rgba(255, 255, 255, 0.7);
}

/* Bot Rich Content Elements */
.ctsa-bot-highlight {
  color: #b45309;
  font-weight: 700;
}

.ctsa-bot-list {
  margin: 6px 0;
  padding-left: 16px;
  font-size: 0.84rem;
}

.ctsa-bot-list li {
  margin-bottom: 4px;
}

.ctsa-bot-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ctsa-bot-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ctsa-bot-cta-phone {
  background: #0284c7;
  color: #ffffff;
}
.ctsa-bot-cta-phone:hover {
  background: #0369a1;
  color: #ffffff;
}

.ctsa-bot-cta-wa {
  background: #25d366;
  color: #ffffff;
}
.ctsa-bot-cta-wa:hover {
  background: #1eb857;
  color: #ffffff;
}

.ctsa-bot-cta-tour {
  background: #f59e0b;
  color: #0f172a;
}
.ctsa-bot-cta-tour:hover {
  background: #d97706;
  color: #ffffff;
}

/* Typing Indicator */
.ctsa-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  border-top-left-radius: 4px;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ctsa-typing-dot {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.ctsa-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ctsa-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Quick Suggestion Pills */
.ctsa-quick-pills {
  padding: 8px 16px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.ctsa-quick-pills::-webkit-scrollbar {
  display: none;
}

.ctsa-pill-btn {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 6px 11px;
  border-radius: 16px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ctsa-pill-btn:hover {
  background: #0f172a;
  color: #f59e0b;
  border-color: #0f172a;
  transform: translateY(-1px);
}

/* Chat Input Bar */
.ctsa-chat-input-bar {
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctsa-chat-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: #1e293b;
  background: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.ctsa-chat-input:focus {
  border-color: #f59e0b;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.ctsa-chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a, #d97706);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ctsa-chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.ctsa-chat-send-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ctsa-bot-launcher {
    bottom: 80px;
    left: 16px;
  }
  .ctsa-bot-btn {
    width: 54px;
    height: 54px;
    font-size: 1.3rem;
  }
  .ctsa-bot-tooltip {
    display: none;
  }
  .ctsa-chat-window {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
}
