/* ===============================
   Chat Toggle Button
================================ */
#botkid-chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--botkid-primary);
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  box-shadow: 0 8px 24px rgba(249,168,38,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 999999;
}
#botkid-chat-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(249,168,38,0.5);
}

/* ===============================
   Chat Widget
================================ */
#botkid-chat-widget {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 340px;
  max-height: 520px;
  background: var(--botkid-bg-light);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  display: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  z-index: 999998;
}

/* Header */
#botkid-chat-header {
  background: var(--botkid-primary);
  color: #fff;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
  align-items: center;
  display: flex;
  gap: 5px;
}

/* Messages */
#botkid-chat-messages {
  height: 300px;
  overflow-y: auto;
  padding: 14px;
  background: #F8F9FA;
}

/* Text Bubbles */
.botkid-user {
  margin-left: auto;
  background: var(--botkid-primary);
  color: #fff;
  border-radius: 10px 10px 2px 10px;
  padding: 10px 12px;
  max-width: 80%;
  margin-bottom: 10px;
}

.botkid-bot {
  margin-right: auto;
  background: #fff;
  color: var(--botkid-text-dark);
  border-radius: 10px 2px 10px 10px;
  padding: 10px 12px;
  max-width: 80%;
  margin-bottom: 10px;
  border: 1px solid #E5E7EB;
}

.botkid-user,
.botkid-bot {
  font-size: 13px;       /* calmer, chat-friendly */
  line-height: 1.5;     /* improves readability */
}

/* Input Area */
#botkid-chat-input {
  display: flex;
  align-items: center;
  padding: 10px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

#botkid-chat-input input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 20px;
  border: 1px solid #ddd;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

#botkid-chat-input input:focus {
  border-color: var(--botkid-primary);
}

/* Send button */
#botkid-chat-input button {
  margin-left: 8px;
  background: var(--botkid-primary);
  color: #fff;
  padding: 10px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  line-height: 0;
}
#botkid-chat-input button:hover {
  background: var(--botkid-primary-dark);
}

/* ===============================
   Expert Connect (Talk to Expert)
================================ */
#botkid-expert-connect {
  position: relative;
  padding: 8px 12px;
  /* border-top: 1px solid #e5e7eb; */
  background: #fff;
}

/* Pill button */
#botkid-expert-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

#botkid-expert-toggle:hover {
  background: #eef2ff;
  border-color: var(--botkid-primary);
  color: var(--botkid-primary);
}

#botkid-expert-toggle .botkid-caret {
  font-size: 11px;
  opacity: 0.7;
}

/* Dropdown menu */
#botkid-expert-menu {
  position: absolute;
  bottom: 48px; /* opens upward */
  left: 12px;
  width: calc(100% - 24px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  display: none;
  z-index: 1000002;
}

/* Options */
.botkid-expert-option {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
}

.botkid-expert-option:last-child {
  border-bottom: none;
}

.botkid-expert-option:hover {
  background: #f9fafb;
  color: var(--botkid-primary);
}


/* ===============================
   Utility Bar (Expert + Reset)
================================ */
#botkid-utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

/* Reset button */
#botkid-demo-reset {
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #3b88c3;
}

#botkid-demo-reset:hover {
  background: #f9fafb;
  border-color: var(--botkid-primary);
  color: var(--botkid-primary);
}


/* Responsive */
@media (max-width: 480px) {
  #botkid-chat-widget {
    width: calc(100% - 20px);
    right: 10px;
    bottom: 80px;
  }
}
