/* EduMaverick AI — landing chat widget. Prefixed em-sa-* to never collide. */
#em-sa-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 2147483000;
  display: flex; align-items: center; gap: 10px;
  background: #101a3c; color: #fff; border: 0; border-radius: 999px;
  padding: 8px 18px 8px 8px; cursor: pointer;
  box-shadow: 0 14px 34px -8px rgba(16, 26, 60, .55);
  font: 700 14px/1 'Plus Jakarta Sans', system-ui, sans-serif;
}
#em-sa-fab img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #fff; }
#em-sa-fab .em-sa-dot {
  position: absolute; left: 38px; top: 8px; width: 11px; height: 11px;
  border-radius: 50%; background: #16a34a; border: 2px solid #101a3c;
}
#em-sa-panel {
  position: fixed; right: 22px; bottom: 76px; z-index: 2147483001;
  width: min(392px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 110px));
  display: none; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 20px;
  box-shadow: 0 30px 70px -18px rgba(16, 26, 60, .5);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
#em-sa-panel.open { display: flex; }
.em-sa-head {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #101a3c, #3b2fd4);
  color: #fff; padding: 13px 14px;
}
.em-sa-head img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #fff; }
.em-sa-head b { font-size: 14.5px; display: block; }
.em-sa-head small { font-size: 11.5px; color: #c9d2f5; display: flex; align-items: center; gap: 5px; }
.em-sa-head small i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }
.em-sa-x { margin-left: auto; background: rgba(255,255,255,.14); border: 0; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 15px; }
#em-sa-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; background: #f5f7ff; display: flex; flex-direction: column; gap: 10px; }
.em-sa-msg { max-width: 88%; padding: 10px 12px; border-radius: 15px; font-size: 13.8px; line-height: 1.55; }
.em-sa-msg.you { align-self: flex-end; background: #3b2fd4; color: #fff; border-bottom-right-radius: 5px; white-space: pre-wrap; }
.em-sa-msg.ai { align-self: flex-start; background: #fff; color: #1c2440; border-bottom-left-radius: 5px; box-shadow: 0 2px 10px rgba(16,26,60,.07); }
.em-sa-msg.ai h4 { margin: 2px 0 7px; font-size: 14.5px; font-weight: 800; color: #101a3c; }
.em-sa-msg.ai p { margin: 0 0 9px; }
.em-sa-msg.ai p:last-child, .em-sa-msg.ai ul:last-child { margin-bottom: 0; }
.em-sa-msg.ai ul, .em-sa-msg.ai ol { margin: 0 0 9px; padding-left: 19px; }
.em-sa-msg.ai li { margin: 0 0 5px; }
.em-sa-msg.ai li::marker { color: #3b2fd4; font-weight: 800; }
.em-sa-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.em-sa-typing span { width: 7px; height: 7px; border-radius: 50%; background: #aab3d6; animation: em-sa-blink 1.1s infinite; }
.em-sa-typing span:nth-child(2) { animation-delay: .18s; }
.em-sa-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes em-sa-blink { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.em-sa-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.em-sa-actions:empty { display: none; }
.em-sa-chip, .em-sa-cta {
  border: 1.5px solid #3b2fd4; background: #eef0ff; color: #3b2fd4;
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.em-sa-cta { background: #3b2fd4; color: #fff; }
.em-sa-chip:hover { background: #e0e4ff; }
.em-sa-card { background: #f2f4ff; border: 1px solid #dfe3fb; border-radius: 13px; padding: 10px 12px; margin-top: 9px; }
.em-sa-card a { color: #3b2fd4; font-weight: 800; text-decoration: none; }
.em-sa-card .em-sa-row { display: flex; gap: 8px; align-items: center; margin: 5px 0; font-size: 13px; }
#em-sa-form { display: flex; gap: 8px; padding: 10px 12px 13px; background: #f5f7ff; }
#em-sa-input {
  flex: 1; border: 1.5px solid #dfe3fb; border-radius: 999px; padding: 10px 15px;
  font-size: 13.5px; font-family: inherit; outline: none; background: #fff; color: #1c2440;
}
#em-sa-input:focus { border-color: #3b2fd4; }
#em-sa-send {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: #3b2fd4; color: #fff; font-size: 16px; flex-shrink: 0;
}
#em-sa-send:disabled { opacity: .5; cursor: default; }
.em-sa-gate input {
  width: 100%; box-sizing: border-box; border: 1.5px solid #dfe3fb; border-radius: 11px;
  padding: 10px 12px; font-size: 13.5px; font-family: inherit; margin: 8px 0; outline: none;
}
.em-sa-gate input:focus { border-color: #3b2fd4; }
/* Declared after `.em-sa-gate input` on purpose: it carries the same specificity and wins on
   order, which is what stops the checkbox inheriting the text field's full width and padding. */
.em-sa-consent {
  display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 8px;
  font-size: 12px; line-height: 1.45; color: #5b6486; text-align: left; cursor: pointer;
}
.em-sa-consent input {
  width: 15px; height: 15px; flex-shrink: 0; margin: 2px 0 0; padding: 0;
  border-radius: 4px; box-sizing: border-box; accent-color: #3b2fd4;
}
.em-sa-consent input:focus { outline: 2px solid #3b2fd4; outline-offset: 1px; }
.em-sa-err { color: #dc2626; font-size: 12px; font-weight: 700; min-height: 16px; }
.em-sa-slots { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.em-sa-date { width: 100%; border: 1.5px solid #dfe3fb; border-radius: 11px; padding: 9px 11px; font-size: 13.5px; font-family: inherit; margin-top: 8px; background: #fff; }
.em-sa-ok { background: #e5f6ec; border: 1px solid #bfe6cd; border-radius: 13px; padding: 10px 12px; margin-top: 9px; color: #14532d; }
@media (max-width: 480px) {
  #em-sa-fab { right: 14px; bottom: 14px; }
  #em-sa-panel { right: 12px; bottom: 70px; }
}
