/* =========================================================
   TRIFELIX AI CHATBOT (FELIX) - FUTURISTIC CYBER STYLING
========================================================= */

.chatbot-fab {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f2fe 0%, #7928ca 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 30px rgba(0, 242, 254, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1050;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.chatbot-fab:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 242, 254, 0.65);
}

.chatbot-fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  opacity: 0;
  animation: fabPulse 2.5s infinite;
}

@keyframes fabPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.chatbot-fab-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ff007a;
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 10px rgba(255, 0, 122, 0.6);
}

.chatbot-fab-icon.chatbot-icon-close {
  display: none;
  color: #ffffff;
}

.chatbot-fab.is-open .chatbot-icon-chat,
.chatbot-fab.chatbot-open-state .chatbot-icon-chat {
  display: none;
}
.chatbot-fab.is-open .chatbot-icon-close,
.chatbot-fab.chatbot-open-state .chatbot-icon-close {
  display: block;
}

.chatbot-tooltip {
  position: absolute;
  right: 70px;
  background: rgba(10, 14, 34, 0.9);
  color: #ffffff;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  white-space: nowrap;
  border: 1px solid rgba(0, 242, 254, 0.3);
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.25s ease;
}

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

/* Chatbot Dialog Window */
.chatbot-window {
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: 390px;
  max-width: calc(100vw - 40px);
  height: 580px;
  max-height: calc(100vh - 120px);
  background: rgba(8, 11, 28, 0.96);
  border: 1px solid rgba(0, 242, 254, 0.4);
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 242, 254, 0.25);
  display: flex;
  flex-direction: column;
  z-index: 1049;
  overflow: hidden;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-window.is-open,
.chatbot-window.chatbot-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.chatbot-header {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.chatbot-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-status-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
}

.chatbot-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chatbot-title-row h3 {
  font-family: var(--font-heading, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.chatbot-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: #00f2fe;
}

.chatbot-subtitle {
  font-size: 0.72rem;
  color: #94a3b8;
}

.chatbot-header-actions {
  display: flex;
  gap: 0.4rem;
}

.chatbot-header-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.chatbot-header-btn:hover {
  color: #ffffff;
  border-color: #00f2fe;
}

/* Chat Messages Body */
.chatbot-body {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-msg {
  display: flex;
  gap: 0.65rem;
  max-width: 88%;
}

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

.chat-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid #00f2fe;
  color: #00f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.chat-bubble {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.chat-msg-bot .chat-bubble {
  background: rgba(18, 25, 58, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.chat-msg-user .chat-bubble {
  background: linear-gradient(135deg, #00f2fe 0%, #0088ff 100%);
  color: #050713;
  font-weight: 500;
}

.chat-bubble-text {
  word-break: break-word;
}

.chat-bubble-time {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  opacity: 0.65;
  margin-top: 0.35rem;
  text-align: right;
}

.chat-h4 {
  font-family: var(--font-heading, sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #00f2fe;
  margin: 0.5rem 0 0.35rem;
}

.chat-ul {
  padding-left: 1.2rem;
  margin: 0.4rem 0;
}

.chat-ul li {
  margin-bottom: 0.25rem;
}

.chat-code {
  font-family: var(--font-mono, monospace);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  color: #00f2fe;
  font-size: 0.8rem;
}

.chat-link {
  color: #00f2fe;
  text-decoration: underline;
  font-weight: 600;
}

/* Typing Indicator */
.chatbot-typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
}

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

.typing-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f2fe;
  animation: blinkDot 1.4s infinite both;
}

.typing-dots .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blinkDot {
  0%, 80%, 100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.typing-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Suggestion Chips */
.chatbot-suggestions {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  overflow-x: auto;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-suggestion-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: #cbd5e1;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-suggestion-chip:hover {
  background: rgba(0, 242, 254, 0.15);
  color: #ffffff;
  border-color: #00f2fe;
}

/* Footer & Input */
.chatbot-footer {
  padding: 0.85rem 1rem;
  background: rgba(10, 14, 34, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.chatbot-input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.chatbot-input:focus {
  border-color: #00f2fe;
}

.chatbot-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #00f2fe;
  color: #050713;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.chatbot-send-btn:hover {
  transform: scale(1.05);
}

.chatbot-encryption-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: #64748b;
}

@media (max-width: 480px) {
  .chatbot-window {
    right: 15px;
    bottom: 85px;
    width: calc(100vw - 30px);
    height: calc(100vh - 100px);
  }
}
