/* Base */
.mai-assistant * { box-sizing: border-box; font-family: inherit; }
.mai-assistant button { cursor: pointer; }

/* Floating widget button */
#mai-assistant-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

/* Panel */
#mai-assistant-panel {
  position: fixed;
  right: 18px;
  bottom: 74px;
  width: 340px;
  max-width: calc(100vw - 36px);
  height: 480px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  overflow: hidden;
  z-index: 99999;
  display: none;
}

#mai-assistant-panel.wf-open { display: flex; flex-direction: column; }

.mai-assistant-header {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mai-assistant-title { font-weight: 600; font-size: 14px; }
.mai-assistant-close {
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
}

/* Messages */
.mai-assistant-body {
  padding: 12px;
  overflow: auto;
  flex: 1;
}

.wf-msg {
  margin: 0 0 10px 0;
  display: flex;
}
.wf-msg-user { justify-content: flex-end; }
.wf-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
}
.wf-msg-user .wf-bubble { background: #111; color: #fff; border-bottom-right-radius: 4px; }
.wf-msg-bot .wf-bubble { background: #f3f4f6; color: #111; border-bottom-left-radius: 4px; }

/* Composer */
.mai-assistant-footer {
  border-top: 1px solid rgba(0,0,0,.08);
  padding: 10px;
  display: flex;
  gap: 8px;
}

.mai-assistant-input {
  flex: 1;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 10px;
  padding: 10px 10px;
  font-size: 14px;
}

.mai-assistant-send {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

/* Embedded */
.mai-assistant-embed .mai-assistant-embed-shell {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  max-width: 720px;
}

.mai-assistant-embed .mai-assistant-body { height: 420px; }

/* Paragraph spacing inside bubbles */
.wf-bubble p { margin: 0 0 10px 0; }
.wf-bubble p:last-child { margin-bottom: 0; }

/* Reset button */
.mai-assistant-reset {
  border: 0;
  background: rgba(0,0,0,.06);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

/* Typing dots */
.wf-typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: rgba(0,0,0,.35);
  margin-right: 6px;
  animation: wfDot 1.2s infinite ease-in-out;
}
.wf-typing-dot:nth-child(2) { animation-delay: .15s; }
.wf-typing-dot:nth-child(3) { animation-delay: .30s; }

@keyframes wfDot {
  0%, 80%, 100% { transform: translateY(0); opacity: .35; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* Widget close button */
.mai-assistant-close {
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  margin-left: 8px;
}

/* FIX: Widget panel contains .mai-assistant-shell, so make the shell the flex container */
#mai-assistant-panel.wf-open {
  display: block; /* panel itself just shows */
}

#mai-assistant-panel .mai-assistant-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* FIX: allow the messages area to shrink + scroll inside flex layouts */
.mai-assistant-body {
  min-height: 0;
  overflow-y: auto;
}




/* -----------------------------
 * mAI alias styles (new selectors)
 * ----------------------------- */
/* Base */
.mai-assistant * { box-sizing: border-box; font-family: inherit; }
.mai-assistant button { cursor: pointer; }

/* Floating widget button */
#mai-assistant-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

/* Panel */
#mai-assistant-panel {
  position: fixed;
  right: 18px;
  bottom: 74px;
  width: 340px;
  max-width: calc(100vw - 36px);
  height: 480px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  overflow: hidden;
  z-index: 99999;
  display: none;
}

#mai-assistant-panel.wf-open { display: flex; flex-direction: column; }

.mai-assistant-header {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mai-assistant-title { font-weight: 600; font-size: 14px; }
.mai-assistant-close {
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
}

/* Messages */
.mai-assistant-body {
  padding: 12px;
  overflow: auto;
  flex: 1;
}

.wf-msg {
  margin: 0 0 10px 0;
  display: flex;
}
.wf-msg-user { justify-content: flex-end; }
.wf-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
}
.wf-msg-user .wf-bubble { background: #111; color: #fff; border-bottom-right-radius: 4px; }
.wf-msg-bot .wf-bubble { background: #f3f4f6; color: #111; border-bottom-left-radius: 4px; }

/* Composer */
.mai-assistant-footer {
  border-top: 1px solid rgba(0,0,0,.08);
  padding: 10px;
  display: flex;
  gap: 8px;
}

.mai-assistant-input {
  flex: 1;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 10px;
  padding: 10px 10px;
  font-size: 14px;
}

.mai-assistant-send {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

/* Embedded */
.mai-assistant-embed .mai-assistant-embed-shell {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  max-width: 720px;
}

.mai-assistant-embed .mai-assistant-body { height: 420px; }

/* Paragraph spacing inside bubbles */
.wf-bubble p { margin: 0 0 10px 0; }
.wf-bubble p:last-child { margin-bottom: 0; }

/* Reset button */
.mai-assistant-reset {
  border: 0;
  background: rgba(0,0,0,.06);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

/* Typing dots */
.wf-typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: rgba(0,0,0,.35);
  margin-right: 6px;
  animation: wfDot 1.2s infinite ease-in-out;
}
.wf-typing-dot:nth-child(2) { animation-delay: .15s; }
.wf-typing-dot:nth-child(3) { animation-delay: .30s; }

@keyframes wfDot {
  0%, 80%, 100% { transform: translateY(0); opacity: .35; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* Widget close button */
.mai-assistant-close {
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  margin-left: 8px;
}

/* FIX: Widget panel contains .mai-assistant-shell, so make the shell the flex container */
#mai-assistant-panel.wf-open {
  display: block; /* panel itself just shows */
}

#mai-assistant-panel .mai-assistant-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* FIX: allow the messages area to shrink + scroll inside flex layouts */
.mai-assistant-body {
  min-height: 0;
  overflow-y: auto;
}


