/* Fake AI prompt on homepage, sits between hero and main nav */

.homeAssistant {
  min-height: 70vh;
  display: flex;
  box-sizing: border-box;
  width: 100%;
  max-width: 720px;
  margin: -8px auto 0;
  padding: 0 16px 24px;
  position: relative;
  z-index: 4;
  align-content: center;
  align-items: center;
}

.homeAssistant__inner {
  box-sizing: border-box;
  width: 100%;
  padding: 32px 16px 16px;
  border-radius: 20px;
  background: var(--bkgd);
  box-shadow: 0 0 32px 20px var(--bkgd);
}

.homeAssistant__thread {
  box-sizing: border-box;
  min-height: 28vh;
  max-height: 42vh;
  overflow-y: auto;
  margin: 0 0 20px;
  padding: 8px 4px 12px;
  scroll-behavior: smooth;
}

.homeAssistant__thread::-webkit-scrollbar {
  width: 6px;
}

.homeAssistant__thread::-webkit-scrollbar-thumb {
  background: rgb(97 97 97 / 25%);
  border-radius: 999px;
}

.homeAssistant__message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
  animation: homeAssistantMessageIn 0.35s ease;
}

.homeAssistant__message--user {
  justify-content: flex-end;
}

.homeAssistant__message--bot {
  justify-content: flex-start;
}

.homeAssistant__avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--action);
}

.homeAssistant__bubble {
  box-sizing: border-box;
  max-width: min(100%, 520px);
  padding: 12px 16px;
  font-family: Inter, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  border-radius: 16px;
  word-wrap: break-word;
}

.homeAssistant__bubble--bot {
  color: var(--frgd);
  background: var(--bkgd);
  /* border: 1px solid var(--border); */
  box-shadow: 1px 1px 6px #0000002e;
  border-bottom-left-radius: 0;
}

.homeAssistant__bubble--user {
  color: var(--frgd);
  background: var(--accent);
  border: 2px solid var(--border);
  border-bottom-right-radius: 6px;
}

.homeAssistant__bubble--typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 56px;
  min-height: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.homeAssistant__typingDot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--frgd);
  opacity: 0.35;
  animation: homeAssistantTyping 1.1s ease-in-out infinite;
}

.homeAssistant__typingDot:nth-child(2) {
  animation-delay: 0.15s;
}

.homeAssistant__typingDot:nth-child(3) {
  animation-delay: 0.3s;
}

.homeAssistant__caseLink,
.homeAssistant__bubble a {
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.homeAssistant__caseLink {
  text-transform: capitalize;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0px;
}

.homeAssistant__caseFavicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--border);
  color: var(--frgd);
  text-decoration: none !important;
  font-family: Inter, sans-serif;
  font-size: 0.5625rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.homeAssistant__caseSource {
  margin: 10px 0 0;
  font-size: 0.8125rem;
}

.homeAssistant__lead {
  margin: 0 0 10px;
}

.homeAssistant__quote {
  margin: 0 0 10px;
  padding: 10px 12px;
  font-style: italic;
  border-left: 3px solid var(--frgd);
  background: rgb(255 255 255 / 18%);
  border-radius: 0 10px 10px 0;
}

.homeAssistant__quoteMeta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.8125rem;
  line-height: 1.4;
  opacity: 0.92;
}

.homeAssistant__quoteAvatarWrap {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 50%;
}

.homeAssistant__quoteAvatarWrap .homeAssistant__quoteAvatar {
  display: block;
  margin: 0;
  transform: scale(0.5714285714);
  transform-origin: top left;
  filter: grayscale(1);
  opacity: 0.85;
}

.homeAssistant__quoteMetaText {
  min-width: 0;
}

.homeAssistant__fallback {
  margin: 4px;
  padding: 4px 8px;
  border-radius: 0 0 8px 8px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  font-size: 12px;
  background: var(--accent);
}

.homeAssistant__form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 16px;
}

.homeAssistant__form--busy {
  opacity: 0.72;
}

.homeAssistant__input {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 16px;
  font-family: Inter, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--frgd);
  background: var(--bkgd);
  border: 2px solid var(--frgd);
  border-radius: 12px;
  outline: none;
  transition: box-shadow 0.15s ease;
}

.homeAssistant__input::placeholder {
  color: rgb(97 97 97 / 55%);
}

.homeAssistant__input:focus {
  box-shadow: 0 0 0 3px var(--action);
}

.homeAssistant__input:disabled {
  cursor: not-allowed;
}

.homeAssistant__submit {
  flex: 0 0 auto;
  padding: 0 18px;
  font-family: Inter, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--frgd);
  background: var(--action);
  border: 2px solid var(--frgd);
  border-radius: 12px;
  cursor: pointer;
}

.homeAssistant__submit:hover,
.homeAssistant__submit:focus-visible {
  /* box-shadow: 2px 2px 0 var(--frgd); */
  background: var(--accent);
}

.homeAssistant__submit:disabled {
  cursor: not-allowed;
  box-shadow: none;
}

.homeAssistant__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.homeAssistant__suggestions li {
  display: flex;
  margin: 4px;
}

.homeAssistant__chip {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: Inter, sans-serif;
  font-size: 0.875rem;
  line-height: 1.3;
  font-weight: 500;
  color: var(--frgd);
  text-decoration: none;
  background: var(--action);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.homeAssistant__chip .material-symbols-outlined {
  font-size: 1.125rem;
  flex: 0 0 auto;
}

.homeAssistant__chip:hover,
.homeAssistant__chip:focus-visible {
  background: var(--accent);
  border-color: var(--frgd);
  /* outline: none; */
}

.homeAssistant__chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

@keyframes homeAssistantMessageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes homeAssistantTyping {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (min-width: 769px) {
  .homeAssistant {
    display: block !important;
  }
}

@media (max-width: 520px) {
  .homeAssistant__inner {
    padding: 22px 16px 18px;
  }

  .homeAssistant__thread {
    min-height: 24vh;
    max-height: 36vh;
  }

  .homeAssistant__form {
    flex-direction: column;
  }

  .homeAssistant__submit {
    padding: 12px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .homeAssistant__message,
  .homeAssistant__typingDot {
    animation: none;
  }

  .homeAssistant__thread {
    scroll-behavior: auto;
  }
}
