/* CareWalk AI Chatbot Styles */

#carewalk-chatbot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Chatbot Toggle Button */
.chatbot-toggle {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.5);
}

.chatbot-toggle.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
}

.chatbot-icon {
  font-size: 28px;
  color: white;
  animation: pulse 2s infinite;
}

.chatbot-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid white;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Chatbot Panel */
.chatbot-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 600px;
  max-height: calc(100vh - 40px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.chatbot-panel.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: all;
}

.chatbot-header {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: white;
  padding: 16px 20px;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header-left {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}

.chatbot-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

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

.chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.chatbot-body::-webkit-scrollbar {
  width: 6px;
}

.chatbot-body::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.chatbot-body::-webkit-scrollbar-thumb {
  background: #7c3aed;
  border-radius: 3px;
}

/* Categories */
.chatbot-categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chatbot-category-btn {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.chatbot-category-btn:hover {
  border-color: #7c3aed;
  background: #f9f5ff;
  transform: translateX(4px);
}

.category-name {
  flex: 1;
}

.chatbot-category-btn i {
  color: #7c3aed;
  font-size: 12px;
}

/* Questions */
.chatbot-back-btn {
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 16px;
  font-size: 14px;
  color: #6b7280;
  transition: background 0.2s;
}

.chatbot-back-btn:hover {
  background: #e5e7eb;
}

.chatbot-qa-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chatbot-qa-item {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.chatbot-qa-item:hover {
  border-color: #7c3aed;
}

.chatbot-question {
  width: 100%;
  background: white;
  border: none;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.chatbot-question:hover {
  background: #f9f5ff;
}

.q-number {
  background: #7c3aed;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.q-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.5;
}

.q-icon {
  color: #9ca3af;
  font-size: 12px;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.q-icon.rotated {
  transform: rotate(180deg);
}

.chatbot-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: #f9fafb;
}

.chatbot-answer.active {
  max-height: 500px;
  padding: 14px 16px;
  border-top: 1px solid #e5e7eb;
}

.chatbot-answer p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .chatbot-panel {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    bottom: 10px;
    right: 10px;
  }

  .chatbot-toggle {
    width: 56px;
    height: 56px;
    bottom: 10px;
    right: 10px;
  }

  .chatbot-icon {
    font-size: 24px;
  }

  .chatbot-header {
    padding: 14px 16px;
  }

  .chatbot-body {
    padding: 12px;
  }

  .chatbot-category-btn,
  .chatbot-question {
    padding: 12px 14px;
  }

  .q-text {
    font-size: 13px;
  }

  .chatbot-answer p {
    font-size: 12px;
  }
}

/* Utility Classes */
.mr-2 {
  margin-right: 8px;
}

.ml-auto {
  margin-left: auto;
}
