.assistant-help {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 2400;
  font-family: inherit;
}

.assistant-help__launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: #0d6efd;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(13, 110, 253, 0.28);
  font-weight: 700;
  -webkit-user-select: none;
  user-select: none;
}

.assistant-help__panel {
  position: fixed;
  right: 14px;
  bottom: 72px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  width: min(390px, calc(100vw - 28px));
  height: min(640px, calc(100dvh - 96px));
  overflow: hidden;
  background: #ffffff;
  color: #263244;
  border: 1px solid #dfe7f3;
  border-radius: 14px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22);
}

.assistant-help__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #edf1f7;
  background: #ffffff;
}

.assistant-help__header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
}

.assistant-help__header p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 600;
}

.assistant-help__messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  background: #f6f8fb;
}

.assistant-help__message {
  display: grid;
  gap: 7px;
  max-width: 88%;
}

.assistant-help__message--user {
  align-self: flex-end;
}

.assistant-help__message--assistant {
  align-self: flex-start;
}

.assistant-help__bubble {
  border-radius: 14px;
  padding: 10px 12px;
  white-space: pre-line;
  line-height: 1.45;
  font-size: 0.94rem;
}

.assistant-help__message--user .assistant-help__bubble {
  background: #0d6efd;
  color: #ffffff;
  border-bottom-right-radius: 5px;
}

.assistant-help__message--assistant .assistant-help__bubble {
  background: #ffffff;
  color: #273142;
  border: 1px solid #e1e8f2;
  border-bottom-left-radius: 5px;
}

.assistant-help__chips,
.assistant-help__suggestions,
.assistant-help__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.assistant-help__actions {
  padding: 10px 14px 0;
  background: #ffffff;
}

.assistant-help__chips {
  padding: 10px 14px;
  background: #ffffff;
}

.assistant-help__chip,
.assistant-help__suggestions button,
.assistant-help__tour-action,
.assistant-help__actions button,
.assistant-help__actions a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #d5e0ef;
  border-radius: 999px;
  background: #ffffff;
  color: #0f5ec7;
  padding: 7px 10px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}

.assistant-help__suggestions button,
.assistant-help__tour-action {
  width: fit-content;
  background: #f4f8ff;
}

.assistant-help__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid #edf1f7;
  background: #ffffff;
}

.assistant-help__form input {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #d5e0ef;
  border-radius: 999px;
  padding: 0 14px;
  color: #273142;
  background: #ffffff;
  font-size: 1rem;
}

.assistant-help__form input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.16);
  outline: 0;
}

.assistant-help__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #0d6efd;
  color: #ffffff;
}

.assistant-help__send:disabled {
  opacity: 0.6;
}

@media (max-width: 620px) {
  .assistant-help {
    right: 10px;
    bottom: 10px;
  }

  body[data-lista-id]:not([data-lista-id=""]) .assistant-help {
    bottom: 96px;
  }

  .assistant-help__launcher span:last-child {
    display: none;
  }

  .assistant-help__launcher {
    width: 50px;
    min-height: 50px;
    justify-content: center;
    padding: 0;
  }

  .assistant-help__panel {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: min(720px, 92dvh);
    border-radius: 14px 14px 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .assistant-help__messages {
    padding: 12px;
  }

  .assistant-help__message {
    max-width: 92%;
  }

  .assistant-help__chips {
    max-height: 96px;
    overflow: auto;
  }
}

[data-theme="dark"] .assistant-help__panel,
[data-theme="dark"] .assistant-help__header,
[data-theme="dark"] .assistant-help__actions,
[data-theme="dark"] .assistant-help__chips,
[data-theme="dark"] .assistant-help__form,
[data-theme="dark"] .assistant-help__message--assistant .assistant-help__bubble {
  background: #172033;
  border-color: #2f4058;
  color: #e5e7eb;
}

[data-theme="dark"] .assistant-help__messages {
  background: #101827;
}

[data-theme="dark"] .assistant-help__header p {
  color: #a8b3c7;
}

[data-theme="dark"] .assistant-help__header h2 {
  color: #f8fafc;
}

[data-theme="dark"] .assistant-help__chip,
[data-theme="dark"] .assistant-help__suggestions button,
[data-theme="dark"] .assistant-help__tour-action,
[data-theme="dark"] .assistant-help__actions button,
[data-theme="dark"] .assistant-help__actions a,
[data-theme="dark"] .assistant-help__form input {
  background: #101827;
  border-color: #334155;
  color: #bfdbfe;
}

[data-theme="dark"] .assistant-help__form input {
  color: #f8fafc;
}
