/* ============================================
   MEMORA · Chatbot Widget Styles
   ============================================ */

.chat-launcher {
  position: fixed; bottom: 24px; right: 24px;
  width: 60px; height: 60px; border-radius: 50%;
  background-color: var(--accent); color: var(--text-inverse);
  box-shadow: 0 8px 24px rgba(184, 134, 122, 0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: var(--z-sticky); transition: transform var(--transition-base);
}
.chat-launcher:hover { transform: scale(1.08); }
.chat-launcher svg { width: 28px; height: 28px; }

.chat-badge {
  position: absolute; top: -4px; right: -4px;
  background-color: var(--sage); color: var(--text-inverse);
  width: 22px; height: 22px; border-radius: 50%;
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center;
}

.chat-panel {
  position: fixed; bottom: 100px; right: 24px;
  width: 360px; max-width: calc(100vw - 48px);
  height: 500px; max-height: calc(100vh - 140px);
  background-color: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none; flex-direction: column;
  z-index: var(--z-modal); overflow: hidden;
  border: 1px solid var(--border);
}
.chat-panel.open { display: flex; animation: chatSlideUp 0.3s ease; }
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-head {
  padding: var(--space-4) var(--space-5);
  background-color: var(--text); color: var(--text-inverse);
  display: flex; align-items: center; gap: var(--space-3);
}
.chat-head-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background-color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.chat-avatar-img {
  width: 24px; height: 24px;
  filter: brightness(0) invert(1);
}
.chat-head-info b { display: block; font-size: var(--fs-sm); }
.chat-head-info span { font-size: var(--fs-xs); color: rgba(255,255,255,0.7); }
.chat-head-info span::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background-color: #22c55e; margin-right: 4px;
}
.chat-close {
  margin-left: auto; color: var(--text-inverse);
  font-size: var(--fs-2xl); width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}

.chat-body {
  flex-grow: 1; overflow-y: auto;
  padding: var(--space-5);
  background-color: var(--bg-alt);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.chat-msg {
  max-width: 85%; padding: var(--space-3) var(--space-4);
  border-radius: 14px; font-size: var(--fs-sm); line-height: 1.4;
  white-space: pre-line;
}
.chat-msg.bot {
  background-color: var(--surface); color: var(--text);
  border-bottom-left-radius: 4px; align-self: flex-start;
}
.chat-msg.user {
  background-color: var(--accent); color: var(--text-inverse);
  border-bottom-right-radius: 4px; align-self: flex-end;
}
.chat-options { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: 2px; }
.chat-option {
  background-color: var(--surface); border: 1px solid var(--border);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-full);
  font-size: var(--fs-xs); cursor: pointer; transition: all var(--transition-fast);
}
.chat-option:hover { border-color: var(--accent); color: var(--accent); }

.chat-input {
  padding: var(--space-3); border-top: 1px solid var(--border);
  display: flex; gap: var(--space-2); background-color: var(--surface);
}
.chat-input input {
  flex-grow: 1; padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  font-size: var(--fs-sm);
}
.chat-input input:focus { outline: none; border-color: var(--accent); }
.chat-input button {
  width: 40px; height: 40px; border-radius: 50%;
  background-color: var(--accent); color: var(--text-inverse);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}