/* ============================================================
   CHAT.CSS — Widget do assistente IA
   Usa as variáveis de tema do site (herda cor de cada tema)
   ============================================================ */
.chat-fab {
  position: fixed; right: 18px; bottom: 82px; z-index: 960;
  width: 56px; height: 56px; border-radius: 50%; font-size: 1.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 10px 30px var(--accent-soft);
  transition: transform .2s; animation: floatOrb 5s ease-in-out infinite;
}
.chat-fab:hover { transform: scale(1.1); animation-play-state: paused; }

.chat-panel {
  position: fixed; right: 18px; bottom: 150px; z-index: 960;
  width: min(360px, calc(100vw - 24px)); height: min(480px, 70vh);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow);
  animation: popIn .3s cubic-bezier(.2,.9,.3,1.15) both;
}

.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.chat-head strong { display: block; font-size: .95rem; }
.chat-head small { color: var(--muted); font-size: .74rem; }
.chat-avatar {
  width: 38px; height: 38px; display: grid; place-items: center; font-size: 1.2rem;
  border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.chat-x { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); }
.chat-x:hover { color: var(--danger); }

.chat-log {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-bubble {
  max-width: 85%; padding: 10px 14px; border-radius: 16px;
  font-size: .88rem; line-height: 1.45; animation: fadeUp .25s both;
  white-space: pre-wrap; word-break: break-word;
}
.chat-bubble--user {
  align-self: flex-end; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-bottom-right-radius: 4px;
}
.chat-bubble--assistant {
  align-self: flex-start; background: var(--surface); border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-quick { display: flex; gap: 6px; padding: 0 14px 10px; flex-wrap: wrap; }
.chat-quick button {
  padding: 6px 12px; font-size: .76rem; font-weight: 600; border-radius: 999px;
  border: 1px solid var(--border); color: var(--accent); background: var(--surface);
  transition: background .15s;
}
.chat-quick button:hover { background: var(--accent-soft); }

.chat-form {
  display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border);
}
.chat-form input {
  flex: 1; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--field-bg); color: var(--text); outline: none; font-size: .88rem;
}
.chat-form input:focus { border-color: var(--accent); }
.chat-form button {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  transition: transform .15s;
}
.chat-form button:hover { transform: scale(1.1); }

@media (max-width: 560px) {
  .chat-panel { right: 12px; left: 12px; bottom: 120px; width: auto; height: 60vh; }
  .chat-fab { right: 12px; bottom: 70px; }
}
