/* ==========================================================================
   CHATBOT WIDGET — Clean & Simple AI Assistant
   Minimalist floating button launcher + sleek modern glassmorphic chat
   ========================================================================== */

/* --- Container --- */
.chatbot-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  user-select: none;
  pointer-events: none;
}

.chatbot-container > * {
  pointer-events: auto;
}

/* --- Floating Button Launcher --- */
.chatbot-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(10, 11, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 245, 255, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 18px rgba(0, 245, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00f5ff;
  font-size: 1.25rem;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s, box-shadow 0.2s;
}

.chatbot-icon:hover {
  transform: scale(1.08);
  border-color: rgba(0, 245, 255, 0.7);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 245, 255, 0.4);
}

.chatbot-icon i {
  transition: transform 0.25s ease;
}

.chatbot-icon:hover i {
  transform: rotate(12deg) scale(1.1);
}

/* Online status indicator dot */
.chatbot-online-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #070710;
  box-shadow: 0 0 8px #10b981;
}

/* Notification badge */
.chat-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f5ff, #8a7aff);
  color: #070710;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-notif-badge.hidden { display: none; }

/* Tooltip on hover */
.chatbot-tooltip {
  position: absolute;
  right: 64px;
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(12, 13, 24, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chatbot-icon:hover .chatbot-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* --- Chat Panel --- */
.chat-panel {
  width: 350px;
  max-height: 480px;
  height: 480px;
  background: rgba(10, 11, 20, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75), 0 0 25px rgba(0, 245, 255, 0.1);
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom right;
}

.chat-panel.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.92) translateY(12px);
  pointer-events: none !important;
  max-height: 0;
  height: 0;
  margin: 0;
  border-width: 0;
}

/* --- Header --- */
.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid rgba(0, 245, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00f5ff;
  font-size: 0.9rem;
}

.chat-header-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.chat-header-sub {
  font-size: 0.7rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}

.chat-header-sub::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.chat-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-close-btn:hover {
  color: #ff2d75;
  background: rgba(255, 45, 117, 0.1);
}

/* --- Messages List --- */
.chat-messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.chat-messages-list::-webkit-scrollbar { width: 4px; }
.chat-messages-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.chat-bubble {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.84rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-bubble.bot {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border-bottom-left-radius: 3px;
  align-self: flex-start;
}

.chat-bubble.user {
  background: rgba(0, 245, 255, 0.15);
  border: 1px solid rgba(0, 245, 255, 0.3);
  color: #ffffff;
  border-bottom-right-radius: 3px;
  align-self: flex-end;
}

/* Suggestion quick chips */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
}

.chat-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.chat-chip:hover {
  background: rgba(0, 245, 255, 0.1);
  border-color: rgba(0, 245, 255, 0.35);
  color: var(--color-cyan);
}

/* --- Input Area --- */
.chat-input-area {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 8px 14px;
  color: #ffffff;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.chat-input:focus {
  border-color: rgba(0, 245, 255, 0.4);
}

.chat-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-cyan);
  border: none;
  color: #070710;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: transform 0.2s, opacity 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.08);
}

.chat-send-btn:disabled {
  opacity: 0.4;
  transform: none;
}

@media (max-width: 480px) {
  .chat-panel {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 80px;
  }
}
