/* Family Helpline Bot */
#shb-root {
  --shb-accent: #1f5f8b;
  --shb-bg: #ffffff;
  --shb-text: #1d1d1d;
  --shb-bot: #eef2f5;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

#shb-root .shb-toggle {
  display: block;
  margin-left: auto;
  background: var(--shb-accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
#shb-root .shb-toggle::before { content: "☎ "; }

#shb-root .shb-panel {
  width: min(340px, calc(100vw - 40px));
  height: 440px;
  max-height: calc(100vh - 100px);
  margin-bottom: 12px;
  background: var(--shb-bg);
  color: var(--shb-text);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#shb-root .shb-panel[hidden] { display: none; }

#shb-root .shb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--shb-accent);
  color: #fff;
  padding: 10px 14px;
  font-weight: 600;
}
#shb-root .shb-close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

#shb-root .shb-log {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#shb-root .shb-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  word-wrap: break-word;
}
#shb-root .shb-bot {
  align-self: flex-start;
  background: var(--shb-bot);
  border-bottom-left-radius: 4px;
}
#shb-root .shb-user {
  align-self: flex-end;
  background: var(--shb-accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
#shb-root .shb-typing {
  align-self: flex-start;
  font-style: italic;
  color: #777;
  padding: 4px 0;
}
#shb-root .shb-bot a { color: var(--shb-accent); font-weight: 600; }

#shb-root .shb-form {
  display: flex;
  border-top: 1px solid #e3e3e3;
}
#shb-root .shb-input {
  flex: 1;
  border: 0;
  padding: 12px;
  font: inherit;
  min-width: 0;
}
#shb-root .shb-input:focus { outline: 2px solid var(--shb-accent); outline-offset: -2px; }
#shb-root .shb-send {
  background: none;
  border: 0;
  color: var(--shb-accent);
  font: inherit;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
}
