/* ==========================================================================
   RCS & ASSOCIATES - PROMINENT FLOATING LEGAL CHATBOT WIDGET
   Bilingual Interactive Chambers Assistant (English & Hindi)
   ========================================================================== */

:root {
  --rcs-chat-navy: #0b1a30;
  --rcs-chat-navy-dark: #06101e;
  --rcs-chat-navy-light: #162b4d;
  --rcs-chat-gold: #c59b27;
  --rcs-chat-gold-light: #dfb743;
  --rcs-chat-gold-dark: #9f7220;
  --rcs-chat-bg: #f8f9fa;
  --rcs-chat-border: #e2e8f0;
  --rcs-chat-text: #1e293b;
  --rcs-chat-muted: #64748b;
  --rcs-chat-whatsapp: #25d366;
  --rcs-chat-shadow: 0 16px 40px rgba(11, 26, 48, 0.28);
}

/* Hide legacy floating call & whatsapp dock buttons */
.btn-floating-whatsapp,
.btn-floating-call {
  display: none !important;
}

/* Floating Navigation Dock (Holds only Scroll-to-Top at the very bottom right) */
.floating-actions-container {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 999998 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

/* Floating Chatbot Launcher Container (Positioned directly ABOVE Scroll-to-Top) */
.rcs-chat-widget {
  position: fixed !important;
  bottom: 84px !important;
  right: 24px !important;
  z-index: 9999999 !important;
  display: block !important;
  font-family: "Plus Jakarta Sans", "Noto Sans Devanagari", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  user-select: none;
}

/* Prominent Floating Pill Launcher Button */
.rcs-chat-launcher-btn {
  height: 52px !important;
  padding: 0 20px 0 16px !important;
  border-radius: 30px !important;
  background: linear-gradient(135deg, #0b1a30 0%, #162b4d 50%, #c59b27 150%) !important;
  color: #ffffff !important;
  border: 2px solid rgba(197, 155, 39, 0.6) !important;
  box-shadow: 0 10px 28px rgba(11, 26, 48, 0.45), 0 4px 12px rgba(197, 155, 39, 0.25) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  position: relative !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
  outline: none !important;
  text-decoration: none !important;
}

.rcs-chat-launcher-btn:hover {
  transform: translateY(-3px) scale(1.03) !important;
  box-shadow: 0 14px 34px rgba(11, 26, 48, 0.6), 0 6px 16px rgba(197, 155, 39, 0.4) !important;
  border-color: #dfb743 !important;
}

.rcs-chat-launcher-btn:active {
  transform: scale(0.97) !important;
}

.rcs-chat-launcher-icon {
  font-size: 1.25rem !important;
  color: #dfb743 !important;
  line-height: 1 !important;
}

.rcs-chat-launcher-text {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  letter-spacing: -0.2px !important;
}

/* Online Pulse Dot */
.rcs-chat-pulse-indicator {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  display: flex;
}

.rcs-chat-pulse-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #10b981;
  opacity: 0.75;
  animation: rcs-chat-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.rcs-chat-pulse-dot {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #10b981;
  border: 2px solid #ffffff;
}

@keyframes rcs-chat-ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Launcher Tooltip */
.rcs-chat-launcher-tooltip {
  position: absolute;
  right: 0;
  bottom: 64px;
  background: var(--rcs-chat-navy);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  border: 1px solid rgba(197, 155, 39, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.rcs-chat-launcher-tooltip::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 24px;
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: var(--rcs-chat-navy) transparent transparent transparent;
}

.rcs-chat-widget:hover .rcs-chat-launcher-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-4px);
}

/* Chat Dialog Panel */
.rcs-chat-dialog-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 388px;
  max-width: calc(100vw - 32px);
  height: 570px;
  max-height: calc(100vh - 110px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--rcs-chat-shadow);
  border: 1px solid rgba(197, 155, 39, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  transform-origin: bottom right;
}

.rcs-chat-widget.active .rcs-chat-dialog-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.rcs-chat-widget.active .rcs-chat-launcher-tooltip {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Chat Header */
.rcs-chat-header {
  background: var(--rcs-chat-navy);
  color: #ffffff;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--rcs-chat-gold);
}

.rcs-chat-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rcs-chat-avatar-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  flex-shrink: 0;
}

.rcs-chat-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.rcs-chat-header-info h4 {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.rcs-chat-header-info span {
  font-size: 0.72rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rcs-chat-header-info span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.rcs-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rcs-chat-header-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.rcs-chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* Quick Action Top Bar */
.rcs-chat-quick-actions {
  background: #f1f5f9;
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--rcs-chat-border);
  overflow-x: auto;
  scrollbar-width: thin;
}

.rcs-chat-quick-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--rcs-chat-navy);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.rcs-chat-quick-btn:hover {
  background: var(--rcs-chat-navy);
  color: #ffffff;
  border-color: var(--rcs-chat-navy);
}

.rcs-chat-quick-btn i {
  color: var(--rcs-chat-gold);
}

.rcs-chat-quick-btn:hover i {
  color: var(--rcs-chat-gold-light);
}

/* High Yield Auto-Sliding Topics Bar */
.rcs-chat-topics-bar {
  background: #f8fafc;
  border-bottom: 1px solid var(--rcs-chat-border);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  position: relative;
}

.rcs-topics-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--rcs-chat-navy);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  background: #fef3c7;
  border: 1px solid rgba(197, 155, 39, 0.4);
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: -0.1px;
}

.rcs-topics-badge i {
  color: #c59b27;
}

.rcs-topics-slider {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 8px, black calc(100% - 8px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8px, black calc(100% - 8px), transparent);
}

.rcs-topics-track {
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
  animation: rcs-slide-ticker 30s linear infinite;
  will-change: transform;
}

.rcs-topics-slider:hover .rcs-topics-track,
.rcs-topics-slider:active .rcs-topics-track {
  animation-play-state: paused;
}

.rcs-topic-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--rcs-chat-navy);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.18s ease;
  user-select: none;
  text-decoration: none;
  line-height: 1.3;
}

.rcs-topic-pill:hover {
  background: var(--rcs-chat-navy);
  color: #ffffff;
  border-color: var(--rcs-chat-navy);
  transform: translateY(-1px);
}

.rcs-topic-pill i {
  color: var(--rcs-chat-gold);
}

.rcs-topic-pill:hover i {
  color: var(--rcs-chat-gold-light);
}

@keyframes rcs-slide-ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Messages Body */
.rcs-chat-messages {
  flex: 1;
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
  scroll-behavior: smooth;
}

.rcs-chat-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 88%;
}

.rcs-chat-msg-row.user {
  align-self: flex-end;
}

.rcs-chat-msg-row.bot {
  align-self: flex-start;
}

.rcs-chat-bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  word-break: break-word;
}

.rcs-chat-msg-row.user .rcs-chat-bubble {
  background: var(--rcs-chat-navy);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.rcs-chat-msg-row.bot .rcs-chat-bubble {
  background: #ffffff;
  color: var(--rcs-chat-text);
  border: 1px solid var(--rcs-chat-border);
  border-bottom-left-radius: 2px;
}

.rcs-chat-msg-row.bot .rcs-chat-bubble strong {
  color: var(--rcs-chat-navy);
}

.rcs-chat-chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.rcs-chat-chip-btn {
  background: #ffffff;
  border: 1px solid var(--rcs-chat-gold);
  color: var(--rcs-chat-navy);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.rcs-chat-chip-btn:hover {
  background: var(--rcs-chat-gold);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Link Cards inside chat */
.rcs-chat-link-card {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 8px;
  background: #fdfbf7;
  border: 1px solid rgba(197, 155, 39, 0.4);
  color: #875c12;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.18s ease;
}

.rcs-chat-link-card:hover {
  background: #fef3c7;
  color: #78350f;
  border-color: #c59b27;
  transform: translateY(-1px);
}

/* Typing Indicator */
.rcs-chat-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 14px;
  border-bottom-left-radius: 2px;
  border: 1px solid var(--rcs-chat-border);
  width: fit-content;
  align-self: flex-start;
}

.rcs-chat-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rcs-chat-muted);
  animation: rcs-chat-bounce 1.4s infinite ease-in-out both;
}

.rcs-chat-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.rcs-chat-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes rcs-chat-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Input Footer */
.rcs-chat-footer {
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid var(--rcs-chat-border);
}

.rcs-chat-input-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rcs-chat-input-field {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rcs-chat-input-field:focus {
  border-color: var(--rcs-chat-gold);
  box-shadow: 0 0 0 3px rgba(197, 155, 39, 0.15);
}

.rcs-chat-send-btn {
  background: var(--rcs-chat-navy);
  color: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.rcs-chat-send-btn:hover {
  background: var(--rcs-chat-gold-dark);
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .floating-actions-container {
    bottom: 16px !important;
    right: 16px !important;
  }
  .rcs-chat-widget {
    bottom: 74px !important;
    right: 16px !important;
  }
  .rcs-chat-launcher-btn {
    height: 48px !important;
    padding: 0 16px 0 12px !important;
  }
  .rcs-chat-launcher-text {
    font-size: 0.84rem !important;
  }
  .rcs-chat-dialog-panel {
    bottom: 62px;
    right: 0;
    width: calc(100vw - 32px);
    height: 510px;
  }
}
