/* Algolassi Assistant: compact toast UI */
#algolassi-assistant-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483000;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Radio has its own host. Its vertical position is adjusted by the assistant
   so it behaves like the next toast in the stack instead of permanently
   sitting above the assistant message. */
#algolassi-radio-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483001;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: bottom .25s ease;
}

#algolassi-radio-host .algolassi-radio-toast {
  pointer-events: auto;
  margin-top: 0;
}

.algolassi-assistant-toast {
  pointer-events: auto;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 14px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .18);
  padding: 12px 14px;
  margin-top: 10px;
  animation: algolassi-assistant-in .25s ease-out;
  overflow: hidden;
}

.algolassi-assistant-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 7px;
}

.algolassi-assistant-avatar {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1f5f9;
}

.algolassi-assistant-body {
  font-size: 14px;
  line-height: 1.5;
}

.algolassi-assistant-body p {
  margin: 6px 0;
}

.algolassi-assistant-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.algolassi-assistant-action {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  padding: 7px 11px;
  font-size: 12px;
  cursor: pointer;
}

.algolassi-assistant-action:hover {
  opacity: .88;
}

.algolassi-assistant-news-image {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 9px;
  margin-bottom: 9px;
}

.algolassi-assistant-news-link {
  display: inline-block;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 600;
}

.algolassi-assistant-toast-hide {
  animation: algolassi-assistant-out .35s ease-in forwards;
}

@keyframes algolassi-assistant-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes algolassi-assistant-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(12px); }
}

@media (prefers-reduced-motion: reduce) {
  .algolassi-assistant-toast,
  .algolassi-assistant-toast-hide {
    animation: none;
  }
  #algolassi-radio-host {
    transition: none;
  }
}

@media (max-width: 600px) {
  #algolassi-assistant-host,
  #algolassi-radio-host {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }
}
