/* BECOME chatbot widget — Phase 1 styles
 * Drop-in stylesheet for the LEAP 100 landing page.
 * Uses become.ph brand palette: --become-gold #B8860B, dark text, subtle elevation.
 */

:root {
  --become-gold: #b8860b;
  --become-gold-dark: #8b6508;
  --become-ink: #1a1a1a;
  --become-gray: #6b6b6b;
  --become-gray-light: #f6f5f1;
  --become-bg: #ffffff;
  --become-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  --become-radius: 14px;
}

#become-chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--become-ink);
  background-image: url('/assets/become-logo.png');
  background-repeat: no-repeat;
  background-position: center 58%;
  background-size: 70% auto;
  border: 2px solid var(--become-gold);
  cursor: pointer;
  z-index: 9998;
  box-shadow: var(--become-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  font-size: 0; /* hide any text */
  color: transparent;
}
#become-chat-launcher:hover {
  transform: scale(1.06);
  border-color: #d4a443;
  box-shadow: 0 14px 36px rgba(184, 134, 11, 0.35);
}
#become-chat-launcher[aria-expanded="true"] {
  background-image: none;
  background-color: var(--become-ink);
  font-size: 24px;
  color: white;
}
#become-chat-launcher[aria-expanded="true"]::before {
  content: "\00d7"; /* × close glyph when open */
  font-weight: 300;
  font-family: system-ui, sans-serif;
}

#become-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: min(380px, calc(100vw - 40px));
  height: min(560px, calc(100vh - 120px));
  background: var(--become-bg);
  border-radius: var(--become-radius);
  box-shadow: var(--become-shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--become-ink);
}
#become-chat-panel[data-open="true"] {
  display: flex;
}

#become-chat-header {
  padding: 16px 18px;
  background: var(--become-ink);
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
#become-chat-header .become-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--become-bg);
  background-image: url('/assets/become-logo.png');
  background-repeat: no-repeat;
  background-position: center 58%;
  background-size: 78% auto;
  border: 1.5px solid var(--become-gold);
  flex-shrink: 0;
}
#become-chat-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
#become-chat-header p {
  margin: 0;
  font-size: 12px;
  opacity: 0.7;
}
#become-chat-header .become-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

#become-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  background: var(--become-gray-light);
}

.become-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.become-msg a {
  color: var(--become-gold-dark);
  text-decoration: underline;
}
.become-msg.user {
  align-self: flex-end;
  background: var(--become-gold);
  color: white;
  border-bottom-right-radius: 4px;
}
.become-msg.user a { color: white; }
.become-msg.bot {
  align-self: flex-start;
  background: white;
  color: var(--become-ink);
  border: 1px solid #eaeaea;
  border-bottom-left-radius: 4px;
}
.become-msg.system {
  align-self: center;
  background: transparent;
  color: var(--become-gray);
  font-size: 12px;
  font-style: italic;
  max-width: 100%;
  text-align: center;
}

.become-typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: 12px 16px;
  background: white;
  border-radius: 12px;
  border: 1px solid #eaeaea;
}
.become-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--become-gray);
  animation: become-bounce 1.2s infinite ease-in-out;
}
.become-typing span:nth-child(2) { animation-delay: 0.15s; }
.become-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes become-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

#become-chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: white;
  border-top: 1px solid #eaeaea;
  flex-shrink: 0;
}
#become-chat-input textarea {
  flex: 1;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--become-ink);
  resize: none;
  max-height: 100px;
  outline: none;
  transition: border-color 0.15s;
}
#become-chat-input textarea:focus {
  border-color: var(--become-gold);
}
#become-chat-input button {
  background: var(--become-gold);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}
#become-chat-input button:hover {
  background: var(--bec