.hdh-legacy-assistant {
  box-sizing: border-box;
  width: min(100%, 820px);
  margin: 28px auto;
  padding: 18px;
  border: 1px solid #cfc9df;
  border-radius: 14px;
  background: #f8f6fc;
  color: #25212d;
  font-family: Arial, Helvetica, sans-serif;
}

.hdh-legacy-assistant *,
.hdh-legacy-assistant *::before,
.hdh-legacy-assistant *::after {
  box-sizing: border-box;
}

.hdh-legacy-assistant__title {
  margin: 0 0 10px;
  font-size: 1.12rem;
  line-height: 1.4;
}

.hdh-legacy-assistant__notice {
  margin: 0 0 16px;
  color: #514b5e;
  font-size: 0.95rem;
  line-height: 1.5;
}

.hdh-legacy-assistant__field {
  display: block;
  margin: 0 0 12px;
}

.hdh-legacy-assistant__label {
  display: block;
  margin: 0 0 7px;
  font-weight: 700;
}

.hdh-legacy-assistant__textarea {
  display: block;
  width: 100%;
  min-height: 135px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #8e84a5;
  border-radius: 9px;
  background: #ffffff;
  color: #201c28;
  font: inherit;
  line-height: 1.45;
}

.hdh-legacy-assistant__textarea:focus,
.hdh-legacy-assistant__button:focus,
.hdh-legacy-assistant__help summary:focus {
  outline: 3px solid #7561b8;
  outline-offset: 2px;
}

.hdh-legacy-assistant__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hdh-legacy-assistant__button {
  appearance: none;
  border: 0;
  border-radius: 9px;
  padding: 11px 16px;
  background: #5b3f9b;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.hdh-legacy-assistant__button:hover:not(:disabled) {
  background: #472f7c;
}

.hdh-legacy-assistant__button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.hdh-legacy-assistant__help {
  margin: 0;
  color: #40394d;
  font-size: 0.93rem;
}

.hdh-legacy-assistant__help summary {
  cursor: pointer;
  font-weight: 700;
}

.hdh-legacy-assistant__help p {
  margin: 9px 0 0;
  line-height: 1.45;
}

.hdh-legacy-assistant__results {
  min-height: 1px;
  margin-top: 18px;
}

.hdh-legacy-assistant__loading,
.hdh-legacy-assistant__message,
.hdh-legacy-assistant__answer {
  border-radius: 9px;
  padding: 13px;
  line-height: 1.55;
}

.hdh-legacy-assistant__loading {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ece8f6;
  color: #342d43;
}

.hdh-legacy-assistant__spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 3px solid #b8add2;
  border-top-color: #5b3f9b;
  border-radius: 50%;
  animation: hdh-legacy-assistant-spin 0.8s linear infinite;
}

.hdh-legacy-assistant__message {
  background: #f2edf7;
  color: #40394d;
}

.hdh-legacy-assistant__message--error {
  border-inline-start: 4px solid #9b3159;
  background: #fff1f5;
  color: #641d39;
}

.hdh-legacy-assistant__answer {
  border-inline-start: 4px solid #5b3f9b;
  background: #ffffff;
  color: #201c28;
  white-space: pre-wrap;
}

.hdh-legacy-assistant__honeypot {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

.hdh-legacy-assistant-faq {
  width: min(100%, 820px);
  margin: 28px auto;
  font-family: Arial, Helvetica, sans-serif;
}

.hdh-legacy-assistant-faq details {
  margin: 0 0 10px;
  border-bottom: 1px solid #d4cfdd;
  padding: 0 0 10px;
}

.hdh-legacy-assistant-faq summary {
  cursor: pointer;
  font-weight: 700;
  line-height: 1.45;
}

.hdh-legacy-assistant-faq__answer {
  padding: 12px 0 0;
  line-height: 1.55;
}

.hdh-legacy-assistant-faq__answer a {
  color: #4e318d;
}

@keyframes hdh-legacy-assistant-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hdh-legacy-assistant__spinner {
    animation: none;
  }
}
