/* ============================================================
   G-TECH SISTEMAS — ASSISTENTE VIRTUAL (Sofia)
   ============================================================ */

.chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 90px;
  z-index: var(--z-chatbot);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(168, 232, 255, 0.35);
  transition: transform var(--transition-fast);
}

.chatbot-fab:hover {
  transform: scale(1.08);
}

.chatbot-fab .material-symbols-outlined {
  color: var(--on-primary);
  font-size: 26px;
}

.chatbot-window {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: var(--z-chatbot);
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: var(--surface);
  border: 1px solid var(--outline-soft);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-base);
}

.chatbot-window.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.chatbot-header {
  background: linear-gradient(135deg, var(--primary-container), var(--primary-dim));
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.chatbot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chatbot-avatar .material-symbols-outlined {
  color: var(--on-primary);
  font-size: 20px;
}

.chatbot-header-info strong {
  display: block;
  color: var(--on-primary);
  font-size: 14px;
}

.chatbot-header-info span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(0, 54, 66, 0.75);
}

.chatbot-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2ecc71;
  display: inline-block;
}

.chatbot-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--on-primary);
}

.chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chatbot-msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.55;
}

.chatbot-msg.bot {
  align-self: flex-start;
  background: var(--surface2);
  color: var(--on-surface);
  border-bottom-left-radius: 4px;
}

.chatbot-msg.user {
  align-self: flex-end;
  background: var(--primary);
  color: var(--on-primary);
  border-bottom-right-radius: 4px;
}

.chatbot-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: var(--radius-md);
  border-bottom-left-radius: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--on-surface-var);
}

.chatbot-sugestoes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 var(--space-4) var(--space-3);
  flex-shrink: 0;
}

.chatbot-chip {
  background: rgba(168, 232, 255, 0.08);
  border: 1px solid rgba(168, 232, 255, 0.2);
  color: var(--primary);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.chatbot-chip:hover {
  background: rgba(168, 232, 255, 0.18);
}

.chatbot-input-wrap {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3);
  border-top: 1px solid var(--outline-soft);
  flex-shrink: 0;
}

.chatbot-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--outline-soft);
  color: var(--on-surface);
  padding: 10px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-family: var(--font-base);
}

.chatbot-input:focus {
  outline: none;
  border-color: rgba(168, 232, 255, 0.4);
}

.chatbot-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chatbot-send .material-symbols-outlined {
  color: var(--on-primary);
  font-size: 18px;
}

@media (max-width: 480px) {
  .chatbot-window {
    right: 16px;
    left: 16px;
    width: auto;
    bottom: 80px;
  }
  .chatbot-fab {
    right: 24px;
  }
  .wab {
    bottom: 88px;
  }
}