/*
 * JG SOLUTIONS - Floating Chatbot Widget Styling
 */

.chatbot-wrapper {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
}

/* Chat bubble toggle button */
.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0e1b2b 0%, #2b4566 50%, #5d83af 100%);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 25px rgba(14, 27, 43, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.chatbot-toggle:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 8px 30px rgba(93, 131, 175, 0.4);
}

.chatbot-toggle i {
  transition: transform 0.4s ease;
}

.chatbot-toggle.open i {
  transform: rotate(90deg);
}

/* Chat widget card container */
.chatbot-card {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 360px;
  height: 480px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(14, 27, 43, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(14, 27, 43, 0.1);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Chat Header */
.chatbot-header {
  padding: 1.25rem;
  background: linear-gradient(135deg, #0e1b2b 0%, #2b4566 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chatbot-header-logo {
  height: 30px;
  width: auto;
}

.chatbot-header-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
}

.chatbot-header-status {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.chatbot-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0d9488;
  display: inline-block;
  box-shadow: 0 0 5px #0d9488;
}

.chatbot-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.chatbot-close:hover {
  color: white;
}

/* Chat Body area */
.chatbot-body {
  flex-grow: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.4);
}

/* Message layouts */
.chatbot-row {
  display: flex;
  width: 100%;
}

.chatbot-row.bot {
  justify-content: flex-start;
}

.chatbot-row.user {
  justify-content: flex-end;
}

.chatbot-bubble {
  max-width: 75%;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  word-break: break-word;
}

.chatbot-row.bot .chatbot-bubble {
  background: rgba(14, 27, 43, 0.04);
  color: #0e1b2b;
  border-bottom-left-radius: 3px;
  border: 1px solid rgba(14, 27, 43, 0.02);
}

.chatbot-row.user .chatbot-bubble {
  background: linear-gradient(135deg, #2b4566 0%, #5d83af 100%);
  color: white;
  border-bottom-right-radius: 3px;
}

/* Quick choices block */
.chatbot-choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
}

.chatbot-choice-btn {
  text-align: left;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(93, 131, 175, 0.2);
  color: #5d83af;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: fit-content;
}

.chatbot-choice-btn:hover {
  background: rgba(93, 131, 175, 0.06);
  border-color: #5d83af;
  transform: translateX(2px);
}

/* Chat Input footer */
.chatbot-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(14, 27, 43, 0.08);
  background: white;
}

.chatbot-input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.chatbot-input {
  flex-grow: 1;
  border: 1px solid rgba(14, 27, 43, 0.08);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
}

.chatbot-input:focus {
  border-color: #5d83af;
}

.chatbot-send {
  background: #5d83af;
  color: white;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.chatbot-send:hover {
  background: #0e1b2b;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .chatbot-wrapper {
    bottom: 15px;
    right: 15px;
  }
  
  .chatbot-card {
    width: calc(100vw - 30px);
    height: 400px;
    bottom: 70px;
  }
}
