/* --- Chat Toggle --- */
.wedu-launcher-wrap {
  position: fixed;
  right: 18px;
  bottom: 80px;
  z-index: 99998;
}

#wedu-chat-launcher {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  cursor: pointer;
  transition: transform 0.25s ease;
  position: relative;
}
#wedu-chat-launcher:hover { transform: scale(1.05); }

.launcher-inner {

  display: flex;
  align-items: center;
  justify-content: center;
}
.launcher-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- Tooltip --- */
#wedu-chat-launcher[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 92px;
	right: 20px;
  background: #f15f22;
  color: #fff;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* --- Chat Widget --- */
#wedu-chat-widget {
  position: fixed;
  right: 18px;
  bottom: 170px;
  width: 380px;
  max-width: calc(100vw - 36px);
  height: 540px;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
  display: none;
  flex-direction: column;
  background: #fff;
  z-index: 99999;
  border: 1px solid rgba(0,0,0,0.06);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
#wedu-chat-widget.show { display: flex; }

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--wedu-primary, #f15f22);
  color: #fff;
}
.chat-header img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.chat-title { font-weight: 600; font-size: 15px; }

.top-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
.top-actions button {
  background: transparent;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  padding: 3px 8px;
  cursor: pointer;
}
.top-actions button:hover { background: rgba(255,255,255,.15); }

/* Body */
.chat-body {
  flex: 1;
  padding: 12px;
  background: #fafafa;
  overflow-y: auto;
  scrollbar-width: thin;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* Messages */
.bubble {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 8px 0;
  line-height: 1.45;
  font-size: 14px;
  word-break: break-word;
}
.bubble.user {
  background: #fff;
  border: 1px solid #eee;
  margin-left: auto;
}
.bubble.bot {
  background: #fff8f4;
  border: 1px solid #ffe1d5;
  color: #3a2a23;
}
.bubble.bot ul,
.bubble.bot ol { margin: 6px 0 6px 16px; }
.bubble.bot a {
  color: var(--wedu-primary, #f15f22);
  text-decoration: underline;
}

/* Input */
.chat-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #eee;
  background: #fff;
}
.chat-input input {
  flex: 1;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.chat-input button {
  background: var(--wedu-primary, #f15f22);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 18px;
  font-size: 15px;
  cursor: pointer;
}
.chat-input button:hover { opacity: 0.9; }
