/* ============================================================
   SmartStart 3D AI Person Chatbot Styles
   ============================================================ */

/* Floating Toggle Button with 3D Avatar */
.chatbot-toggle {
  position: fixed;
  bottom: 30px;
  left: 1.5rem;
  z-index: 9999;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 10px;
  animation: float3D 3.5s infinite ease-in-out;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chatbot-toggle:hover {
  transform: scale(1.08) translateY(-4px);
}

.chatbot-toggle-badge {
  background: #018079;
  color: #CFDD26;
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(207, 221, 38, 0.3);
  white-space: nowrap;
  letter-spacing: 0.3px;
  pointer-events: none;
  animation: badgePulse 2s infinite ease-in-out;
}

@keyframes badgePulse {
  0%, 100% { opacity: 0.95; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(-3px); }
}

.chatbot-toggle-avatar-wrap {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 12px;
  padding: 3px;
  background: linear-gradient(135deg, #CFDD26 0%, #018079 100%);
  box-shadow: 0 10px 25px rgba(1, 128, 121, 0.4), 0 0 0 1px rgba(255,255,255,0.2);
}

.chatbot-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: contain; background: #018079;
  display: block;
  background: #018079;
}

.chatbot-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background-color: #22c55e;
  border: 2.5px solid #ffffff;
  border-radius: 12px;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

@keyframes float3D {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* Chat Window */
.chatbot-window {
  position: fixed;
  bottom: 100px;
  left: 24px;
  width: 375px;
  height: 520px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(1, 128, 121, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(25px) scale(0.95);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* 3D Header */
.chatbot-header {
  background: linear-gradient(135deg, #018079 0%, #018079 100%);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.chatbot-header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-header-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, #CFDD26 0%, #ffffff 100%);
}

.chatbot-header-avatar {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: contain; background: #018079;
  display: block;
}

.chatbot-header-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background: #22c55e;
  border: 2px solid #018079;
  border-radius: 12px;
}

.chatbot-header-info h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff !important;
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
}

.chatbot-header-info p {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85) !important;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-indicator {
  width: 6px;
  height: 6px;
  background: #CFDD26;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 0 6px #CFDD26;
}

.chatbot-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

/* Chat Body */
.chatbot-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background-color: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Message Styles */
.chat-message {
  display: flex;
  gap: 8px;
  max-width: 88%;
  font-size: 0.92rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-message.bot {
  align-self: flex-start;
  align-items: flex-end;
}

.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  object-fit: contain; background: #018079;
  flex-shrink: 0;
  border: 1.5px solid #018079;
}

.chat-message.bot .msg-content {
  background-color: #ffffff;
  color: #1E293B;
  padding: 11px 15px;
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}

.chat-message.user {
  align-self: flex-end;
}

.chat-message.user .msg-content {
  background: linear-gradient(135deg, #018079 0%, #005f5a 100%);
  color: #ffffff;
  padding: 11px 15px;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 4px 12px rgba(1, 128, 121, 0.25);
}

/* Typing Indicator */
.typing-message .msg-content {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 10px 14px !important;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: #018079;
  border-radius: 12px;
  display: inline-block;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.3); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Chat Footer */
.chatbot-footer {
  padding: 12px 14px;
  background-color: #ffffff;
  border-top: 1px solid #E2E8F0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.chatbot-footer input {
  flex: 1;
  padding: 11px 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: 24px;
  outline: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: #F8FAFC;
}

.chatbot-footer input:focus {
  border-color: #018079;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(1, 128, 121, 0.15);
}

.chatbot-footer button {
  background: linear-gradient(135deg, #CFDD26 0%, #b4c221 100%);
  color: #018079;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;

  flex-shrink: 0;
}

.chatbot-footer button:hover {
  transform: scale(1.08) translateY(-2px);

}

/* Mobile View */
@media (max-width: 480px) {
  .chatbot-window {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }
  .chatbot-toggle {
    bottom: 85px;
    left: 0.9rem;
  }
  .chatbot-toggle-badge { /* display: none; Removed by user request to show on mobile */ }
}

/* Chat Link Buttons */
.chat-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #018079;
  color: #CFDD26 !important;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none !important;
  font-size: 0.82rem;
  margin-top: 6px;
  box-shadow: 0 2px 6px rgba(1, 128, 121, 0.25);
  transition: all 0.2s ease;
}
.chat-link-btn:hover {
  background: #005f5a;
  transform: translateY(-1px);
}
.chat-link-wa {
  background: #25D366;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
}
.chat-link-wa:hover {
  background: #1eb954;
}
/* ============================================================
   MOBILE CHATBOT COMPACT WINDOW FIX (AS REQUESTED)
   ============================================================ */
@media (max-width: 480px) {
  .chatbot-window {
    bottom: 20px !important;
    left: 15px !important;
    right: 15px !important;
    width: calc(100% - 30px) !important;
    height: 75vh !important;
    max-height: 550px !important;
    border-radius: 16px !important;
  }
}
