/* Floating Help / instant chat widget — additive; does not alter staff layout. */
.aemos-help-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 13050;
  font-family: inherit;
  font-size: 0.9rem;
  pointer-events: auto;
}
.aemos-help-fab {
  min-width: 4.25rem;
  height: 2.5rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid #1a3a4a;
  background: #1a3a4a;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.aemos-help-fab:hover {
  filter: brightness(1.08);
}
.aemos-help-panel {
  position: absolute;
  right: 0;
  bottom: 3.4rem;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(28rem, calc(100vh - 5rem));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #c5ced6;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.aemos-help-panel[hidden] {
  display: none !important;
}
.aemos-help-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: #f3f6f8;
  border-bottom: 1px solid #dfe5ea;
}
.aemos-help-header strong {
  flex: 1;
}
.aemos-help-status {
  font-size: 0.75rem;
  color: #4a5c68;
}
.aemos-help-close {
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #334;
  padding: 0 0.2rem;
}
.aemos-help-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem 0.75rem;
  min-height: 10rem;
  max-height: 16rem;
  background: #fafbfc;
}
.aemos-help-msg {
  margin-bottom: 0.65rem;
}
.aemos-help-msg-role {
  font-size: 0.7rem;
  font-weight: 600;
  color: #5a6b76;
  margin-bottom: 0.15rem;
}
.aemos-help-msg-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
}
.aemos-help-msg--user .aemos-help-msg-body {
  background: #e8f1f6;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
}
.aemos-help-msg--assistant .aemos-help-msg-body,
.aemos-help-msg--agent .aemos-help-msg-body {
  background: #fff;
  border: 1px solid #e0e6eb;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
}
.aemos-help-msg--system .aemos-help-msg-body {
  color: #5a6b76;
  font-size: 0.85rem;
  font-style: italic;
}
.aemos-help-err {
  padding: 0.35rem 0.75rem;
  color: #a33;
  font-size: 0.8rem;
  background: #fff6f6;
  border-top: 1px solid #f0d0d0;
}
.aemos-help-err[hidden] {
  display: none !important;
}
.aemos-help-actions {
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-top: 1px solid #e8ecf0;
  background: #fff;
}
.aemos-help-linkish {
  border: 0;
  background: none;
  color: #0b5f8a;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  text-decoration: underline;
}
.aemos-help-compose {
  display: flex;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border-top: 1px solid #dfe5ea;
  background: #fff;
}
.aemos-help-compose textarea {
  flex: 1;
  resize: none;
  border: 1px solid #c5ced6;
  border-radius: 4px;
  padding: 0.35rem 0.45rem;
  font: inherit;
}
.aemos-help-compose button {
  align-self: flex-end;
  border: 1px solid #1a3a4a;
  background: #1a3a4a;
  color: #fff;
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
.aemos-help-compose button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.aemos-help-actions a.aemos-help-linkish {
  text-decoration: none;
}
.aemos-help-feedback {
  padding: 0.35rem 0.65rem 0.55rem;
  border-top: 1px solid #e8ecf1;
  font-size: 0.85rem;
}
