:root {
  --swabhimaan-primary: #14b8a6;
  --swabhimaan-secondary: #f59e0b;
  --swabhimaan-dark: #060606;
  --swabhimaan-dark2: #0f0f10;
  --swabhimaan-surface: #141418;
  --swabhimaan-border: rgba(255, 255, 255, 0.08);
  --swabhimaan-text: #ffffff;
  --swabhimaan-text-muted: #b5b5c3;
  --swabhimaan-shadow: 0 25px 80px rgba(0, 0, 0, 0.65);
}

#swabhimaan-chatbot-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

#swabhimaan-chatbot-overlay.swabhimaan-show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#swabhimaan-chatbot-wrapper {
  position: fixed;
  bottom: 24px;
  z-index: 99999;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#swabhimaan-chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--swabhimaan-primary), var(--swabhimaan-secondary));
  box-shadow: 0 8px 28px rgba(20, 184, 166, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  position: relative;
  z-index: 2;
  border: none;
}

#swabhimaan-chatbot-toggle:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.45);
}

#swabhimaan-chatbot-toggle svg {
  width: 26px;
  height: 26px;
  color: #fff;
  transition: transform 0.3s ease;
}

.swabhimaan-toggle-icon,
.swabhimaan-close-icon {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.swabhimaan-close-icon {
  opacity: 0;
  transform: rotate(-90deg);
}

.swabhimaan-open .swabhimaan-toggle-icon {
  opacity: 0;
  transform: rotate(90deg);
}

.swabhimaan-open .swabhimaan-close-icon {
  opacity: 1;
  transform: rotate(0deg);
}

#swabhimaan-chatbot-panel {
  position: absolute;
  bottom: 72px;
  width: 420px;
  height: 620px;
  background: rgba(18, 18, 22, 0.96);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 25px 80px rgba(0, 0, 0, 0.7), 0 0 50px rgba(20, 184, 166, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transform-origin: bottom right;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.swabhimaan-open #swabhimaan-chatbot-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.swabhimaan-chatbot-inline {
  margin: 20px 0;
  max-width: 100%;
}

.swabhimaan-chatbot-panel-inline {
  width: 100%;
  max-width: 520px;
  height: 560px;
  background: rgba(18, 18, 22, 0.96);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.swabhimaan-chatbot-header {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(245, 158, 11, 0.22));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 20px 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.swabhimaan-chatbot-header::before {
  content: '🏡';
  position: absolute;
  right: -10px;
  top: -10px;
  font-size: 80px;
  opacity: 0.05;
  transform: rotate(-15deg);
}

.swabhimaan-logo-ring {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #14b8a6, #f59e0b);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  color: white;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.35);
}

.swabhimaan-header-text {
  flex: 1;
}

.swabhimaan-header-text h2 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 16px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 0;
}

.swabhimaan-header-text p {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.72);
  margin: 2px 0 0;
  font-weight: 400;
}

.swabhimaan-online-pill {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  flex-shrink: 0;
}

.swabhimaan-online-dot {
  width: 6px;
  height: 6px;
  background: #f59e0b;
  border-radius: 50%;
  animation: swabhimaan-pulse-dot 2s ease-in-out infinite;
}

@keyframes swabhimaan-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.swabhimaan-quick-chips {
  padding: 8px 14px 7px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.swabhimaan-chip {
  font-size: 10.5px;
  padding: 5px 11px;
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: 20px;
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.08);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  font-weight: 500;
  user-select: none;
}

.swabhimaan-chip:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: #f59e0b;
  color: #fff;
  transform: translateY(-1px);
}

.swabhimaan-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.swabhimaan-chatbot-messages::-webkit-scrollbar {
  width: 4px;
}

.swabhimaan-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.swabhimaan-msg {
  display: flex;
  flex-direction: column;
  max-width: 84%;
  animation: swabhimaan-msg-in 0.25s ease;
}

@keyframes swabhimaan-msg-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.swabhimaan-msg.swabhimaan-user {
  align-self: flex-end;
  align-items: flex-end;
}

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

.swabhimaan-msg-label {
  font-size: 9.5px;
  color: var(--swabhimaan-text-muted);
  margin-bottom: 3px;
  padding: 0 4px;
  font-weight: 500;
}

.swabhimaan-bubble {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.swabhimaan-msg.swabhimaan-user .swabhimaan-bubble {
  background: linear-gradient(135deg, var(--swabhimaan-primary), #0d9488);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.25);
}

.swabhimaan-msg.swabhimaan-bot .swabhimaan-bubble {
  background: rgba(255, 255, 255, 0.04);
  color: var(--swabhimaan-text);
  border-radius: 18px 18px 18px 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.swabhimaan-msg-time {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 3px;
  padding: 0 4px;
}

.swabhimaan-typing .swabhimaan-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px 18px 18px 4px;
  padding: 14px 18px;
}

.swabhimaan-typing-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.swabhimaan-typing-dots span {
  width: 7px;
  height: 7px;
  background: var(--swabhimaan-secondary);
  border-radius: 50%;
  animation: swabhimaan-bounce 1.3s ease-in-out infinite;
}

.swabhimaan-typing-dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.swabhimaan-typing-dots span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes swabhimaan-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-7px); }
}

.swabhimaan-welcome-card {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(245, 158, 11, 0.10));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  color: white;
  backdrop-filter: blur(10px);
}

.swabhimaan-wc-icon {
  font-size: 34px;
  margin-bottom: 8px;
}

.swabhimaan-welcome-card h3 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 15px;
  margin: 0 0 6px;
  color: #fff;
}

.swabhimaan-welcome-card p {
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.swabhimaan-services-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.swabhimaan-svc-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fde68a;
  border-radius: 20px;
  font-size: 10px;
  padding: 4px 10px;
  font-weight: 500;
}

.swabhimaan-error-toast {
  display: none;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  padding: 8px 16px;
  font-size: 11.5px;
  border-top: 1px solid rgba(239, 68, 68, 0.25);
  text-align: center;
  flex-shrink: 0;
}

.swabhimaan-error-toast.swabhimaan-show {
  display: block;
}

.swabhimaan-chatbot-input-area {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.swabhimaan-chatbot-input-area textarea {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 9px 16px;
  font-size: 13px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  resize: none;
  outline: none;
  max-height: 100px;
  line-height: 1.5;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  backdrop-filter: blur(10px);
}

.swabhimaan-chatbot-input-area textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.swabhimaan-chatbot-input-area textarea:focus {
  border-color: var(--swabhimaan-primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.swabhimaan-send-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--swabhimaan-primary), var(--swabhimaan-secondary));
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.35);
  transition: all 0.18s ease;
}

.swabhimaan-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

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

.swabhimaan-send-btn svg {
  width: 17px;
  height: 17px;
}

.swabhimaan-chatbot-footer {
  padding: 6px 14px 8px;
  text-align: center;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.swabhimaan-chatbot-footer strong {
  color: #fde68a;
}

@media (max-width: 480px) {
  #swabhimaan-chatbot-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    max-height: 100vh;
  }

  #swabhimaan-chatbot-wrapper {
    bottom: 16px;
  }

  #swabhimaan-chatbot-toggle {
    width: 52px;
    height: 52px;
  }

  .swabhimaan-chatbot-panel-inline {
    max-width: 100%;
    border-radius: 12px;
  }
}
