/* Elsie chat widget — shared across the SI med-ed sites.
 * Family-neutral navy/gold. No external dependencies. */
#elsie-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 9998;
  display: flex; align-items: center; gap: 10px;
  background: #1b2f4b; color: #fff; border: none; border-radius: 999px;
  padding: 12px 18px 12px 14px; font: 600 15px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer; box-shadow: 0 6px 24px rgba(10, 25, 45, .35);
}
#elsie-fab:hover { background: #24405f; }
#elsie-fab svg { width: 22px; height: 22px; flex: none; }
#elsie-fab .elsie-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #d4a94e; flex: none;
}
#elsie-panel {
  position: fixed; right: 20px; bottom: 76px; z-index: 9999;
  width: min(400px, calc(100vw - 40px)); height: min(560px, calc(100dvh - 120px));
  display: none; flex-direction: column; overflow: hidden;
  background: #fffdf8; border: 1px solid #d9cfae; border-radius: 14px;
  box-shadow: 0 18px 60px rgba(10, 25, 45, .4);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
#elsie-panel.open { display: flex; }
.elsie-head {
  background: #1b2f4b; color: #fff; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.elsie-head .elsie-title { font-weight: 700; font-size: 15px; }
.elsie-head .elsie-sub { font-size: 11.5px; color: #c9d4e2; }
.elsie-head .elsie-tag {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid #d4a94e; color: #f0d9a0; border-radius: 4px; padding: 2px 6px;
  margin-left: auto;
}
.elsie-head button {
  background: none; border: none; color: #c9d4e2; font-size: 20px; cursor: pointer; padding: 0 2px;
}
#elsie-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.elsie-msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.elsie-msg.user { align-self: flex-end; background: #1b2f4b; color: #fff; border-bottom-right-radius: 4px; }
.elsie-msg.bot { align-self: flex-start; background: #f3edda; color: #2a2a2a; border-bottom-left-radius: 4px; }
.elsie-msg.bot h1, .elsie-msg.bot h2, .elsie-msg.bot h3, .elsie-msg.bot h4 {
  margin: .6em 0 .3em; font-size: 1.02em; color: #1b2f4b;
}
.elsie-msg.bot p { margin: .45em 0; }
.elsie-msg.bot ul, .elsie-msg.bot ol { margin: .4em 0; padding-left: 1.3em; }
.elsie-msg.bot li { margin: .2em 0; }
.elsie-msg.bot table { border-collapse: collapse; margin: .5em 0; font-size: 12.5px; width: 100%; }
.elsie-msg.bot th, .elsie-msg.bot td { border: 1px solid #cfc39a; padding: 5px 7px; text-align: left; }
.elsie-msg.bot th { background: #e9dfc2; }
.elsie-msg.bot code { background: #e7e0c8; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.elsie-msg.bot pre { background: #22303f; color: #eef; padding: 10px; border-radius: 8px; overflow-x: auto; }
.elsie-msg.bot pre code { background: none; color: inherit; padding: 0; }
.elsie-msg.bot a { color: #1b5faa; }
.elsie-typing { color: #8a8570; font-style: italic; }
.elsie-foot {
  padding: 8px 14px; font-size: 11px; color: #8a8570; border-top: 1px solid #e5dcc0; background: #faf6ea;
}
#elsie-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: #faf6ea; }
#elsie-input {
  flex: 1; border: 1px solid #cfc39a; border-radius: 999px; padding: 10px 14px;
  font-size: 14px; font-family: inherit; background: #fff;
}
#elsie-input:focus { outline: 2px solid #d4a94e; }
#elsie-send {
  border: none; border-radius: 999px; background: #1b2f4b; color: #fff;
  padding: 0 18px; font-size: 14px; font-weight: 600; cursor: pointer;
}
#elsie-send:disabled { opacity: .5; cursor: default; }
@media (max-width: 480px) {
  #elsie-fab { right: 14px; bottom: 14px; }
  #elsie-panel { right: 10px; bottom: 70px; }
}
