/* ==========================================================================
   ROHITROHIT.COM - INTERACTIVE CHATBOT WIDGET STYLESHEET
   Brand Aligned With RohitRohit Navy, Tech Blue, Health Emerald & Gold Palette
   Strictly Zero Em-Dashes and En-Dashes
   ========================================================================== */

:root {
  --chat-brand-grad: linear-gradient(135deg, #0B1A2C 0%, #12263D 35%, #1F55A8 72%, #13705C 100%);
  --chat-brand-grad-hover: linear-gradient(135deg, #081422 0%, #0D1C2E 35%, #184486 72%, #0E5646 100%);
  --chat-primary: #0B1A2C;
  --chat-primary-hover: #12263D;
  --chat-tech: #1F55A8;
  --chat-health: #13705C;
  --chat-gold: #7A5218;
  --chat-gold-bright: #D8A95E;
  --chat-dark: #0B1A2C;
  --chat-dark-surface: #12263D;
  --chat-bg-bubble: #F7F5F0;
  --chat-border: #E2DDD2;
  --chat-border-dark: rgba(255, 255, 255, 0.12);
  --chat-text: #0F1A2A;
  --chat-text-muted: #5A6577;
  --chat-accent-green: #10b981;
}

/* Floating Launcher Container */
.rohit-chat-widget,
.webyfied-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  user-select: none;
}

/* Floating Launcher Toggle Button */
.chat-launcher-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--chat-brand-grad);
  color: #ffffff;
  border: 2px solid rgba(216, 169, 94, 0.55);
  box-shadow: 0 10px 28px -5px rgba(11, 26, 44, 0.45), 0 8px 14px -6px rgba(31, 85, 168, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.2s ease;
  outline: none;
}

.chat-launcher-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 16px 36px -5px rgba(11, 26, 44, 0.55), 0 10px 20px -4px rgba(31, 85, 168, 0.45);
  border-color: var(--chat-gold-bright);
}

.chat-launcher-btn:active {
  transform: scale(0.95);
}

.rohit-chat-widget.chat-open .chat-launcher-btn,
.webyfied-chat-widget.chat-open .chat-launcher-btn,
.chat-launcher-btn.chat-launcher-hidden {
  opacity: 0 !important;
  transform: scale(0.4) !important;
  pointer-events: none !important;
  visibility: hidden !important;
  display: none !important;
}

/* Chatbot SVG Icon inside Launcher */
.chat-launcher-svg {
  width: 28px;
  height: 28px;
  stroke: #ffffff;
  stroke-width: 2;
  transition: transform 0.25s ease;
}

.chat-launcher-btn:hover .chat-launcher-svg {
  transform: scale(1.1);
}

/* Online Pulse Dot */
.chat-pulse-indicator {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  display: flex;
}

.chat-pulse-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--chat-gold-bright);
  opacity: 0.75;
  animation: chat-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.chat-pulse-dot {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--chat-accent-green);
  border: 2px solid #ffffff;
}

@keyframes chat-ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Tooltip Badge on Initial Visit */
.chat-launcher-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: #0B1A2C;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 10px 20px -3px rgba(11, 26, 44, 0.4), 0 4px 12px rgba(31, 85, 168, 0.3);
  border: 1px solid rgba(216, 169, 94, 0.5);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: chat-bounce 2.2s infinite ease-in-out;
  pointer-events: none;
}

.chat-launcher-tooltip svg {
  width: 14px;
  height: 14px;
  color: var(--chat-gold-bright);
}

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

/* Dialogue Window Container */
.chat-dialog-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 610px;
  max-height: calc(100vh - 48px);
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--chat-border);
  box-shadow: 0 20px 48px -15px rgba(11, 26, 44, 0.35), 0 0 0 1px rgba(11, 26, 44, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
}

.chat-dialog-panel.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Chat Header */
.chat-header {
  padding: 14px 18px;
  background: var(--chat-brand-grad);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

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

.chat-header-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.chat-header-bot-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(216, 169, 94, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.chat-header-bot-icon svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
}

.chat-header-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--chat-accent-green);
  border: 2px solid #0B1A2C;
}

.chat-header-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.chat-header-subtitle {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: #D8A95E;
  font-weight: 550;
  line-height: 1.2;
}

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

.chat-action-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  outline: none;
}

.chat-action-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.chat-action-btn:active {
  transform: scale(0.92);
}

/* Persistent Human / WhatsApp Bar */
.chat-human-bar {
  padding: 7px 14px;
  background: #0E5646;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.chat-human-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.chat-human-btn:hover {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.chat-human-wa-icon {
  width: 14px;
  height: 14px;
  fill: #25D366;
  flex-shrink: 0;
}

.chat-human-arrow {
  width: 13px;
  height: 13px;
  stroke: #ffffff;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.chat-human-btn:hover .chat-human-arrow {
  transform: translateX(3px);
}

/* Messages Scrollable Area */
.chat-messages-container {
  flex: 1;
  padding: 16px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #FAF8F5;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.chat-messages-container::-webkit-scrollbar {
  width: 6px;
}

.chat-messages-container::-webkit-scrollbar-thumb {
  background: rgba(11, 26, 44, 0.18);
  border-radius: 10px;
}

/* Message Rows */
.chat-msg-row {
  display: flex;
  max-width: 90%;
  animation: chat-fade-in 0.25s ease-out;
}

@keyframes chat-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg-row.user {
  align-self: flex-end;
  flex-direction: column;
  align-items: flex-end;
}

.chat-msg-row.assistant {
  align-self: flex-start;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

/* Chatbot Avatar for Assistant Messages */
.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--chat-brand-grad);
  border: 1px solid rgba(216, 169, 94, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
  box-shadow: 0 2px 6px rgba(11, 26, 44, 0.18);
}

.chat-msg-avatar svg {
  width: 15px;
  height: 15px;
  stroke: #ffffff;
}

.chat-msg-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* Category Badge */
.chat-msg-category {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--chat-tech);
  margin-bottom: 4px;
  padding: 2px 6px;
  background: #E8EEF8;
  border-radius: 4px;
  border: 1px solid #CFDDF2;
  align-self: flex-start;
}

/* Chat Bubbles */
.chat-bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.55;
  word-break: break-word;
}

.chat-msg-row.user .chat-bubble {
  background: var(--chat-primary);
  color: #ffffff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 10px rgba(11, 26, 44, 0.2);
}

.chat-msg-row.user .chat-bubble p {
  margin: 0;
  color: #ffffff;
}

.chat-msg-row.assistant .chat-bubble {
  background: #ffffff;
  color: var(--chat-text);
  border: 1px solid var(--chat-border);
  border-bottom-left-radius: 3px;
  box-shadow: 0 2px 8px rgba(11, 26, 44, 0.06);
}

.chat-msg-row.assistant .chat-bubble p {
  margin: 0 0 8px 0;
}

.chat-msg-row.assistant .chat-bubble p:last-child {
  margin-bottom: 0;
}

/* Quote Block inside Bubble */
.chat-quote-block {
  margin: 8px 0 4px 0;
  padding: 8px 10px;
  background: #F5EBDB;
  border-left: 3px solid var(--chat-gold-bright);
  border-radius: 4px;
  font-style: italic;
  font-size: 0.82rem;
  color: #523710;
  line-height: 1.45;
}

.chat-quote-source {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--chat-gold);
  margin-top: 4px;
}

/* Link inside Assistant Bubble */
.chat-link-box {
  margin-top: 8px;
}

.chat-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #E8EEF8;
  color: var(--chat-tech);
  border: 1px solid #CFDDF2;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.chat-action-link:hover {
  background: #D5E4F8;
  border-color: var(--chat-tech);
  color: #123A73;
  transform: translateY(-1px);
}

.chat-action-link.whatsapp-link {
  background: #E4F1EC;
  color: #0E5646;
  border-color: #B5DFC0;
}

.chat-action-link.whatsapp-link:hover {
  background: #D2EBDC;
  border-color: #0E5646;
  color: #0A3D32;
}

/* Suggested Followup Chips */
.chat-followups-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chat-chip-btn {
  background: #ffffff;
  color: #1F55A8;
  border: 1px solid #CFDDF2;
  border-radius: 9999px;
  padding: 5px 11px;
  font-size: 0.74rem;
  font-weight: 550;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.3;
  text-align: left;
}

.chat-chip-btn:hover {
  background: #1F55A8;
  color: #ffffff;
  border-color: #1F55A8;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(31, 85, 168, 0.2);
}

.chat-chip-btn:active {
  transform: scale(0.96);
}

/* Typing Indicator */
.chat-typing-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  align-self: flex-start;
}

.chat-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 13px;
  background: #ffffff;
  border: 1px solid var(--chat-border);
  border-radius: 14px;
  border-bottom-left-radius: 3px;
  width: fit-content;
}

.chat-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7A5218;
  opacity: 0.4;
  animation: chat-typing-bounce 1.3s infinite ease-in-out;
}

.chat-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes chat-typing-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* Auto-Sliding Quick Topics Bar */
.chat-topics-bar {
  padding: 8px 10px;
  background: #F1ECE3;
  border-top: 1px solid var(--chat-border);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.chat-topics-label-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  z-index: 2;
  padding-right: 2px;
}

.chat-topics-label {
  font-weight: 700;
  color: var(--chat-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
}

.chat-topics-slider {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent);
  display: flex;
  align-items: center;
}

.chat-topics-track {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  animation: chat-topics-scroll 24s linear infinite;
  will-change: transform;
}

/* Seamless infinite horizontal slide */
@keyframes chat-topics-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Pause sliding on hover or focus so user can comfortably click any topic */
.chat-topics-slider:hover .chat-topics-track,
.chat-topics-slider:focus-within .chat-topics-track,
.chat-topics-track.is-paused {
  animation-play-state: paused;
}

.chat-topic-tag {
  background: #ffffff;
  border: 1px solid #D5CEC0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--chat-text);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.chat-topic-tag:hover {
  background: var(--chat-tech);
  color: #ffffff;
  border-color: var(--chat-tech);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(31, 85, 168, 0.25);
}

.chat-topic-tag:active {
  transform: scale(0.96);
}

.chat-topic-tag.chat-topic-human {
  background: #E4F1EC;
  border-color: #B5DFC0;
  color: #0E5646;
}

.chat-topic-tag.chat-topic-human:hover {
  background: #0E5646;
  border-color: #0E5646;
  color: #ffffff;
}

/* Input Form */
.chat-input-form {
  padding: 10px 12px;
  background: #ffffff;
  border-top: 1px solid var(--chat-border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.chat-text-input {
  flex: 1;
  padding: 9px 13px;
  border: 1px solid var(--chat-border);
  border-radius: 9999px;
  font-size: 0.84rem;
  color: var(--chat-text);
  background: #FAF8F5;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.chat-text-input:focus {
  border-color: var(--chat-tech);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(31, 85, 168, 0.12);
}

.chat-text-input::placeholder {
  color: var(--chat-text-muted);
  font-size: 0.8rem;
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--chat-brand-grad);
  border: 1px solid rgba(216, 169, 94, 0.5);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
  outline: none;
}

.chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(11, 26, 44, 0.35);
}

.chat-send-btn:active {
  transform: scale(0.92);
}

/* Mobile Optimizations */
@media (max-width: 600px) {
  .rohit-chat-widget,
  .webyfied-chat-widget {
    bottom: 16px;
    right: 16px;
  }

  .chat-dialog-panel {
    bottom: 16px;
    right: 16px;
    width: calc(100vw - 32px);
    height: calc(100vh - 84px);
    max-height: 580px;
    border-radius: 16px;
  }

  .chat-launcher-btn {
    width: 54px;
    height: 54px;
  }

  .chat-launcher-svg {
    width: 25px;
    height: 25px;
  }
}
